Unambiguous QinQ termination configuration example

Network requirements

As shown in Figure 6:

Configure unambiguous QinQ termination so that Host A can communicate with Host B.

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.

    [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.)