Generally, two switches are required to add double tags to packets. Configuring one switch to add double VLAN tags to untagged packets can simplify configuration. In addition, a Layer 2 interface can add double tags to untagged packets to differentiate services or users.
The system view is displayed.
An outer VLAN is created.
Return to the system view.
The interface view is displayed.
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.
VLAN translation is enabled on the interface.
The interface is added to the outer VLAN.
The interface is configured to add double VLAN tags to untagged packets.
To enable an interface to add double VLAN tags to an untagged packet, you need to set the link type of the interface to hybrid, and add the interface to the VLAN specified by stack-vlan in untagged mode on the S6720S-SI, S6720S-LI, S6720-SI, S6720-LI, S5730-SI, S5730S-EI, S5720S-SI, S5720S-LI, S5720-SI, S5720-LI, S5720I-SI, S2720-EI. On other devices, you need to set the link type of the interface to hybrid or trunk, and add the interface to the VLAN specified by stack-vlan.
If the PVID of the interface is not VLAN 1, restore the PVID to VLAN 1 before running the port vlan-stacking untagged command.
The port vlan-stacking untagged command actually configures a VLAN assignment mode. 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, different VLAN assignment modes are in the following descending order of priority: interface-based VLAN assignment > voice VLAN include-untagged > MAC address-based VLAN assignment > IP subnet-based VLAN assignment > port vlan-stacking untagged > protocol-based VLAN assignment > interface-based VLAN assignment. On other models, different VLAN assignment modes are in the following order of priority: policy-based VLAN assignment > voice VLAN include-untagged > MAC address-based VLAN assignment > IP subnet-based VLAN assignment > protocol-based VLAN assignment > interface-based VLAN assignment.