encapsulation dot1q vid

Function

The encapsulation dot1q vid 8021p command is used to configure a Layer 2 sub-interface to access packets with a specified 802.1Q Tag.

The undo encapsulation dot1q vid 8021p command is used to cancel the access of a specified Layer 2 sub-interface to a specified 802.1Q Tag.

By default, no encapsulation type is specified on an EVC Layer 2 sub-interface.

Format

encapsulation dot1q vid pevid1 [ to pevid2 ] 8021p { val8021p1 [ to val8021p2 ] } &<1-8>

undo encapsulation dot1q vid pevid1 [ to pevid2 ] 8021p { val8021p1 [ to val8021p2 ] } &<1-8>

Parameters

Parameter Description Value
pevid1

Specifies a range of VLAN IDs for single-tagged packets to be received by an EVC Layer 2 sub-interface. The parameters are as follows:

pevid1: specifies the start VLAN ID.

The value is an integer ranging from 1 to 4094.

pevid2

Specifies a range of VLAN IDs for single-tagged packets to be received by an EVC Layer 2 sub-interface. The parameters are as follows:

pevid2: specifies the end VLAN ID. pevid2 must be greater than or equal to pevid1. pevid2 and pevid1 define a range of VLAN IDs.

If you do not specify to pevid2, pevid1 specifies the single VLAN ID carried in packets.

If the pevid1 [ to pevid2 ] parameters are run more than once, all configurations take effect.

The value is an integer ranging from 1 to 4094.

8021p

Specifies a range of priority values for single-tagged packets to be received by an EVC Layer 2 sub-interface.

-

val8021p1

Specifies a range of priority values for single-tagged packets to be received by an EVC Layer 2 sub-interface. The parameters are as follows:

val8021p1: specifies the smallest priority value.

The value is an integer ranging from 0 to 7. A larger value indicates a higher priority.

val8021p2

Specifies a range of priority values for single-tagged packets to be received by an EVC Layer 2 sub-interface. The parameters are as follows:

val8021p2: specifies the largest priority value. val8021p2 must be greater than or equal to val8021p1. val8021p2 and val8021p1 define a range of priority values.

If you do not specify to val8021p2, val8021p1 specifies a priority value carried in a VLAN frame.If the val8021p1 [ to val8021p2 ] parameters are run more than once, all configurations take effect.

The value is an integer ranging from 0 to 7. A larger value indicates a higher priority.

Views

400GE Layer 2 sub-interface view, 50GE Layer 2 sub-interface view, Eth-Trunk Layer 2 sub-interface view, GE Layer 2 sub-interface view, Layer 2 sub-interface view

Default Level

2: Configuration level

Task Name and Operations

Task Name Operations
ethernet write

Usage Guidelines

Usage Scenario

On a Layer 2 Ethernet network, packets may not carry VLAN Tags or carry one or two VLAN Tags. To enable different packets to be forwarded through different EVC Layer 2 sub-interfaces, run this command to configure different flow encapsulation modes for the EV Layer 2 sub-interface. The encapsulation dot1q vid 8021p command is used to configure a Layer 2 sub-interface to access packets with a specified 802.1Q Tag.

Precautions

Only a single encapsulation type can be specified on each EVC Layer 2 sub-interface. Before changing an encapsulation type, run the undo encapsulation command to delete the existing encapsulation type and run the encapsulation to specify an encapsulation type.

In a data transparent transmission scenario, dot1q or QinQ encapsulation is configured on an EVC Layer 2 sub-interface, and a range of VLAN IDs is specified for VLAN tags carried in packets. In this situation, traffic may be returned or dropped if the undo encapsulation dot1q vid low-pe-vid or undo encapsulation qinq vid pe-vid ce-vid low-ce-vid command is run to delete the existing encapsulation type with the smallest VLAN ID specified. To prevent problems, perform the following operations:

1.Run the shutdown command on the EVC Layer 2 sub-interface.

2.Run the commit command to commit configuration.

3.Run the undo encapsulation dot1q vid command to delete the minimum VLAN.

4.Run the undo shutdown command on the EVC Layer 2 sub-interface.

5.Run the commit command to commit configuration.

Example

# Enable 802.1Q Tag dot1q encapsulation on GE 0/1/1.2.
<HUAWEI> system-view
[~HUAWEI] interface GigabitEthernet 0/1/1.2 mode l2
[*HUAWEI-GigabitEthernet0/1/1.2] encapsulation dot1q vid 10 8021p 5
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >