control-vid (sub-interface view)

Function

The control-vid command configures an encapsulation type of a sub-interface.

The undo control-vid command deletes the encapsulation type configured for a sub-interface.

By default, no encapsulation type is configured for a sub-interface.

Format

control-vid vid dot1q-termination [ rt-protocol ]

control-vid vid qinq-termination [ local-switch | rt-protocol ]

undo control-vid

Parameters

Parameter Description Value
vid

Specifies a control VLAN ID.

The vid values configured for sub-interfaces of the same interface can be the same.

This value is saved only for upgrade compatibility.

The value is an integer ranging from 1 to 4094.

dot1q-termination

Configures an encapsulation type of a sub-interface as Dot1q termination.

-

rt-protocol

Indicates a limitation on tags in single-tagged or double-tagged packets when a routing protocol is configured for a termination sub-interface.

  • If rt-protocol is configured and the dot1q termination vid command is used, the sub-interface terminates single-tagged packets, and the tags must be specific VLAN IDs, not VLAN ranges .
  • If rt-protocol is configured and the qinq termination pe-vid ce-vid command is used, the sub-interface terminates double-tagged packets, and both inner and outer tags must be specific VLAN IDs, not VLAN ranges.

-

qinq-termination

Configures an encapsulation type of a sub-interface as QinQ termination.

-

local-switch

Specifies that a sub-interface for QinQ VLAN tag termination supports the local switching function.

If a sub-interface for QinQ VLAN tag termination has been configured to access an L2VPN in symmetry mode using the qinq termination l2 symmetry command, do not specify local-switch in the control-vid command. If you specify local-switch, an error message is displayed.

If local-switch is not specified, the sub-interface does not support local switching.

-

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

Default Level

2: Configuration level

Task Name and Operations

Task Name Operations
ethernet write

Usage Guidelines

Usage Scenario

Before you configure a sub-interface for Dot1q VLAN tag termination (using the dot1q termination vid command) or for QinQ VLAN tag termination using the qinq termination pe-vid ce-vid command or other functions on a sub-interface, run the control-vid command to configure an encapsulation type for the sub-interface.

Configuration Impact

If local-switch is specified, the device connected to the sub-interface must be disabled from MAC address learning, and the MAC address table on the device must be cleared. Otherwise, two interfaces on the device will learn the same MAC address, causing incorrect packet forwarding.

Follow-up Procedure

After this command is run with dot1q-termination, run the dot1q termination vid command in the sub-interface view to configure a sub-interface for Dot1q VLAN tag termination.

After this command is run with qinq-termination, run the qinq termination pe-vid ce-vid command in the sub-interface view to configure a sub-interface for QinQ VLAN tag termination.

After the sub-interface for Dot1q or QinQ VLAN tag termination is configured, you can configure IP, multicast, and virtual private network (VPN) services on the sub-interface.

Example

# Configure GE 0/1/1.1 as a sub-interface for Dot1q VLAN tag termination.
<HUAWEI> system-view
[~HUAWEI] interface GigabitEthernet0/1/1.1
[*HUAWEI-GigabitEthernet0/1/1.1] control-vid 1 dot1q-termination rt-protocol
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >