# Enable the VLAN-VPN feature on Ethernet 1/0/11 of Switch A and tag the packets received on this
port with the tag of VLAN 1040 as the outer VLAN tag.
<SwitchA> system-view
[SwitchA] vlan 1040
[SwitchA-vlan1040] port Ethernet 1/0/11
[SwitchA-vlan1040] quit
[SwitchA] interface Ethernet 1/0/11
[SwitchA-Ethernet1/0/11] vlan-vpn enable
[SwitchA-Ethernet1/0/11] quit
# Set the TPID value of Ethernet 1/0/12 to 0x9200 (for intercommunication with the devices in the public
network) and configure the port as a trunk port permitting packets of VLAN 1040.
[SwitchA] interface Ethernet 1/0/12
[SwitchA-Ethernet1/0/12] vlan-vpn tpid 9200
[SwitchA-Ethernet1/0/12] port link-type trunk
[SwitchA-Ethernet1/0/12] port trunk permit vlan 1040
z
Configure Switch B.
# Enable the VLAN-VPN feature on Ethernet 1/0/21 of Switch B and tag the packets received on this
port with the tag of VLAN 1040 as the outer VLAN tag.
<SwitchB> system-view
[SwitchB] vlan 1040
[SwitchB-vlan1040] port Ethernet 1/0/21
[SwitchB-vlan1040] quit
[SwitchB] interface Ethernet 1/0/21
[SwitchB-Ethernet1/0/21] vlan-vpn enable
# Set the TPID value of Ethernet1/0/22 to 0x9200 (for intercommunication with the devices in the public
network) and set the port as a trunk port permitting packets of VLAN 1040.
[SwitchB-Ethernet1/0/22] vlan-vpn tpid 9200
[SwitchB-Ethernet1/0/22] quit
[SwitchB] interface Ethernet 1/0/21
[SwitchB-Ethernet1/0/22] port link-type trunk
[SwitchB-Ethernet1/0/22] port trunk permit vlan 1040
z
Do not configure VLAN 1040 as the default VLAN of Ethernet 1/0/12 of Switch A and Ethernet
1/0/22 of Switch B. Otherwise, the outer VLAN tag of a packet will be removed during transmission.
z
In this example, both Ethernet1/0/11 of Switch A and Ethernet1/0/21 of Switch B are access ports.
In cases where the ports are trunk ports or hybrid ports, you need to configure the two ports to
remove the outer VLAN tags before transmitting packets of VLAN 1040. Refer to
VLAN
in this
manual for detailed configuration.
z
Configure the devices in the public network
65-6