< Home

rewrite pop

Function

The rewrite pop command enables the device to remove VLAN tags from packets received by Layer 2 sub-interfaces.

The undo rewrite pop command disables the device from removing VLAN tags from packets received by Layer 2 sub-interfaces.

By default, the device removes two VLAN tags from packets received by Layer 2 sub-interfaces that use QinQ encapsulation, removes one VLAN tag from packets received by Layer 2 sub-interfaces that use Dot1q encapsulation.

Format

rewrite pop { single | double | none }

undo rewrite pop { single | double | none }

Parameters

Parameter Description Value
single

Configures the device to remove one VLAN tag from received packets.

This parameter can only be configured on Layer 2 sub-interfaces that use Dot1q encapsulation and no VLAN segment can be configured for Layer 2 sub-interfaces.

-
double

Configures the device to remove one VLAN tag from received packets.

This parameter can only be configured on Layer 2 sub-interfaces that use QinQ encapsulation and no VLAN segment can be configured for Layer 2 sub-interfaces.

-
none

Configures the device not to remove VLAN tags from received packets. That is, the device transparently transmits received packets without modifying them.

This parameter can only be configured on Layer 2 sub-interfaces that use QinQ or Dot1q encapsulation.

-

Views

Layer 2 sub-interface view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

If a Layer 2 sub-interface with the encapsulation type being Dot1q or QinQ is configured as a VXLAN service access point on a VXLAN, to enable the sub-interface to remove the VLAN tag from received packets, run the rewrite pop command.

Precautions

Before running the encapsulation command to configure a VLAN segment on a Dot1q or QinQ Layer 2 sub-interface, you must run the rewrite pop command to specify the operation of removing VLAN tags as none.

Example

# Configure the device to remove two VLAN tags from packets received by a Layer 2 sub-interface.

<HUAWEI> system-view
[HUAWEI] interface gigabitethernet 0/0/1.1 mode l2
[HUAWEI-GigabitEthernet0/0/1.1] rewrite pop double
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >