< Home

port vlan-stacking untagged

Function

The port vlan-stacking untagged command configures a device to add double VLAN tags to an untagged frame.

The undo port vlan-stacking untagged command cancels the configuration.

By default, the device does not add double tags to an untagged frame.

Format

port vlan-stacking untagged stack-vlan vlan-id1 stack-inner-vlan vlan-id2

undo port vlan-stacking untagged

Parameters

Parameter

Description

Value

stack-vlan vlan-id1

Specifies the outer VLAN tag added to an untagged frame.

The value of vlan-id1 is an integer that ranges from 1 to 4094.

stack-inner-vlan vlan-id2

Specifies the inner VLAN tag added to an untagged frame.

The value of vlan-id2 is an integer that ranges from 1 to 4094.

Views

Ethernet interface view, GE interface view, XGE interface view, 40GE interface view, 100GE interface view, MultiGE interface view, Eth-Trunk interface view, port group view, 25GE interface view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

If double tags need to be added to packets, two devices are required. The port vlan-stacking untagged command adds double tags to packets on one device or untagged packets received on a Layer 2 interface to differentiate services or users.

For outgoing packets:
  • S2720-EI, S5720I-SI, S5720-LI, S5720S-LI, S5720S-SI, S5720-SI, S5730S-EI, S5730-SI, S6720-LI, S6720S-LI, S6720S-SI, and S6720-SI:
    • Double-tagged packets: The switch removes tags, as long as the outer VLAN ID is matched (regardless of whether the inner VLAN ID is matched).

    • Single-tagged packets: If QinQ (doltq or VLAN stacking) is configured on the inbound interface and the outer VLAN ID in QinQ is the same as the outer VLAN ID specified by the port vlan-stacking untagged stack-vlan vlan-id1 stack-inner-vlan vlan-id2 command, the VLAN ID of outgoing packets is the VLAN ID of original packets.

  • Other models: When only the outer VLAN ID is matched and the VLAN is configured on the interface in untagged mode, the outer VLAN tag is removed and the inner VLAN tag is reserved.

Precautions

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.

When the interface PVID is not VLAN 1, restore the PVID to VLAN 1 before the port vlan-stacking untagged command is executed.

Adding double VLAN tags to untagged frames is port-based VLAN assignment. Different VLAN assignment modes are in the following order of priority: policy-based VLAN assignment > MAC address-based VLAN assignment > IP subnet-based VLAN assignment > protocol-based VLAN assignment > interface-based VLAN assignment.

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, if the port vlan-stacking untagged vlan-id1 stack-inner-vlan vlan-id2 command is used on an interface, the VLAN specified by vlan-id1 cannot be configured as the outer VLAN in the port vlan-stacking command.

If the port vlan-stacking untagged command is used on an interface, the interface processes the received packets with VLAN tag 0 as untagged packets.

Example

# Add double VLAN tags to untagged frames received on GE0/0/1.

<HUAWEI> system-view
[HUAWEI] interface gigabitethernet 0/0/1
[HUAWEI-GigabitEthernet0/0/1] port link-type hybrid
 [HUAWEI-GigabitEthernet0/0/1] qinq vlan-translation enable
 [HUAWEI-GigabitEthernet0/0/1] port hybrid untagged vlan 100
[HUAWEI-GigabitEthernet0/0/1] port vlan-stacking untagged stack-vlan 100 stack-inner-vlan 200
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >