Unambiguous QinQ termination configuration example
Network requirements
As shown in Figure 22:
Layer 2 Switch C supports only single VLAN-tagged packets.
On Layer 2 Switch B, GigabitEthernet 2/1/2 is enabled with QinQ to adds an SVLAN tag 100 to the packets with CVLAN ID 11.
Configure unambiguous QinQ termination so that Host A can communicate with Host B.
Figure 22: Network diagram
Configuration procedure
In this example, Layer 2 Switch C uses the factory configuration.
Configure Host A and Host B:
# On Host A, specify 1.1.1.1/24 and 1.1.1.11/24 as its IP address and gateway IP address, respectively. (Details not shown.)
# On Host B, specify 1.1.2.1/24 and 1.1.2.11/24 as its IP address and gateway IP address, respectively. (Details not shown.)
Configure Layer 2 Switch A:
# Create VLAN 11.
<L2_SwitchA> system-view [L2_SwitchA] vlan 11
# Assign GigabitEthernet 2/1/2 to VLAN 11.
[L2_SwitchA-vlan11] port gigabitethernet 2/1/2 [L2_SwitchA-vlan11] quit
# Configure GigabitEthernet 2/1/1 as a trunk port, and assign the port to VLAN 11.
[L2_SwitchA] interface gigabitethernet 2/1/1 [L2_SwitchA-GigabitEthernet2/1/1] port link-type trunk [L2_SwitchA-GigabitEthernet2/1/1] port trunk permit vlan 11
Configure Layer 2 Switch B:
# Configure GigabitEthernet 2/1/2 as a trunk port, and assign the port to VLAN 11 and VLAN 100.
<L2_SwitchB> system-view [L2_SwitchB] interface gigabitethernet 2/1/2 [L2_SwitchB-GigabitEthernet2/1/2] port link-type trunk [L2_SwitchB-GigabitEthernet2/1/2] port trunk permit vlan 11 100
# Set the PVID of GigabitEthernet 2/1/2 to VLAN 100.
[L2_SwitchB-GigabitEthernet2/1/2] port trunk pvid vlan 100
# Enable QinQ on GigabitEthernet 2/1/2.
[L2_SwitchB-GigabitEthernet2/1/2] qinq enable [L2_SwitchB-GigabitEthernet2/1/2] quit
# Configure GigabitEthernet 2/1/1 as a trunk port, and assign the port to VLAN 100.
[L2_SwitchB] interface gigabitethernet 2/1/1 [L2_SwitchB-GigabitEthernet2/1/1] port link-type trunk [L2_SwitchB-GigabitEthernet2/1/1] port trunk permit vlan 100
Configure the router:
# Create Ethernet subinterface GigabitEthernet 2/1/1.10, and assign an IP address to the subinterface.
<Router> system-view [Router] interface gigabitethernet 2/1/1.10 [Router-GigabitEthernet2/1/1.10] ip address 1.1.1.11 255.255.255.0
# Enable QinQ termination on GigabitEthernet 2/1/1.10 to terminate the VLAN-tagged packets with the Layer 1 VLAN ID 100 and the Layer 2 VLAN ID 11.
[Router-GigabitEthernet2/1/1.10] vlan-type dot1q vid 100 second-dot1q 11 [Router-GigabitEthernet2/1/1.10] quit
# Assign an IP address to GigabitEthernet 2/1/2.
[Router] interface gigabitethernet 2/1/2 [Router-GigabitEthernet2/1/2] ip address 1.1.2.11 255.255.255.0
Verifying the configuration
# Verify that Host A and Host B can ping each other. (Details not shown.)