qinq termination pe-vid ce-vid

Function

The qinq termination pe-vid ce-vid command enables VLAN tag termination for double-tagged packets.

The undo qinq termination pe-vid ce-vid command disables VLAN tag termination for double-tagged packets.

By default, VLAN tag termination for double-tagged packets is disabled.

Format

qinq termination pe-vid pe-vid [ to high-pe-vid ] ce-vid ce-vid [ to high-ce-vid ] [ vlan-group group-id ]

undo qinq termination pe-vid pe-vid [ to high-pe-vid ] ce-vid ce-vid [ to high-ce-vid ] [ vlan-group group-id ]

Parameters

Parameter Description Value
pe-vid

Specifies a start VLAN ID in an outer tag.

The value is an integer ranging from 1 to 4094.

high-pe-vid

Specifies an end VLAN ID in an outer tag.

If the pevid to high-pevid parameters are run more than once, all configurations take effect.

The value is an integer ranging from 1 to 4094.

ce-vid

Specifies a start VLAN ID in an inner tag.

The value is an integer ranging from 1 to 4094.

high-ce-vid

Specifies an end VLAN ID in an inner tag.If the cevid to high-cevid parameters are run more than once, all configurations take effect.

The value is an integer ranging from 1 to 4094.

vlan-group group-id

Specifies ID of the VLAN group to which the sub-interface for QinQ VLAN tag termination is bound.

Statistics about QinQ packets are collected based on VLAN groups. To collect QinQ packet statistics, specify vlan-group in the qinq termination pe-vid ce-vid command.

You can apply QoS policies for user groups by specifying the VLAN group ID.

The value is an integer ranging from 1 to 16.

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, GE sub-interface view, Global VE sub-interface view, PW-VE sub-interface view, VE sub-interface view

Default Level

2: Configuration level

Task Name and Operations

Task Name Operations
ethernet write

Usage Guidelines

Usage Scenario

  • Inter-VLAN communication

    VLAN technology is widely used because it helps Layer 2 packets of different users to be separately transmitted. Hosts in a VLAN can communicate with each other, but hosts in different VLANs cannot communicate at Layer 2. The Layer 3 routing technology is required for communication between hosts in different VLANs. The following interfaces can be used to implement inter-VLAN communication: VLANIF interfaces on Layer 3 switches and Layer 3 Ethernet sub-interfaces on routers. Conventional Layer 3 Ethernet interfaces do not identify VLAN packets. After receiving VLAN packets, they consider the packets invalid and discard them. To implement inter-VLAN communication, create Ethernet sub-interfaces on an Ethernet interface and configure the sub-interfaces to remove tags from VLAN packets.
  • Communication between devices in the LAN and WAN

    Most LAN packets carry VLAN tags. Certain WAN protocols such as Point-to-Point Protocol (PPP) cannot identify VLAN packets. To send VLAN packets from a LAN to a WAN, a device needs to record VLAN information carried in VLAN packets, remove VLAN tags, and then forward the packets.

    VLAN packets are classified into Dot1q packets, each of which carries only one VLAN tag, and QinQ packets, each of which carries two VLAN tags. Accordingly, there are two VLAN tag termination modes: Dot1q termination, which terminates tags carried in Dot1q packets. To configure Dot1q termination, run the dot1q termination vid command in the sub-interface view. QinQ termination, which terminates tags carried in QinQ packets. To configure QinQ termination, run the qinq termination pe-vid ce-vid command.

Prerequisites

QinQ termination has been configured on the sub-interface using the encapsulation qinq-termination command.

The encapsulation qinq-termination command is replaced by the control-vid vid qinq-termination command.

Configuration Impact

After the qinq termination pe-vid ce-vid command is used, the VLAN tag termination sub-interface processes packets in the following ways:

After receiving a packet, the inbound interface removes the tag carried in the packet, and then forwards the packet. The outbound interface determines whether the sent packet carries tags. Before sending a packet, the outbound interface adds corresponding VLAN information to the packet.

If you bind a sub-interface for QinQ VLAN tag termination to a Virtual Switching Instance (VSI) or Virtual Private Wire Service (VPWS) to access a Layer 2 virtual private network (L2VPN), configure the mode in which the sub-interface connects to the L2VPN. For detailed information, see the qinq termination l2 command.

Precautions

Based on the VLAN range terminated by a sub-interface, QinQ termination is classified into the following modes:Explicit QinQ termination: Parameters pe-vid pe-vid ce-vid ce-vid are specified on a sub-interface so that the sub-interface terminates only one type of QinQ packets.In explicit QinQ termination mode, the sub-interface allows only QinQ packets carrying specified VLAN IDs in inner and outer tags to pass through. Before sending a packet, the sub-interface adds two VLAN tags to the packet.Implicit QinQ termination: Parameters pe-vid [ to high-pevid ] ce-vid cevid [ to high-cevid ] are specified on a sub-interface so that the sub-interface terminates different combinations of inner and outer tags of QinQ packets.VLAN IDs in the inner and outer tags of QinQ packets must be in a specific VLAN ID range. QinQ packets carry VLAN IDs beyond the specified VLAN ID range cannot pass through the sub-interface. Before sending a packet, the sub-interface adds two VLAN tags to the packet.

  • This command is exclusive with the mpls te command under sub-interface view.
  • This command is exclusive with the mpls ldp command under sub-interface view.
  • This command does not support the L2VE subinterface.

    When the pe-vid and ce-vid segments are configured, a large number of broadcast traffic is replicated, causing a transient surge of broadcast traffic, which may cause packet loss.

Example

# Configure QinQ termination on GE 0/1/1.1, specify the VLAN ranges in the inner tag of user packets to be 100 to 200 and 400 to 500, specify the VLAN ID in the outer tag to be 1000, and bind GE 0/1/1.1 to VLAN group 1.
<HUAWEI> system-view
[~HUAWEI] interface GigabitEthernet0/1/1.1
[*HUAWEI-GigabitEthernet0/1/1.1] encapsulation qinq-termination
[*HUAWEI-GigabitEthernet0/1/1.1] vlan-group 1
[*HUAWEI-GigabitEthernet0/1/1.1-vlangroup1] quit
[*HUAWEI-GigabitEthernet0/1/1.1] qinq termination pe-vid 1000 ce-vid 100 to 200 vlan-group 1
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >