The dot1q termination vid command configures a sub-interface to terminate VLAN tags of single-tagged packets and a matching policy for the termination.
The undo dot1q termination vid command deletes a matching policy configured on a sub-interface for Dot1q VLAN tag termination.
By default, no matching policy is configured on a sub-interface for Dot1q VLAN tag termination.
dot1q termination vid low-pe-vid [ to high-pe-vid ] { 8021p { val8021p1 [ to val8021p2 ] } &<1-8> | dscp { valdscp1 [ to valdscp2 ] } &<1-10> | eth-type PPPoE | default } [ vlan-group group-id ]
undo dot1q termination vid low-pe-vid [ to high-pe-vid ] { 8021p { val8021p1 [ to val8021p2 ] } &<1-8> | dscp { valdscp1 [ to valdscp2 ] } &<1-10> | eth-type PPPoE | default } [ vlan-group group-id ]
Parameter | Description | Value |
---|---|---|
low-pe-vid |
Specifies the start VLAN ID in user packets. |
The value is an integer ranging from 1 to 4094. |
high-pe-vid |
Specifies the end VLAN ID in user packets. The high-pe-vid value must be greater than the low-pe-vid value. |
The value is an integer ranging from 1 to 4094. |
8021p val8021p1 to val8021p2 |
Specifies the 802.1p priority in packets.
In one dot1q termination vid 8021p command, a maximum of eight 802.1p priority ranges can be specified using to. 802.1p is represented by a 3-bit PRI (priority) field in an 802.1Q frame. If traffic is congested on a device, the device forwards high-priority frames first. |
The value is an integer ranging from 0 to 7. The larger the value, the higher the priority. |
dscp valdscp1 to valdscp2 |
Specifies the DSCP value in packets.
In one dot1q termination vid 8021p command, a maximum of 10 DSCP value ranges can be specified using to. According to relevant standards, six bits in Type of Service (ToS) field in an IPv4 packet header serve as the DSCP, which provides reference for differentiated services (DiffServ) and is used to implement Quality of Service (QoS) guarantee on an IP network. The operation of the traffic controller on the gateway depends on the DSCP field. |
The value is an integer ranging from 0 to 63. |
eth-type PPPoE |
Specifies the EthType in packets. |
The value can be only PPPoE. |
default |
Specifies a sub-interface to match VLAN services that are not matched by other sub-interfaces. |
- |
vlan-group group-id |
Specifies the number of a VLAN group. |
The value is an integer ranging from 1 to 16. |
Usage Scenario
On Layer 2 networks, packets carry one or two VLAN tags to identify users and services. If an access device does not support QinQ or one VLAN ID is used by multiple services, the access device may add service access information to the 802.1p/DSCP field. In this situation, edge devices on the network need to use the 802.1p/DSCP value to identify access users, bound the users to different VPNs, and apply different QoS scheduling policies. After a matching policy is configured using the dot1q termination vid 8021p command, VLAN services access the L2VPNs or L3VPNs based on the VLAN ID+802.1p value/DSCP value/EtherType.
The combinations of parameters in the dot1q termination vid 8021p command apply to the following scenarios:Prerequisites
The encapsulation type of the sub-interface has been configured as Dot1q termination using the encapsulation dot1q-termination command in the sub-interface view.
The encapsulation dot1q-termination command is replaced by the control-vid vid dot1q-termination command.Configuration Impact
If the dot1q termination vid 8021p command is run more than once, all configurations take effect.
Precautions
If the same VLAN ID is encapsulated on different sub-interfaces of an interface, the sub-interfaces must use matching policies of the same type (802.1p value/DSCP value/EthType).
One VLAN ID can be encapsulated on a maximum of eight sub-interfaces. If you specify default in the command, all services of any VLAN within the VLAN range, except that those matching the matching policy are processed by the corresponding sub-interface, are processed by the default sub-interface.If you specify the VLAN ID+802.1p value/DSCP value/EthType in the undo dot1q termination vid command, the command deletes only the specified matching policy. The undo dot1q termination vid low-pe-vid [ to high-pe-vid ] command deletes all matching policies within the VLAN range on the sub-interface. The EthType matching policy cannot be configured in the VE or global VE sub-interface view.<HUAWEI> system-view [~HUAWEI] interface GigabitEthernet 0/1/1.3 [*HUAWEI-GigabitEthernet0/1/1.3] control-vid 3 dot1q-termination [*HUAWEI-GigabitEthernet0/1/1.3] dot1q termination vid 20 to 30 dscp 1 3 to 5
<HUAWEI> system-view [~HUAWEI] interface GigabitEthernet 0/1/1.4 [*HUAWEI-GigabitEthernet0/1/1.4] control-vid 4 dot1q-termination [*HUAWEI-GigabitEthernet0/1/1.4] dot1q termination vid 40 to 50 eth-type pppoe
<HUAWEI> system-view [~HUAWEI] interface GigabitEthernet 0/1/1.2 [*HUAWEI-GigabitEthernet0/1/1.2] control-vid 2 dot1q-termination [*HUAWEI-GigabitEthernet0/1/1.2] dot1q termination vid 1 to 10 default
<HUAWEI> system-view [~HUAWEI] interface GigabitEthernet 0/1/1.1 [*HUAWEI-GigabitEthernet0/1/1.1] control-vid 1 dot1q-termination [*HUAWEI-GigabitEthernet0/1/1.1] dot1q termination vid 1 to 10 8021p 1 3 to 5