Basic QinQ configuration example

Network requirements

As shown in Figure 61:

Configure QinQ on PE 1 and PE 2 to transmit traffic in VLANs 100 and 200 for Company A and Company B, respectively.

For the QinQ frames to be identified correctly, set the SVLAN TPID to 0x8200 on the service provider-side ports of PE 1 and PE 2.

Figure 61: Network diagram

Configuration procedure

  1. Configure PE 1:

    # Configure Ten-GigabitEthernet 1/0/1 as a trunk port, and assign it to VLAN 100 and VLANs 10 through 70.

    <PE1> system-view
    [PE1] interface ten-gigabitethernet 1/0/1
    [PE1-Ten-GigabitEthernet1/0/1] port link-type trunk
    [PE1-Ten-GigabitEthernet1/0/1] port trunk permit vlan 100 10 to 70
    

    # Configure VLAN 100 as the PVID for Ten-GigabitEthernet 1/0/1.

    [PE1-Ten-GigabitEthernet1/0/1] port trunk pvid vlan 100
    

    # Enable QinQ on Ten-GigabitEthernet 1/0/1.

    [PE1-Ten-GigabitEthernet1/0/1] qinq enable
    [PE1-Ten-GigabitEthernet1/0/1] quit
    

    # Configure Ten-GigabitEthernet 1/0/2 as a trunk port, and assign it to VLANs 100 and 200.

    [PE1] interface ten-gigabitethernet 1/0/2
    [PE1-Ten-GigabitEthernet1/0/2] port link-type trunk
    [PE1-Ten-GigabitEthernet1/0/2] port trunk permit vlan 100 200
    

    # Set the TPID value in the SVLAN tags to 0x8200 on Ten-GigabitEthernet 1/0/2.

    [PE1-Ten-GigabitEthernet1/0/2] qinq ethernet-type service-tag 8200
    [PE1-Ten-GigabitEthernet1/0/2] quit
    

    # Configure Ten-GigabitEthernet 1/0/3 as a trunk port, and assign it to VLAN 200 and VLANs 30 through 90.

    [PE1] interface ten-gigabitethernet 1/0/3
    [PE1-Ten-GigabitEthernet1/0/3] port link-type trunk
    [PE1-Ten-GigabitEthernet1/0/3] port trunk permit vlan 200 30 to 90
    

    # Configure VLAN 200 as the PVID for Ten-GigabitEthernet 1/0/3.

    [PE1-Ten-GigabitEthernet1/0/3] port trunk pvid vlan 200
    

    # Enable QinQ on Ten-GigabitEthernet 1/0/3.

    [PE1-Ten-GigabitEthernet1/0/3] qinq enable
    [PE1-Ten-GigabitEthernet1/0/3] quit
    
  2. Configure PE 2:

    # Configure Ten-GigabitEthernet 1/0/1 as a trunk port, and assign it to VLAN 200 and VLANs 30 through 90.

    <PE2> system-view
    [PE2] interface ten-gigabitethernet 1/0/1
    [PE2-Ten-GigabitEthernet1/0/1] port link-type trunk
    [PE2-Ten-GigabitEthernet1/0/1] port trunk permit vlan 200 30 to 90
    

    # Configure VLAN 200 as the PVID for Ten-GigabitEthernet 1/0/1.

    [PE2-Ten-GigabitEthernet1/0/1] port trunk pvid vlan 200
    

    # Enable QinQ on Ten-GigabitEthernet 1/0/1.

    [PE2-Ten-GigabitEthernet1/0/1] qinq enable
    [PE2-Ten-GigabitEthernet1/0/1] quit
    

    # Configure Ten-GigabitEthernet 1/0/2 as a trunk port, and assign it to VLANs 100 and 200.

    [PE2] interface ten-gigabitethernet 1/0/2
    [PE2-Ten-GigabitEthernet1/0/2] port link-type trunk
    [PE2-Ten-GigabitEthernet1/0/2] port trunk permit vlan 100 200
    

    # Set the TPID value in the SVLAN tags to 0x8200 on Ten-GigabitEthernet 1/0/2.

    [PE2-Ten-GigabitEthernet1/0/2] qinq ethernet-type service-tag 8200
    [PE2-Ten-GigabitEthernet1/0/2] quit
    

    # Configure Ten-GigabitEthernet 1/0/3 as a trunk port, and assign it to VLAN 100 and VLANs 10 through 70.

    [PE2] interface ten-gigabitethernet 1/0/3
    [PE2-Ten-GigabitEthernet1/0/3] port link-type trunk
    [PE2-Ten-GigabitEthernet1/0/3] port trunk permit vlan 100 10 to 70
    

    # Configure VLAN 100 as the PVID for Ten-GigabitEthernet 1/0/3.

    [PE2-Ten-GigabitEthernet1/0/3] port trunk pvid vlan 100
    

    # Enable QinQ on Ten-GigabitEthernet 1/0/3.

    [PE2-Ten-GigabitEthernet1/0/3] qinq enable
    [PE2-Ten-GigabitEthernet1/0/3] quit
    
  3. Configure the devices between PE 1 and PE 2:

    # Set the MTU to a minimum of 1504 bytes for each port on the path of QinQ frames. (Details not shown.)

    # Configure all the ports on the forwarding path to allow frames from VLANs 100 and 200 to pass through without removing the VLAN tag. (Details not shown.)