The pw-tag command configures a PW-tag action so that a sub-interface changes the P-Tag of packets before forwarding the packets over a PW in tagged mode.
The undo pw-tag command deletes the PW-tag action configured so that a sub-interface changes the P-Tag of packets before forwarding the packets over a PW in tagged mode.
By default, a sub-interface does not change the P-Tag of packets before forwarding the packets over a PW in tagged mode.
Parameter | Description | Value |
---|---|---|
vlan-id | Specifies the VLAN ID in the new P-Tag of packets to be forwarded over a PW in tagged mode. |
The value is an integer ranging from 1 to 4094. |
inner-vlan | Indicates that a sub-interface changes the P-Tag to the inner VLAN tag carried in packets before forwarding the packets over a PW in tagged mode. This parameter can be configured only on a sub-interface for QinQ VLAN tag termination. |
- |
outer-vlan | Indicates that a sub-interface changes the P-Tag to the outer VLAN tag carried in packets before forwarding the packets over a PW in tagged mode. |
- |
8021p | Specifies the 802.1p field of packets which is need to map to the internal priorities. |
- |
8021p-value | Specifies the 802.1p priority of packets entering a PW in tagged mode. A larger value indicates a higher priority. The 802.1p priority is represented by a 3-bit PRI (priority) field in an 802.1Q VLAN frame. When congestion occurs on a device, the device preferentially sends data packets with a higher priority. 8021pval: specifies the new 802.1p priority. |
The value is an integer ranging from 0 to 7. |
Usage Scenario
When a sub-interface accesses the L2VPN scenario, the packet encapsulation mode of the PW is tagged. Run this command on the user-side sub-interface to change the P-Tag when the packet enters the PW tunnel.
Prerequisites
The pw-tag command applies only to dot1q sub-interfaces, dot1q and QinQ VLAN tag termination sub-interfaces, QinQ stacking sub-interfaces, QinQ mapping sub-interfaces. One of the following configurations has been completed on the sub-interface:
Configuration Impact
The default P-Tag values and the P-Tag values after the PW-tag action as follows:
Precautions
The pw-tag command applies only to scenarios in which users access an L2VPN through a sub-interface and the PW on the L2VPN is in tagged mode. If the PW is in raw mode, this command does not take effect.
The pw-tag command cannot be configured together with IGMP snooping, DHCP snooping, and CCC local connection services.<HUAWEI> system-view [~HUAWEI] interface GigabitEthernet 0/1/0 [*HUAWEI-GigabitEthernet0/1/0] quit [*HUAWEI] interface GigabitEthernet0/1/0.1 [*HUAWEI-GigabitEthernet0/1/0.1] control-vid 1 qinq-termination [*HUAWEI-GigabitEthernet0/1/0.1] qinq termination pe-vid 1000 ce-vid 100 to 200 [*HUAWEI-GigabitEthernet0/1/0.1] pw-tag 10