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.
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 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.
The system view is displayed.
The view of an Ethernet sub-interface on the user side of a PE is displayed.
Run vlan-group group-id
A user VLAN group is created.
Run group mode { single | multiple }
The working mode of the VLAN group is configured.
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:
To configure a QinQ stacking sub-interface, run the qinq stacking vid low-ce-vid [ to high-ce-vid ] [ 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.
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.
The configuration is committed.