< Home

Example for Configuring Basic QinQ

Networking Requirements

As shown in Figure 1, the network hosts two enterprises: Enterprise 1 and Enterprise 2. Each enterprise has two branches, which connect to SwitchA and SwitchB of the carrier network. A non-Huawei device on the carrier network uses the TPID value of 0x9100.

The requirements are as follows:
  • Enterprise 1 and Enterprise 2 use independent VLANs that do not affect each other.
  • Traffic of each enterprise's branches is transparently transmitted on the carrier network. Users accessing the same service in each enterprise are allowed to communicate, and users accessing different services are isolated.
You can configure QinQ to meet the preceding requirements. VLAN 100 and VLAN 200 provided by the carrier network can be used to transmit traffic for Enterprise 1 and Enterprise 2 respectively, thereby implementing communication within each enterprise and isolating the two enterprises. To implement interoperation with the non-Huawei device, set the TPID value in outer VLAN tags to 0x9100 on the interfaces of the Huawei devices connected to the non-Huawei device.
Figure 1 Networking for configuring basic QinQ

Configuration Roadmap

The configuration roadmap is as follows:

  1. Create VLAN 100 and VLAN 200 on SwitchA and SwitchB. Configure interfaces connected to the two enterprises as QinQ interfaces and add the interfaces to VLAN 100 and VLAN 200, so that packets from the two enterprises are tagged with different outer VLAN tags.

  2. Add interfaces on SwitchA and SwitchB connected to the carrier network to VLAN 100 and VLAN 200 so that packets from the two VLANs are allowed to pass through.

  3. On the interfaces of SwitchA and SwitchB connected to the carrier network, set the TPID value in outer VLAN tags to the TPID value used on the non-Huawei device so that SwitchA and SwitchB can interoperate with the non-Huawei device.

Procedure

  1. Create VLANs.

    # Create VLAN 100 and VLAN 200 on SwitchA.

    <HUAWEI> system-view 
    [HUAWEI] sysname SwitchA 
    [SwitchA] vlan batch 100 200 
    

    # Create VLAN 100 and VLAN 200 on SwitchB.

    <HUAWEI> system-view 
    [HUAWEI] sysname SwitchB 
    [SwitchB] vlan batch 100 200 
    

  2. Set the link type of interfaces to Dot1q-tunnel.

    # Configure GE0/0/1 and GE0/0/2 on SwitchA as QinQ interfaces, and set the outer VLAN of GE0/0/1 to VLAN 100 and the outer VLAN of GE0/0/2 to VLAN 200. The configuration on SwitchB is similar to the configuration on SwitchA, and is not mentioned here.

    [SwitchA] interface gigabitethernet 0/0/1 
    [SwitchA-GigabitEthernet0/0/1] port link-type dot1q-tunnel 
    [SwitchA-GigabitEthernet0/0/1] port default vlan 100 
    [SwitchA-GigabitEthernet0/0/1] quit 
    [SwitchA] interface gigabitethernet 0/0/2
    [SwitchA-GigabitEthernet0/0/2] port link-type dot1q-tunnel
    [SwitchA-GigabitEthernet0/0/2] port default vlan 200 
    [SwitchA-GigabitEthernet0/0/2] quit
    

  3. Configure the interfaces on SwitchA and SwitchB connected to the carrier network.

    # Add GE0/0/3 on SwitchA to VLAN 100 and VLAN 200. The configuration on SwitchB is similar to the configuration on SwitchA, and is not mentioned here.

    [SwitchA] interface gigabitethernet 0/0/3 
    [SwitchA-GigabitEthernet0/0/3] port link-type trunk 
    [SwitchA-GigabitEthernet0/0/3] port trunk allow-pass vlan 100 200 
    [SwitchA-GigabitEthernet0/0/3] quit

  4. Configure the TPID value in outer VLAN tags.

    # Set the TPID value in outer VLAN tags to 0x9100 on SwitchA.

    [SwitchA] interface gigabitethernet 0/0/3
    [SwitchA-GigabitEthernet0/0/3] qinq protocol 9100 
    

    # Set the TPID value in outer VLAN tags to 0x9100 on SwitchB.

    [SwitchB] interface gigabitethernet 0/0/3 
    [SwitchB-GigabitEthernet0/0/3] qinq protocol 9100 
    

  5. Verify the configuration.

    In Enterprise 1, ping a PC in any VLAN of a branch from a PC in the same VLAN of another branch. If the ping operation is successful, internal users of Enterprise 1 can communicate with each other.

    In Enterprise 2, ping a PC in any VLAN of a branch from a PC in the same VLAN of another branch. If the ping operation is successful, internal users of Enterprise 2 can communicate with each other.

    Ping a PC in any VLAN of Enterprise 2 from a PC in the same VLAN of Enterprise 1. If the ping operation fails, users in Enterprise 1 and Enterprise 2 are isolated.

Configuration Files

  • SwitchA configuration file

    #
    sysname SwitchA
    #
    vlan batch 100 200
    #
    interface GigabitEthernet0/0/1
     port link-type dot1q-tunnel
     port default vlan 100
    #
    interface GigabitEthernet0/0/2
     port link-type dot1q-tunnel
     port default vlan 200
    #
    interface GigabitEthernet0/0/3
     qinq protocol 9100
     port link-type trunk
     port trunk allow-pass vlan 100 200
    #
    return
  • SwitchB configuration file

    #
    sysname SwitchB
    #
    vlan batch 100 200
    #
    interface GigabitEthernet0/0/1
     port link-type dot1q-tunnel
     port default vlan 100
    #
    interface GigabitEthernet0/0/2
     port link-type dot1q-tunnel
     port default vlan 200
    #
    interface GigabitEthernet0/0/3
     qinq protocol 9100
     port link-type trunk
     port trunk allow-pass vlan 100 200
    #
    return

Related Content

Videos

Configuring QinQ

Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
Next topic >