pw-tag

Function

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.

Format

pw-tag { vlan-id | inner-vlan | outer-vlan } [ 8021p { 8021p-value | inner-vlan | outer-vlan } ]

undo pw-tag [ { vlan-id | inner-vlan | outer-vlan } [ 8021p { 8021p-value | inner-vlan | outer-vlan } ] ]

Parameters

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.

Views

100ge sub-interface view, 10GE sub-interface view, 200GE sub-interface view, 25GE sub-interface view, 400GE sub-interface view, 40GE sub-interface view, 50GE sub-interface view, Eth-Trunk sub-interface view, FlexE sub-interface view, GE sub-interface view

Default Level

2: Configuration level

Task Name and Operations

Task Name Operations
ethernet write

Usage Guidelines

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:

  • A dot1q sub-interface has been configured using the vlan-type dot1q command.
  • A sub-interface for dot1q VLAN tag termination has been configured using the dot1q termination vid command.
  • A sub-interface for QinQ VLAN tag termination has been configured using the qinq termination pe-vid ce-vid command.
  • A QinQ stacking sub-interface has been configured using the qinq stacking vid command.
  • A 1 to 1 QinQ mapping sub-interface has been configured using the qinq mapping vid map-vlan vid command.

Configuration Impact

The default P-Tag values and the P-Tag values after the PW-tag action as follows:

  • Dot1q sub-interface and Sub-interface for dot1q VLAN tag termination : the default P-Tag value are VLAN ID in a packet,the P-Tag value after the PW-Tag action are new VLAN ID.
  • Sub-interface for QinQ VLAN tag termination : the default P-Tag value is outer VLAN ID in a packet,the P-Tag value after the PW-Tag action is new VLAN ID.
  • QinQ stacking sub-interface : the default P-Tag value is minimum VLAN ID in the VLAN ID range specified on the sub-interface,the P-Tag value after the PW-Tag action is new VLAN ID.
  • QinQ stacking sub-interface : the default P-Tag value is fixed VLAN ID in the system,the P-Tag value after the PW-Tag action is new VLAN ID.

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.

Example

# Configure a sub-interface for QinQ VLAN tag termination and specify a P-Tag.
<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
Copyright ? Huawei Technologies Co., Ltd.
Copyright ? Huawei Technologies Co., Ltd.
< Previous topic Next topic >