15
[L2_SwitchB] interface gigabitethernet 1/0/1
[L2_SwitchB-GigabitEthernet1/0/1] port link-type trunk
[L2_SwitchB-GigabitEthernet1/0/1] port trunk permit vlan 100
4.
Configure the router:
# Create Ethernet subinterface GigabitEthernet 1/0/1.10, and assign an IP address to the
subinterface.
<Router> system-view
[Router] interface gigabitethernet 1/0/1.10
[Router-GigabitEthernet1/0/1.10] ip address 1.1.1.11 255.255.255.0
# Enable QinQ termination on GigabitEthernet 1/0/1.10 to terminate the VLAN-tagged packets
with the Layer 1 VLAN ID 100 and the Layer 2 VLAN ID 11.
[Router-GigabitEthernet1/0/1.10] vlan-type dot1q vid 100 second-dot1q 11
[Router-GigabitEthernet1/0/1.10] quit
# Assign an IP address to GigabitEthernet 1/0/2.
[Router] interface gigabitethernet 1/0/2
[Router-GigabitEthernet1/0/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.)
Ambiguous QinQ termination configuration example
Network requirements
As shown in
, QinQ is enabled on GigabitEthernet 1/0/2 of Layer 2 Switch B.
Configure ambiguous QinQ termination, so that hosts can communicate with the server group.
Figure 7 Network diagram
Configuration procedure
In this example, Layer 2 Switch C uses the factory configuration.
1.
Configure Host A, Host B, and Host C:
Router
L2 Switch B
L2 Switch C
GE1/0/1.10
1.1.1.11/24
Service provider network
VLAN 100
Host A
1.1.1.1/24
Host B
1.1.1.2/24
Host C
1.1.1.3/24
VLAN 11
VLAN 12
VLAN 13
L2 Switch A
Server group
GE1/0/1
GE1/0/2
GE1/0/3
GE1/0/7
GE1/0/2
1.1.2.11/24
GE1/0/2
QinQ enabled
GE1/0/1