- Table of Contents
-
- 04-Layer 2—LAN Switching Command Reference
- 00-Preface
- 01-MAC address table commands
- 02-Ethernet link aggregation commands
- 03-M-LAG commands
- 04-VLAN commands
- 05-MVRP commands
- 06-VLAN mapping commands
- 07-VLAN termination commands
- 08-Loop detection commands
- 09-Spanning tree commands
- 10-LLDP commands
- 11-PFC commands
- 12-Service loopback group commands
- 13-Cut-through Layer 2 forwarding commands
- Related Documents
-
Title | Size | Download |
---|---|---|
07-VLAN termination commands | 77.52 KB |
VLAN termination commands
second-dot1q
Use second-dot1q to enable QinQ termination on an interface, and specify the Layer 2 VLAN IDs of the VLAN-tagged packets that can be terminated by the interface.
Use undo second-dot1q to disable QinQ termination on an interface.
Syntax
second-dot1q { vlan-id-list | any } [ loose ]
undo second-dot1q { vlan-id-list | any } [ loose ]
Default
QinQ termination is disabled on an interface.
Views
VLAN interface view
Predefined user roles
network-admin
Parameters
vlan-id-list: Specifies a space-separated list of up to 10 Layer 2 VLAN ID items. Each item specifies a Layer 2 VLAN ID or a range of Layer 2 VLAN IDs in the form of vlan-id1 to vlan-id2. The value range for VLAN IDs is 1 to 4094. The value for the vlan-id2 argument must be equal to or greater than the value for the vlan-id1 argument.
any: Specifies all values between 1 and 4094.
loose: Configures the interface to receive and terminate packets that include two or more layers of VLAN tags.
Usage guidelines
When you execute this command, the Layer 1 VLAN ID of VLAN-tagged packets that can be terminated by the interface is the interface number. This Layer 1 VLAN ID is not configurable.
Examples
# Configure VLAN-interface 10 to terminate VLAN-tagged packets with Layer 2 VLAN IDs in the range of 10 to 20. Configure VLAN-interface 12 to terminate VLAN-tagged packets with Layer 2 VLAN ID 100. Configure VLAN-interface 100 to terminate VLAN-tagged packets with any Layer 2 VLAN IDs.
<Sysname> system-view
[Sysname] interface vlan-interface 10
[Sysname-Vlan-interface10] second-dot1q 10 to 20
[Sysname-Vlan-interface10] quit
[Sysname] interface vlan-interface 12
[Sysname-Vlan-interface12] second-dot1q 100
[Sysname-Vlan-interface12] quit
[Sysname] interface vlan-interface 100
[Sysname-Vlan-interface100] second-dot1q any
The following table describes the configuration results:
VLAN interface |
Layer 1 VLAN ID of VLAN-tagged packets that the VLAN interface can terminate |
Layer 2 VLAN IDs of VLAN-tagged packets that the VLAN interface can terminate |
VLAN-interface 10 |
10 |
10–20 |
VLAN-interface 12 |
12 |
100 |
VLAN-interface 100 |
100 |
1–4094 |
vlan-termination broadcast enable
Use vlan-termination broadcast enable to enable an interface to transmit broadcasts and multicasts.
Use undo vlan-termination broadcast enable to disable an interface from transmitting broadcasts and multicasts.
Syntax
vlan-termination broadcast enable
undo vlan-termination broadcast enable
Default
Broadcast and multicast packets are dropped on an interface configured with Dot1q/QinQ termination to terminate packets of multiple VLANs.
Views
Layer 3 Ethernet subinterface view
VLAN interface view
Predefined user roles
network-admin
Usage guidelines
IMPORTANT: This command affects system performance. If system performance is seriously affected by this command, execute the undo form of this command to remove the command configuration. |
To transmit a broadcast or multicast packet, the interface starts a traversal over all the VLAN IDs specified for Dot1q/QinQ termination. It copies the packet and tags each copy with VLAN IDs, until all combinations of VLAN IDs are traversed.
Examples
· Configure HundredGigE 1/0/1.10 to tag a multicast or broadcast packet with each VLAN tag in the range of 10 to 20.
# Enable Dot1q termination on HundredGigE 1/0/1.10 to terminate VLAN-tagged packets with outermost VLAN IDs in the range of 10 to 20.
<Sysname> system-view
[Sysname] interface hundredgige 1/0/1.10
[Sysname-HundredGigE1/0/1.10] vlan-type dot1q vid 10 to 20
# Enable HundredGigE 1/0/1.10 to transmit broadcast and multicast packets.
[Sysname-HundredGigE1/0/1.10] vlan-termination broadcast enable
· Configure HundredGigE 1/0/1.10 to tag a multicast or broadcast packet with each Layer 1 VLAN ID and each Layer 2 VLAN ID. The Layer 1 and Layer 2 VLAN IDs are in the range of 300 to 400 and 500 to 600, respectively.
# Configure HundredGigE 1/0/1.10 to terminate VLAN-tagged packets whose Layer 1 and Layer 2 VLAN IDs are in the range of 300 to 400 and 500 to 600, respectively.
<Sysname> system-view
[Sysname] interface hundredgige 1/0/1.10
[Sysname-HundredGigE1/0/1.10] vlan-type dot1q vid 300 to 400 second-dot1q 500 to 600
# Enable HundredGigE 1/0/1.10 to transmit broadcast and multicast packets.
[Sysname-HundredGigE1/0/1.10] vlan-termination broadcast enable
vlan-termination broadcast ra
Use vlan-termination broadcast ra to enable an interface to transmit router advertisement (RA) multicast packets.
Use undo vlan-termination broadcast ra to disable an interface from transmitting RA multicast packets.
Syntax
vlan-termination broadcast ra
undo vlan-termination broadcast ra
Default
Broadcast and multicast packets are dropped on an interface configured with Dot1q/QinQ termination to terminate packets of multiple VLANs.
Views
Layer 3 Ethernet subinterface view
VLAN interface view
Predefined user roles
network-admin
Usage guidelines
To transmit an RA multicast packet, the interface starts a traversal over all the VLAN IDs specified for Dot1q/QinQ termination. It copies the packet and tags each copy with VLAN IDs, until all combinations of VLAN IDs are traversed.
On an IPv6 network, you must use this command to enable an ambiguous Dot1q or QinQ termination-enabled interface to transmit RA multicast packets. This command prohibits transmission of broadcast packets and other types of multicast packets, and consumes less CPU resources than the vlan-termination broadcast enable command.
Examples
· Configure HundredGigE 1/0/1.10 to tag RA multicast packets with each VLAN tag in the range of 10 to 20.
# Enable Dot1q termination on HundredGigE 1/0/1.10 to terminate VLAN-tagged packets with outermost VLAN IDs in the range of 10 to 20.
<Sysname> system-view
[Sysname] interface hundredgige 1/0/1.10
[Sysname-HundredGigE1/0/1.10] vlan-type dot1q vid 10 to 20
# Enable HundredGigE 1/0/1.10 to transmit RA multicast packets.
[Sysname-HundredGigE1/0/1.10] vlan-termination broadcast ra
· Configure HundredGigE 1/0/1.10 to tag RA multicast packets with each Layer 1 VLAN ID and each Layer 2 VLAN ID. The Layer 1 and Layer 2 VLAN IDs are in the range of 300 to 400 and 500 to 600, respectively.
# Configure HundredGigE 1/0/1.10 to terminate VLAN-tagged packets whose Layer 1 and Layer 2 VLAN IDs are in the range of 300 to 400 and 500 to 600, respectively.
<Sysname> system-view
[Sysname] interface hundredgige 1/0/1.10
[Sysname-HundredGigE1/0/1.10] vlan-type dot1q vid 300 to 400 second-dot1q 500 to 600
# Enable HundredGigE 1/0/1.10 to transmit RA multicast packets.
[Sysname-HundredGigE1/0/1.10] vlan-termination broadcast ra
vlan-termination mode
Use vlan-termination mode to configure the VLAN termination mode for subinterfaces.
Use undo vlan-termination mode to restore the default.
Syntax
vlan-termination mode { auto | custom }
undo vlan-termination mode
Default
By default, the VLAN termination mode for subinterfaces is automatic.
Views
System view
Predefined user roles
network-admin
Parameters
auto: Specifies automatic termination mode. In this mode, a newly created subinterface automatically terminates the packets whose outermost VLAN ID is the same as the subinterface number. In addition, you cannot configure VLAN termination on subinterfaces.
custom: Specifies customized termination mode. In this mode, you must configure VLAN termination on a newly created subinterface for it to terminate VLAN-tagged packets.
Usage guidelines
Delete all existing subinterfaces before you switch the VLAN termination mode for subinterfaces.
Examples
# Set the VLAN termination mode for subinterfaces to customized.
<Sysname> system-view
[Sysname] vlan-termination mode custom
Related commands
vlan-type dot1q default
vlan-type dot1q untagged
vlan-type dot1q vid
vlan-type dot1q vid second-dot1q
vlan-type dot1q untagged
Use vlan-type dot1q untagged to enable untagged termination on a subinterface.
Use undo vlan-type dot1q untagged to disable untagged termination on a subinterface.
Syntax
vlan-type dot1q untagged
undo vlan-type dot1q untagged
Default
Untagged termination is disabled on a subinterface.
Views
Layer 3 Ethernet subinterface view
Predefined user roles
network-admin
Usage guidelines
This command enables the subinterface to process untagged packets.
On a main interface, you can execute this command only on one subinterface.
Examples
# Enable untagged termination on HundredGigE 1/0/1.1.
<Sysname> system-view
[Sysname] interface hundredgige 1/0/1.1
[Sysname-HundredGigE1/0/1.1] vlan-type dot1q untagged
[Sysname-HundredGigE1/0/1.1] quit
vlan-type dot1q vid
Use vlan-type dot1q vid to enable Dot1q termination on a subinterface, and specify the outermost VLAN IDs in the VLAN-tagged packets that can be terminated by the subinterface.
Use undo vlan-type dot1q vid to disable Dot1q termination on a subinterface.
Syntax
vlan-type dot1q vid vlan-id-list
undo vlan-type dot1q vid vlan-id-list
Default
Dot1q termination is disabled on a subinterface.
Views
Layer 3 Ethernet subinterface view
Predefined user roles
network-admin
Parameters
vlan-id-list: Specifies a space-separated list of up to 10 outermost VLAN ID items. Each item specifies an outermost VLAN ID or a range of outermost VLAN IDs in the form of vlan-id1 to vlan-id2. The value range for VLAN IDs is 1 to 4094. The value for the vlan-id2 argument must be equal to or greater than the value for the vlan-id1 argument.
Usage guidelines
The outermost VLAN ID ranges specified by the vlan-id-list argument for different subinterfaces of a main interface cannot overlap.
Examples
# Configure HundredGigE 1/0/1.1 to terminate VLAN-tagged packets with outermost VLAN IDs in the range of 2 to 100.
<Sysname> system-view
[Sysname] interface hundredgige 1/0/1.1
[Sysname-HundredGigE1/0/1.1] vlan-type dot1q vid 2 to 100
# Configure HundredGigE 1/0/1.2 to terminate VLAN-tagged packets whose outermost VLAN ID is 3.
[Sysname] interface hundredgige 1/0/1.2
[Sysname-HundredGigE1/0/1.2] vlan-type dot1q vid 3
The following table describes the configuration results:
Subinterface |
Outermost VLAN ID of packets that can be terminated |
Whether packets to be terminated include more than one layer of VLAN tags |
HundredGigE 1/0/1.2 |
3 |
No |
vlan-type dot1q vid second-dot1q
Use vlan-type dot1q vid second-dot1q to enable QinQ termination on a subinterface, and specify the Layer 1 VLAN ID and Layer 2 VLAN ID range of VLAN-tagged packets that can be terminated by the subinterface.
Use undo vlan-type dot1q vid second-dot1q to disable QinQ termination on a subinterface.
Syntax
vlan-type dot1q vid vlan-id second-dot1q { vlan-id-list | any }
undo vlan-type dot1q vid vlan-id second-dot1q { vlan-id-list | any }
Default
QinQ termination is disabled on a subinterface.
Views
Layer 3 Ethernet subinterface view
Predefined user roles
network-admin
Parameters
vlan-id-list: Specifies a space-separated list of up to 10 VLAN ID items. Each item specifies a VLAN ID or a range of VLAN IDs in the form of vlan-id1 to vlan-id2. The value range for VLAN IDs is 1 to 4094. The value for the vlan-id2 argument must be equal to or greater than the value for the vlan-id1 argument.
any: Specifies all values between 1 and 4094.
Usage guidelines
When you enable QinQ termination on multiple subinterfaces of the same main interface, specify different Layer 2 VLAN IDs for the subinterfaces.
To modify the QinQ termination settings on a subinterface, perform the following tasks:
1. Execute the undo vlan-type dot1q vid second-dot1q command to delete the existing QinQ termination settings.
2. Configure QinQ termination again.
Examples
# Enable QinQ termination on the Layer 3 Ethernet subinterfaces, and configure each subinterface to terminate VLAN-tagged packets with the specified Layer 1 and Layer 2 VLAN IDs.
· Configure HundredGigE 1/0/1.1 to terminate VLAN-tagged packets whose Layer 1 and Layer 2 VLAN IDs are both 100.
<Sysname> system-view
[Sysname] interface hundredgige 1/0/1.1
[Sysname-HundredGigE1/0/1.1] vlan-type dot1q vid 100 second-dot1q 100
[Sysname-HundredGigE1/0/1.1] quit
· Configure HundredGigE 1/0/1.2 to terminate VLAN-tagged packets with Layer 1 VLAN ID 100 and Layer 2 VLAN IDs in the range of 200 to 300.
[Sysname] interface hundredgige 1/0/1.2
[Sysname-HundredGigE1/0/1.2] vlan-type dot1q vid 100 second-dot1q 200 to 300
[Sysname-HundredGigE1/0/1.2] quit
· Configure HundredGigE 1/0/1.3 to terminate VLAN-tagged packets whose Layer 1 VLAN ID is 200 and Layer 2 VLAN ID is in the range of 500 to 600.
[Sysname] interface hundredgige 1/0/1.3
[Sysname-HundredGigE1/0/1.3] vlan-type dot1q vid 200 second-dot1q 500 to 600
[Sysname-HundredGigE1/0/1.3] quit
The following table describes the configuration results:
Layer 3 Ethernet subinterface |
Layer 1 VLAN IDs of VLAN-tagged packets that the subinterface can terminate |
Layer 2 VLAN IDs of VLAN-tagged packets that the subinterface can terminate |
HundredGigE 1/0/1.1 |
100 |
100 |
HundredGigE 1/0/1.2 |
100 |
200–300 |
HundredGigE 1/0/1.3 |
200 |
500–600 |
# Configure HundredGigE 1/0/1.2 to terminate VLAN-tagged packets whose Layer 1 and Layer 2 VLAN IDs are both 20.
<Sysname> system-view
[Sysname] interface hundredgige 1/0/1.2
[Sysname-HundredGigE1/0/1.2] vlan-type dot1q vid 20 second-dot1q 20
[Sysname-HundredGigE1/0/1.2] quit
The following table describes the configuration results:
Subinterface |
Layer 1 VLAN IDs of VLAN-tagged packets that the subinterface can terminate |
Layer 2 VLAN IDs of VLAN-tagged packets that the subinterface can terminate |
Whether the packets to be terminated include two or more layers of VLAN tags |
HundredGigE 1/0/1.2 |
20 |
20 |
No |