The qinq stacking vid command configures a sub-interface to add an outer VLAN tag to received packets based on a matching policy. Specifically, the sub-interface can add different outer VLAN tags to packets based on the VLAN ID+802.1p value/DSCP value/EthType.
The undo qinq stacking vid command restores the default configuration.
By default, QinQ stacking is not configured on an Ethernet interface.
qinq stacking vid low-ce-vid [ to high-ce-vid ] { 8021p { val8021p1 [ to val8021p2 ] } &<1-8> | dscp { valdscp1 [ to valdscp2 ] } &<1-10> | eth-type PPPoE | default } [ vlan-group group-id ]
undo qinq stacking vid low-ce-vid [ to high-ce-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-ce-vid |
Specifies the VLAN ID carried in packets.low-ce-vid: specifies the start VLAN ID. |
The value is an integer ranging from 1 to 4094. |
high-ce-vid |
Specifies the VLAN ID carried in packets.
|
The value is an integer ranging from 1 to 4094. |
8021p val8021p1 |
Specifies the priority of a VLAN frame. The val8021p1 indicates the minimum priority value. |
The value is an integer ranging from 0 to 7. A larger value indicates a higher priority. |
8021p val8021p2 |
Specifies the 802.1p priority in packets.
In one qinq stacking 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. A larger value indicates a higher priority. |
dscp |
Matches packets based on a DSCP value. |
- |
valdscp1 |
Specifies the DSCP value in packets.valdscp1: specifies the minimum DSCP value. |
The value is an integer ranging from 0 to 63. |
valdscp2 |
Specifies the DSCP value in packets.
In one qinq stacking vid 8021p command, a maximum of 10 DSCP value ranges can be specified using to. According to relevant standards, six bits of the 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 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 |
Specifies the EthType in packets. |
The value can only be 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
One physical interface cannot provide L2VPN access to multiple users. To address this problem, you can run the qinq stacking vid 8021p command to configure a QinQ stacking sub-interface and bind it to a VSI or L2VC to provide L2VPN access to multiple users. You need to specify only the inner VLAN ID+802.1p value/DSCP value/EthType in the command. The system automatically adds an outer VLAN tag to a packet based on its inner VLAN ID+802.1p value/DSCP value/EthType.
Prerequisites
Before running the qinq stacking vid command in the VE sub-interface view or global VE sub-interface view, the interface on which the sub-interface is to be created has been bound to a VE-Group.
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 qinq stacking vid command, the command deletes only the specified matching policy. The undo qinq stacking vid low-ce-vid [ to high-ce-vid ] command deletes all matching policies within the VLAN range on the sub-interface.<HUAWEI> system-view [~HUAWEI] interface GigabitEthernet 0/1/1.4 [*HUAWEI-GigabitEthernet0/1/1.4] qinq stacking vid 21 to 30 eth-type pppoe
<HUAWEI> system-view [~HUAWEI] interface GigabitEthernet 0/1/1.1 [*HUAWEI-GigabitEthernet0/1/1.1] qinq stacking vid 1 to 10 8021p 1 3 to 5
<HUAWEI> system-view [~HUAWEI] interface GigabitEthernet 0/1/1.3 [*HUAWEI-GigabitEthernet0/1/1.3] qinq stacking vid 11 to 20 dscp 10
<HUAWEI> system-view [*HUAWEI] interface GigabitEthernet 0/1/1.2 [*HUAWEI-GigabitEthernet0/1/1.2] qinq stacking vid 1 to 10 default