14
Figure 6 Network diagram
Configuration procedure
In this example, Layer 2 Switch C uses the factory configuration.
1.
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.)
2.
Configure Layer 2 Switch A:
# Create VLAN 11.
<L2_SwitchA> system-view
[L2_SwitchA] vlan 11
# Assign GigabitEthernet 1/0/2 to VLAN 11.
[L2_SwitchA-vlan11] port gigabitethernet 1/0/2
[L2_SwitchA-vlan11] quit
# Configure GigabitEthernet 1/0/1 as a trunk port, and assign the port to VLAN 11.
[L2_SwitchA] interface gigabitethernet 1/0/1
[L2_SwitchA-GigabitEthernet1/0/1] port link-type trunk
[L2_SwitchA-GigabitEthernet1/0/1] port trunk permit vlan 11
3.
Configure Layer 2 Switch B:
# Configure GigabitEthernet 1/0/2 as a trunk port, and assign the port to VLAN 11 and VLAN
100.
<L2_SwitchB> system-view
[L2_SwitchB] interface gigabitethernet 1/0/2
[L2_SwitchB-GigabitEthernet1/0/2] port link-type trunk
[L2_SwitchB-GigabitEthernet1/0/2] port trunk permit vlan 11 100
# Set the PVID of GigabitEthernet 1/0/2 to VLAN 100.
[L2_SwitchB-GigabitEthernet1/0/2] port trunk pvid vlan 100
# Enable QinQ on GigabitEthernet 1/0/2.
[L2_SwitchB-GigabitEthernet1/0/2] qinq enable
[L2_SwitchB-GigabitEthernet1/0/2] quit
# Configure GigabitEthernet 1/0/1 as a trunk port, and assign the port to VLAN 100.
Router
Host A
1.1.1.1/24
Host B
1.1.2.1/24
L2 Switch A
L2 Switch B
L2 Switch C
VLAN 11
GE1/0/1.10
1.1.1.11/24
Service provider network
VLAN 100
GE1/0/1
GE1/0/2
GE1/0/2
QinQ enabled
GE1/0/1
GE1/0/2
1.1.2.11/24