Configuring the Switch to Add Double VLAN Tags to Untagged Packets
Context
This configuration is not supported on the LE0MG24CA and LE0MG24SA cards.
Procedure
- Run system-view
The system view is displayed.
- Run vlan vlan-id
An outer VLAN is created.
- Run quit
Return to the system view.
- Run interface interface-type interface-number
The interface view is displayed.
- Run port link-type hybrid
The link type of the interface is set to hybrid.
By default, the link type of an interface is hybrid.
- Run port hybrid untagged vlan vlan-id
The interface is added to the outer VLAN.
- Run port vlan-stacking untagged stack-vlan vlan-id1 stack-inner-vlan vlan-id2
The interface is configured to add double VLAN tags to untagged packets.
NOTE:
To enable an interface to add double VLAN tags to an untagged packet, you must set the link type of the interface to hybrid, and add the interface to the outer VLAN in untagged mode.
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 interface-based VLAN assignment. 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.