Configuring a QinQ Stacking Sub-interface

This section describes how to configure a QinQ stacking sub-interface on a provider edge (PE) to provide Layer 2 virtual private network (L2VPN) access so that the inner virtual local area network (VLAN) tags of user packets are transparently transmitted over a carrier network.

Context

After you enable QinQ stacking on an Ethernet sub-interface:
  • When the QinQ stacking sub-interface receives a packet, the sub-interface checks whether the VLAN ID or VLAN range in the VLAN tag of the packet matches the VLAN ID or VLAN range specified using the qinq stacking vid command. If they are consistent, the sub-interface adds an outer VLAN tag to the packet.

    • If the packet carries one VLAN tag and the VLAN ID in the tag is in the VLAN range specified by low-ce-vid [ to high-ce-vid ] in the qinq stacking vid command, the sub-interface adds an outer VLAN tag to the packet. If the VLAN ID in the VLAN tag is not in the specified VLAN range, the sub-interface discards the packet.
    • If the packet carries two VLAN tags and the VLAN ID in the outer tag is in the VLAN range specified by low-ce-vid [ to high-ce-vid ] in the qinq stacking vid command, the sub-interface adds another outer VLAN tag to the packet and forwards the packet. In this case, the inner VLAN tag is transmitted transparently. If the VLAN ID in the outer tag is not in the specified VLAN range, the sub-interface discards the packet.
    • If the packet does not carry any VLAN tag, the sub-interface directly discards the packet.
  • When the QinQ stacking sub-interface sends a packet, the sub-interface strips the outer VLAN tag of the packet.
After you run the qinq stacking vid command on an Ethernet sub-interface:
  • If you do not run the qinq stacking pe-vid pe-vid command to specify an outer VLAN tag to be added to packets, the Ethernet sub-interface will add a default outer VLAN tag to received packets.

    The default outer VLAN tag is assigned by the device and cannot be modified.

  • If you run the qinq stacking pe-vid pe-vid command to specify an outer VLAN tag to be added to packets, the Ethernet sub-interface will add the specified outer VLAN tag to received packets.

    Before you run the qinq stacking pe-vid pe-vid command on an Ethernet sub-interface, you must run the qinq stacking vid command on the sub-interface. Otherwise, the QinQ stacking function does not take effect.

Procedure

  1. Run system-view

    The system view is displayed.

  2. Run interface interface-type interface-number.subinterface-number

    The view of an Ethernet sub-interface on the user side of a PE is displayed.

  3. (Optional) Create a user VLAN group.

    1. Run vlan-group group-id

      A user VLAN group is created.

    2. Run group mode { single | multiple }

      The working mode of the VLAN group is configured.

      • single: A VLAN group is considered as a user. This means that you cannot collect statistics about QinQ packets or deploy quality of service (QoS) policies based on a VLAN or a VLAN range.
      • multiple: VLANs and VLAN ranges in a VLAN group are considered as different users. This means that you can collect statistics about QinQ packets or deploy QoS policies based on a VLAN or VLAN range to implement refined management.
    3. Run quit

      Return to the view of the Ethernet sub-interface on the user side of the PE.

    Configuring a VLAN group allows you to achieve the following purposes:

    • Deploy QoS policies based on services or users so that higher priority service traffic is preferentially forwarded, improving user experience.
    • View statistics about QinQ packets to check whether a device is functioning properly.

  4. Run either of the following commands:

    • To configure a QinQ stacking sub-interface, run the qinq stacking vid low-ce-vid [ to high-ce-vid ] [ vlan-group group-id ] command.

    • To configure a QinQ stacking sub-interface and a matching policy for the sub-interface based on VLAN ID+8021.p value/DSCP value/EthType, run the qinq stacking vid low-ce-vid [ to high-ce-vid ] { 8021p { val8021p1 [ to val8021p2 ] } &<1-8> | dscp { dvaldscp1 [ to valdscp2 ] } &<1-10> | eth-type eth-type-value | default } [ vlan-group group-id ] command.
    • If you have run the vlan-group command to configure a VLAN group on the sub-interface, specify vlan-group in the preceding commands.

    • If you have not run the vlan-group command to configure a VLAN group on the sub-interface, do not specify vlan-group in the preceding commands.

    • If you configure QinQ stacking on Ethernet sub-interfaces on an interface, specify a unique ce-vid value for each sub-interface.

    • If you do not configure a matching policy, the QinQ stacking sub-interface adds an outer VLAN tag to packets based on the specified VLAN range. If you configure a matching policy, the QinQ stacking sub-interface adds an outer VLAN tag to packets based on the specified VLAN ID+802.1p value/DSCP value/EthType.

  5. (Optional) Run qinq stacking pe-vid pe-vid

    The QinQ stacking sub-interface is enabled to add a specified outer VLAN tag to received packets.

    If you skip this step, the QinQ stacking sub-interface will add a system-assigned outer VLAN tag to received packets.

  6. Run commit

    The configuration is committed.

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