The port vlan-stacking vlan command enables VLAN stacking on an interface and configures the interface to add a VLAN tag to each received single-tagged packet.
The port vlan-stacking ce-default-vlan command enables VLAN stacking on an interface and configures the interface to add a VLAN tag to an untagged packet that it receives.
The undo port vlan-stacking command restores the default configuration.
By default, VLAN stacking is not configured on interfaces.
Parameter | Description | Value |
---|---|---|
vlan-id1 | Indicates the start value of the inner VLAN range. |
The value is an integer ranging from 1 to 4094. |
vlan-id2 | Indicates the end value of the inner VLAN range. |
The value is an integer ranging from 1 to 4094. |
stack-vlan vlan-id3 | Specifies the VLAN ID in the outer tag to be added to a packet. |
The value is an integer ranging from 1 to 4094. |
ce-default-vlan | Specifies that the interface adds a VLAN tag to an untagged packet that it receives. |
- |
Usage Scenario
VLAN stacking, also known as selective QinQ, is a Layer 2 technology that adds outer VLAN tags to packets based on their VLAN IDs.
On access networks of carriers, users must be differentiated based on their applications and access locations or devices. After VLAN stacking is configured on an interface, the interface adds different outer VLAN tags to packets based on their VLAN IDs to differentiate users. A VLAN stacking interface has the following features:Prerequisites
Before you run the port vlan-stacking command:
<HUAWEI> system-view [~HUAWEI] vlan batch 40 to 50 20 [*HUAWEI] interface GigabitEthernet 0/1/1 [*HUAWEI-GigabitEthernet0/1/1] portswitch [*HUAWEI-GigabitEthernet0/1/1] port vlan-stacking vlan 40 to 50 stack-vlan 20