dot1q termination vid

Function

The dot1q termination vid command enables VLAN tag termination for single-tagged packets.

The undo dot1q termination vid command disables VLAN tag termination for single-tagged packets.

By default, VLAN tag termination for single-tagged packets is disabled on a sub-interface.

Format

dot1q termination vid low-pe-vid [ to high-pe-vid ] [ vlan-group group-id ]

undo dot1q termination vid low-pe-vid [ to high-pe-vid ] [ vlan-group group-id ]

Parameters

Parameter Description Value
to high-pe-vid

Specifies the end VLAN ID in user packets.

The high-pe-vid value must be greater than the low-pe-vid value.

The value is an integer ranging from 1 to 4094.

vlan-group group-id

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

Statistics about Dot1q packets are collected based on VLAN groups. To collect statistics about Dot1q packets, specify vlan-group in the dot1q termination 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.

vid low-pe-vid

Specifies the start VLAN ID in user packets.

The value is an integer ranging from 1 to 4094.

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 device
  • Layer 3 Ethernet sub-interfaces on device

    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 the single tag carried in a Dot1q packet.

    To configure Dot1q termination, run the dot1q termination vid command in the sub-interface view.
  • QinQ termination, which terminates the double tags carried in a QinQ packet.To configure QinQ termination, run the qinq termination pe-vid ce-vid command in the sub-interface view.E4

Prerequisites

The encapsulation type of the sub-interface has been configured as Dot1q termination using the encapsulation dot1q-termination command in the sub-interface view.

The encapsulation dot1q-termination command is replaced by the control-vid dot1q-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 the VLAN information carried in the packet received from the peer end into the packet for forwarding.

    The VLAN IDs in the tags of user packets received by the sub-interface must be in the range of low-pe-vid [ to high-pe-vid ] specified in the dot1q termination vid command. Otherwise, the packets are dropped.

    If the dot1q termination vid command is run more than once, all configurations take effect.

Precautions

Each time after you run the dot1q termination vid command, you are advised to run the commit command. If you do not run the commit command, traffic may be interrupted.

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.

Example

# Configure dot1q termination for VLAN-group 1 on GE 0/1/1.1, with VLAN IDs in the outer VLAN tags being in the range of 100 to 200.
<HUAWEI> system-view
[~HUAWEI] interface GigabitEthernet0/1/1.1
[*HUAWEI-GigabitEthernet0/1/1.1] encapsulation dot1q-termination
[*HUAWEI-GigabitEthernet0/1/1.1] vlan-group 1
[*HUAWEI-GigabitEthernet0/1/1.1-vlangroup1] quit
[*HUAWEI-GigabitEthernet0/1/1.1] dot1q termination vid 100 to 200 vlan-group 1
# Configure Dot1q termination on GE 0/1/1.1, specify the VLAN range in the outer tag of user packets to be 100 to 200, 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 dot1q-termination
[*HUAWEI-GigabitEthernet0/1/1.1] vlan-group 1
[*HUAWEI-GigabitEthernet0/1/1.1-vlangroup1] quit
[*HUAWEI-GigabitEthernet0/1/1.1] dot1q termination vid 100 to 200 vlan-group 1
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >