VLAN ID-based selective QinQ allows an interface to add an outer VLAN tag to packets based on VLAN IDs of the packets.
When an interface configured with VLAN stacking needs to remove the outer tag from outgoing frames, the interface must join the VLAN specified by stack-vlan in untagged mode. If the outer VLAN does not need to be removed, the interface must join the VLAN specified by stack-vlan in tagged mode.
The system view is displayed.
The interface view is displayed.
The interface can be a physical interface or an Eth-Trunk interface.
The link type of the interface is set to hybrid.
By default, the link type of an interface on the S2720-EI, S5720I-SI, S5720-LI, S5735-L, S5735S-L, S5735S-L-M, S5720S-LI, S5720S-SI, S5720-SI, S5735-S, S5735S-S, S5735-S-I, S5730S-EI, S5730-SI, S6720-LI, S6720S-LI, S6720S-SI, and S6720-SI is negotiation-auto, and the link type of an interface on other models is negotiation-desirable.
The interface is added to the VLAN in untagged mode.
The specified VLAN ID must exist on the switch. You do not need to create a VLAN specified by the original VLAN tag of a received packet.
VLAN translation is enabled on the interface.
Configure only selective QinQ.
Run the port vlan-stacking vlan vlan-id1 [ to vlan-id2 ] stack-vlan vlan-id3 [ remark-8021p 8021p-value1 ] command to configure only selective QinQ.
By default, the priority in the outer VLAN tag is the same as that in the inner VLAN tag.
Configure selective QinQ and VLAN mapping.
Run the port vlan-stacking vlan vlan-id1 stack-vlan vlan-id2 [ remark-8021p 8021p-value1 ] map-vlan vlan-id4 [ remark-inner-8021p 8021p-value2 ] command to configure selective QinQ and VLAN mapping.
By default, the priority in the outer VLAN tag is the same as that in the inner VLAN tag.
When map-vlan vlan-id4 is configured to perform VLAN stacking and VLAN mapping concurrently, on switches other than the S5720-EI, S5720-HI, S5730-HI, S5731-H, S5731-S, S5731S-H, S5731S-S, S5732-H, S6720-EI, S6720-HI, S6720S-EI, S6730-H, S6730S-H, S6730-S, and S6730S-S, the same outer VLAN tag cannot be added to packets from different user VLANs. On the S5720-EI, S5720-HI, S5730-HI, S5731-H, S5731-S, S5731S-H, S5731S-S, S5732-H, S6720-EI, S6720-HI, S6720S-EI, S6730-H, S6730S-H, S6730-S, and S6730S-S, the same outer VLAN tag cannot be added to packets from different user VLANs, and different inner VLAN tags in packets from different user VLANs cannot be matched to the same VLAN tag. For example, if packets containing VLAN IDs 10 and 20 respectively are received on an interface, the port vlan-stacking vlan 10 stack-vlan 100 map-vlan 200 and port vlan-stacking vlan 20 stack-vlan 100 map-vlan 200 commands cannot be configured together.
Exit from the interface view.
The view of another interface is displayed.
This interface is the outbound interface for QinQ packets, different from the interface specified in step 2.
The link type of the interface is set to trunk.
The outer VLAN ID (stack-vlan) added to the original tagged packet is set.
Deleting the QinQ configuration