vlan-type dot1q

Function

The vlan-type dot1q command binds an Ethernet sub-interface to a VLAN and configures Dot1q VLAN encapsulation for the Ethernet sub-interface.

The undo vlan-type dot1q command removes the binding between the Ethernet sub-interface and VLAN.

By default, Dot1q VLAN encapsulation is not configured on Ethernet sub-interfaces, and Ethernet sub-interfaces are not bound to a VLAN.

Format

vlan-type dot1q vlan-id

undo vlan-type dot1q vlan-id

Parameters

Parameter Description Value
vlan-id

Specifies the ID of the VLAN bound to an Ethernet sub-interface.

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, Physical FlexE subInterface 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

When Layer 3 and Layer 2 devices are directly connected through Ethernet interfaces and the Ethernet interface connecting the Layer 2 device to the Layer 3 device is added to a VLAN, you need to run the vlan-type dot1q command to bind the Ethernet sub-interface on the Layer 3 device to the VLAN and configures Dot1q VLAN encapsulation for the Ethernet sub-interface. This ensures that the two devices properly communicate with each other.

Prerequisites

Before running the vlan-type dot1q command in a VE sub-interface view or global VE sub-interface view, the interface on which the sub-interface is to be created must have been bound to a VE-Group.

Precautions

Sub-interfaces of different interfaces can be bound to the same VLAN, but sub-interfaces of the same interface cannot be bound to the same VLAN. One Ethernet sub-interface can be associated with only one VLAN.<br /> If user packets are configured to carry double VLAN tags using the user-vlan { { start-vlan-id [ end-vlan-id ] [ qinq start-pe-vlan [ end-pe-vlan ] ] } | any-other } command, either of the following situations occurs:

  • The outer VLAN ID is the same as the VLAN ID associated with the dot1q sub-interface configured using the vlan-type dot1q command on the same main interface.
  • The outer VLAN ID is the same as the VLAN ID terminated by another dot1q VLAN tag termination sub-interface on the same main interface when the sub-interface accesses the Layer 2 network.

In the preceding two scenarios, BAS users cannot go online. To resolve this problem, run the vlan-miss to-cpu enable command to enable the device to send BAS service packets carrying double VLAN tags to the CPU. After this command is run, BAS users can go online.

Example

# Configure the VLAN encapsulation mode as Dot1q on GE 0/1/8.1 and bind GE 0/1/8.1 with VLAN 60.
<HUAWEI> system-view
[~HUAWEI] interface GigabitEthernet0/1/8.1
[*HUAWEI-GigabitEthernet0/1/8.1] vlan-type dot1q 60
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic