encapsulation dot1q

Function

The encapsulation dot1q vid command enables a Layer 2 sub-interface to receive packets with a specified 802.1Q tag.

The undo encapsulation dot1q vid command cancels the configuration.

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

Format

encapsulation dot1q [ vid low-pe-vid [ to high-pe-vid ] ]

undo encapsulation dot1q [ vid low-pe-vid [ to high-pe-vid ] ]

Parameters

Parameter Description Value
vid low-pe-vid

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.

to high-pe-vid

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.

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, Global-VE layer2 subinterface view, VE layer2 subinterface view, Layer 2 sub-interface view

Default Level

2: Configuration level

Task Name and Operations

Task Name Operations
ethernet write

Usage Guidelines

Usage Scenario

A Layer 2 Ethernet can transmit untagged, single-tagged, and double-tagged packets. To enable an EVC Layer 2 sub-interface to transmit different types of packets, run the flow-encapsulation command to configure an encapsulation type for the EVC Layer 2 sub-interface. The encapsulation dot1q vid command configures a Layer 2 sub-interface to receive VLAN-encapsulated packets by default.

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 the encapsulation type of the EVC Layer 2 sub-interface to dot1q.
<HUAWEI> system-view
[~HUAWEI] interface GigabitEthernet 0/1/1.2 mode l2
[*HUAWEI-GigabitEthernet0/1/1.2] encapsulation dot1q vid 10
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >