VLAN termination commands -- dot1q ethernet-type

| NOTE: Support for this command and its views depends on the device model.

Use dot1q ethernet-type to set the TPID value in the outermost VLAN tag of packets received and sent by an interface.

Use undo dot1q ethernet-type to restore the default.

Syntax

dot1q ethernet-type hex-value

undo dot1q ethernet-type

Default

The TPID value for the outermost VLAN tag of a VLAN-tagged packet received and sent by the interface is 0x8100.

Views

Layer 3 aggregate/Ethernet/VE interface view

L3VE interface view

VLAN interface view

Predefined user roles

network-admin

mdc-admin

Parameters

hex-value: Sets a hexadecimal TPID value in the range of 1 to ffff, excluding the common protocol type values listed in Table 1.

Table 1 Common protocol type values

Protocol | Value
ARP | 0x0806
PUP | 0x0200
RARP | 0x8035
IP | 0x0800
IPv6 | 0x86DD
PPPoE | 0x8863/0x8864
MPLS | 0x8847/0x8848
IPX/SPX | 0x8137
IS-IS | 0x8000
LACP | 0x8809
LLDP | 0x88CC
802.1X | 0x888E
802.1ag | 0x8902
Cluster | 0x88A7
Reserved on the device | 0xFFFD/0xFFFE/0xFFFF

Usage guidelines

After you execute this command, only packets whose TPID in the outermost VLAN tag is 0x8100 or the configured value are processed as VLAN-tagged packets.

When sending a packet, the interface sets the TPID value in the outermost VLAN tag to the configured value. If the packet includes two or more layers of VLAN tags, the interface sets the TPID values in the other VLAN tags to 0x8100.

Do not use this command in subinterface view.

Configurations made in the following interface views take effect on all subinterfaces:

· Layer 3 Ethernet interface view.

· Layer 3 aggregate interface view.

· Layer 3 VE interface view.

· L3VE interface view.

Configurations made in VLAN interface view take effect on the VLAN interface.

Examples

# Set the TPID value to 0x9100 in the outermost VLAN tag of VLAN-tagged packets received and sent by the subinterfaces of GigabitEthernet 1/0/1.

<Sysname> system-view

[Sysname] interface gigabitethernet 1/0/1

[Sysname-GigabitEthernet1/0/1] dot1q ethernet-type 9100

VLAN termination commands -- second-dot1q

| NOTE: Support for this command and its views depends on the device model.

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

The default setting varies by device model.

Views

Layer 3 aggregate/Ethernet/VE subinterface view

L3VE subinterface view

VLAN interface view

Predefined user roles

network-admin

mdc-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 GigabitEthernet 1/0/1.10 to terminate VLAN-tagged packets with Layer 2 VLAN IDs in the range of 10 to 20.

<Sysname> system-view

[Sysname] interface gigabitethernet 1/0/1.10

[Sysname-GigabitEthernet1/0/1.10] second-dot1q 10 to 20

[Sysname-GigabitEthernet1/0/1.10] quit

# Configure GigabitEthernet 1/0/1.12 to terminate VLAN-tagged packets with Layer 2 VLAN ID 100.

[Sysname] interface gigabitethernet 1/0/1.12

[Sysname-GigabitEthernet1/0/1.12] second-dot1q 100

[Sysname-GigabitEthernet1/0/1.12] quit

# Configure GigabitEthernet 1/0/1.100 to terminate VLAN-tagged packets with any Layer 2 VLAN IDs.

[Sysname] interface gigabitethernet 1/0/1.100

[Sysname-GigabitEthernet1/0/1.100] second-dot1q any

The following table describes the configuration results:

Layer 3 Ethernet subinterface | Layer 1 VLAN ID of VLAN-tagged packets that the subinterface can terminate | Layer 2 VLAN IDs of VLAN-tagged packets that the subinterface can terminate
GigabitEthernet 1/0/1.10 | 10 | 10–20
GigabitEthernet 1/0/1.12 | 12 | 100
GigabitEthernet 1/0/1.100 | 100 | 1–4094

# Configure VLAN-interface 10 to terminate VLAN-tagged packets with Layer 2 VLAN IDs in the range of 10 to 20.

<Sysname> system-view

[Sysname] interface vlan-interface 10

[Sysname-Vlan-interface10] second-dot1q 10 to 20

[Sysname-Vlan-interface10] quit

# Configure VLAN-interface 12 to terminate VLAN-tagged packets with Layer 2 VLAN ID 100.

[Sysname] interface vlan-interface 12

[Sysname-Vlan-interface12] second-dot1q 100

[Sysname-Vlan-interface12] quit

# Configure VLAN-interface 100 to terminate VLAN-tagged packets with any Layer 2 VLAN IDs.

[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

# Configure Virtual-Ethernet 1.10 to terminate VLAN-tagged packets with Layer 2 VLAN IDs in the range of 10 to 20.

<Sysname> system-view

[Sysname] interface virtual-ethernet 1.10

[Sysname-Virtual-Ethernet1.10] second-dot1q 10 to 20

[Sysname-Virtual-Ethernet1.10] quit

# Configure Virtual-Ethernet 1.20 to terminate VLAN-tagged packets with Layer 2 VLAN ID 100.

[Sysname] interface virtual-ethernet 1.20

[Sysname-Virtual-Ethernet1.20] second-dot1q 100

[Sysname-Virtual-Ethernet1.20] quit

# Configure Virtual-Ethernet 1.100 to terminate VLAN-tagged packets with any Layer 2 VLAN IDs.

[Sysname] interface virtual-ethernet 1.100

[Sysname-Virtual-Ethernet1.100] second-dot1q any

The following table describes the configuration results:

Layer 3 VE subinterface | Layer 1 VLAN ID of VLAN-tagged packets that the Layer 3 VE subinterface can terminate | Layer 2 VLAN IDs of VLAN-tagged packets that the Layer 3 VE subinterface can terminate
Virtual-Ethernet 1.10 | 10 | 10–20
Virtual-Ethernet 1.20 | 20 | 100
Virtual-Ethernet 1.100 | 100 | 1–4094

VLAN termination commands -- vlan-termination broadcast enable

| NOTE: Support for this command and its views depends on the device model.

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

An ambiguous Dot1q or QinQ termination-enabled interface drops broadcast and multicast packets.

Views

Layer 3 aggregate/Ethernet/VE subinterface view

L3VE subinterface view

VLAN interface view

Predefined user roles

network-admin

mdc-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.

Use this command when ambiguous Dot1q or QinQ termination is enabled on an interface.

To transmit a broadcast or multicast packet, the interface starts a traversal over the VLAN IDs specified for ambiguous termination. It copies the packet and tags each copy with a VLAN ID, until all VLAN IDs in the specified range are traversed. For example, when ambiguous QinQ termination is configured, both layers of VLAN ID ranges are traversed.

Examples

· Configure GigabitEthernet 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 GigabitEthernet 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 gigabitethernet 1/0/1.10

[Sysname-GigabitEthernet1/0/1.10] vlan-type dot1q vid 10 to 20

# Enable GigabitEthernet 1/0/1.10 to transmit broadcast and multicast packets.

[Sysname-GigabitEthernet1/0/1.10] vlan-termination broadcast enable

· Configure GigabitEthernet 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 GigabitEthernet 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 gigabitethernet 1/0/1.10

[Sysname-GigabitEthernet1/0/1.10] vlan-type dot1q vid 300 to 400 second-dot1q 500 to 600

# Enable GigabitEthernet 1/0/1.10 to transmit broadcast and multicast packets.

[Sysname-GigabitEthernet1/0/1.10] vlan-termination broadcast enable

· Configure VLAN-interface 10 to tag a multicast or broadcast packet with two layers of VLAN IDs. The Layer 1 VLAN ID is 10. The Layer 2 VLAN ID is each VLAN ID in the range of 10 to 20.

# Configure VLAN-interface 10 to terminate VLAN-tagged packets with Layer 2 VLAN IDs in the range of 10 to 20.

<Sysname> system-view

[Sysname] interface vlan-interface 10

[Sysname-Vlan-interface10] second-dot1q 10 to 20

# Enable VLAN-interface 10 to transmit broadcast and multicast packets.

[Sysname-Vlan-interface10] vlan-termination broadcast enable

· Configure Virtual-Ethernet 1.10 to tag a multicast or broadcast packet with each VLAN ID in the range of 10 to 20.

# Configure Virtual-Ethernet 1.10 to terminate VLAN-tagged packets with outermost VLAN IDs in the range of 10 to 20.

<Sysname> system-view

[Sysname] interface virtual-ethernet 1.10

[Sysname-Virtual-Ethernet1.10] vlan-type dot1q vid 10 to 20

# Configure Virtual-Ethernet 1.10 to transmit broadcast and multicast packets.

[Sysname-Virtual-Ethernet1.10] vlan-termination broadcast enable

VLAN termination commands -- vlan-termination broadcast ra

| NOTE: Support for this command and its views depends on the device model.

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

An ambiguous Dot1q or QinQ termination-enabled interface drops broadcast and multicast packets.

Views

Layer 3 aggregate/Ethernet/VE subinterface view

L3VE subinterface view

VLAN interface view

Predefined user roles

network-admin

mdc-admin

Usage guidelines

To transmit an RA multicast packet, the interface starts a traversal over the VLAN IDs specified for ambiguous termination. It copies the packet and tags each copy with a VLAN ID, until all VLAN IDs in the specified range are traversed. For example, when ambiguous QinQ termination is configured, both layers of VLAN ID ranges are traversed.

As a best practice, use this command to enable an ambiguous Dot1q or QinQ termination-enabled interface to transmit RA multicast packets on an IPv6 network. 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 GigabitEthernet 1/0/1.10 to tag RA multicast packets with each VLAN tag in the range of 10 to 20.

# Enable Dot1q termination on GigabitEthernet 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 gigabitethernet 1/0/1.10

[Sysname-GigabitEthernet1/0/1.10] vlan-type dot1q vid 10 to 20

# Enable GigabitEthernet 1/0/1.10 to transmit RA multicast packets.

[Sysname-GigabitEthernet1/0/1.10] vlan-termination broadcast ra

· Configure GigabitEthernet 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 GigabitEthernet 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 gigabitethernet 1/0/1.10

[Sysname-GigabitEthernet1/0/1.10] vlan-type dot1q vid 300 to 400 second-dot1q 500 to 600

# Enable GigabitEthernet 1/0/1.10 to transmit RA multicast packets.

[Sysname-GigabitEthernet1/0/1.10] vlan-termination broadcast ra

· Configure VLAN-interface 10 to tag RA multicast packets with two layers of VLAN IDs. The Layer 1 VLAN ID is 10. The Layer 2 VLAN ID is each VLAN ID in the range of 10 to 20.

# Configure VLAN-interface 10 to terminate VLAN-tagged packets with Layer 2 VLAN IDs in the range of 10 to 20.

<Sysname> system-view

[Sysname] interface vlan-interface 10

[Sysname-Vlan-interface10] second-dot1q 10 to 20

# Enable VLAN-interface 10 to transmit RA multicast packets.

[Sysname-Vlan-interface10] vlan-termination broadcast ra

VLAN termination commands -- vlan-type dot1q default

| NOTE: Support for this command and its views depends on the device model.

Use vlan-type dot1q default to enable default termination on a subinterface.

Use undo vlan-type dot1q default to disable default termination on a subinterface.

Syntax

vlan-type dot1q default

undo vlan-type dot1q default

Default

The default setting varies by device model.

Views

Layer 3 aggregate/Ethernet/VE subinterface view

L3VE subinterface view

Predefined user roles

network-admin

mdc-admin

Usage guidelines

This command enables the subinterface to process packets that cannot be terminated by other subinterfaces on the same main interface.

Examples

# Enable default termination on GigabitEthernet 1/0/1.1.

<Sysname> system-view

[Sysname] interface gigabitethernet 1/0/1.1

[Sysname-GigabitEthernet1/0/1.1] vlan-type dot1q default

[Sysname-GigabitEthernet1/0/1.1] quit

VLAN termination commands -- vlan-type dot1q untagged

| NOTE: Support for this command and its views depends on the device model.

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

The default setting varies by device model.

Views

Layer 3 aggregate/Ethernet/VE subinterface view

L3VE subinterface view

Predefined user roles

network-admin

mdc-admin

Usage guidelines

This command enables the subinterface to process untagged packets.

Examples

# Enable untagged termination on GigabitEthernet 1/0/1.1.

<Sysname> system-view

[Sysname] interface gigabitethernet 1/0/1.1

[Sysname-GigabitEthernet1/0/1.1] vlan-type dot1q untagged

[Sysname-GigabitEthernet1/0/1.1] quit

VLAN termination commands -- vlan-type dot1q vid

| NOTE: Support for this command and its views depends on the device model.

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 [ loose ]

undo vlan-type dot1q vid vlan-id-list [ loose ]

Default

The default setting varies by device model.

Views

Layer 3 aggregate/Ethernet/VE subinterface view

L2VE/L3VE subinterface view

Predefined user roles

network-admin

mdc-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.

loose: Configures the subinterface to terminate packets that include one or more layers of VLAN tags. Support for this keyword depends on the device model.

Usage guidelines

You cannot configure multiple subinterfaces under an Ethernet interface to terminate VLAN-tagged packets from the same VLAN. The VLAN ID ranges specified by the vlan-id-list argument for different subinterfaces cannot overlap.

Examples

# Configure GigabitEthernet 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 gigabitethernet 1/0/1.1

[Sysname-GigabitEthernet1/0/1.1] vlan-type dot1q vid 2 to 100

# Configure Virtual-Ethernet 1.1 to terminate VLAN-tagged packets with outermost VLAN IDs in the range of 2 to 100.

<Sysname> system-view

[Sysname] interface virtual-ethernet 1.1

[Sysname-Virtual-Ethernet1.1] vlan-type dot1q vid 2 to 100

# Configure GigabitEthernet 1/0/1.1 to terminate VLAN-tagged packets that include one or more layers of VLAN tags with the outermost VLAN ID 2.

<Sysname> system-view

[Sysname] interface gigabitethernet 1/0/1.1

[Sysname-GigabitEthernet1/0/1.1] vlan-type dot1q vid 2 loose

# Configure GigabitEthernet 1/0/1.2 to terminate VLAN-tagged packets whose outermost VLAN ID is 3.

[Sysname] interface gigabitethernet 1/0/1.2

[Sysname-GigabitEthernet1/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
GigabitEthernet 1/0/1.1 | 2 | Yes
GigabitEthernet 1/0/1.2 | 3 | No

VLAN termination commands -- vlan-type dot1q vid second-dot1q

| NOTE: Support for this command and its views depends on the device model.

Use vlan-type dot1q vid second-dot1q to enable QinQ termination on a subinterface, and specify the outermost two layers of VLAN IDs 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-list second-dot1q { vlan-id-list | any } [ loose ]

undo vlan-type dot1q vid vlan-id-list second-dot1q { vlan-id-list | any } [ loose ]

Default

The default setting varies by device model.

Views

Layer 3 aggregate/Ethernet/VE subinterface view

L3VE subinterface view

Predefined user roles

network-admin

mdc-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.

loose: Configures the subinterface to receive and terminate packets that include two or more layers of VLAN tags.

Usage guidelines

Two subinterfaces of the same Ethernet interface cannot terminate packets that include the same two layers of VLAN IDs. If you configure the subinterfaces to terminate the same Layer 1 VLAN ID, make sure their Layer 2 VLAN ID ranges do not overlap. If you specify both any and vlan-id-list as the respective Layer 2 VLAN ID ranges of the subinterfaces, the any keyword does not include the VLAN IDs specified by vlan-id-list.

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 GigabitEthernet 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 gigabitethernet 1/0/1.1

[Sysname-GigabitEthernet1/0/1.1] vlan-type dot1q vid 100 second-dot1q 100

[Sysname-GigabitEthernet1/0/1.1] quit

· Configure GigabitEthernet 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 gigabitethernet 1/0/1.2

[Sysname-GigabitEthernet1/0/1.2] vlan-type dot1q vid 100 second-dot1q 200 to 300

[Sysname-GigabitEthernet1/0/1.2] quit

· Configure GigabitEthernet 1/0/1.3 to terminate VLAN-tagged packets whose Layer 1 VLAN ID is 100 and Layer 2 VLAN ID is any value between 1 and 4094.

[Sysname] interface gigabitethernet 1/0/1.3

[Sysname-GigabitEthernet1/0/1.3] vlan-type dot1q vid 100 second-dot1q any

[Sysname-GigabitEthernet1/0/1.3] quit

· Configure GigabitEthernet 1/0/1.4 to terminate VLAN-tagged packets whose Layer 1 VLAN ID is 100 and Layer 2 VLAN ID is in the range of 500 to 600.

[Sysname] interface gigabitethernet 1/0/1.4

[Sysname-GigabitEthernet1/0/1.4] vlan-type dot1q vid 100 second-dot1q 500 to 600

[Sysname-GigabitEthernet1/0/1.4] quit

· Configure GigabitEthernet 1/0/1.5 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 gigabitethernet 1/0/1.5

[Sysname-GigabitEthernet1/0/1.5] vlan-type dot1q vid 200 second-dot1q 500 to 600

[Sysname-GigabitEthernet1/0/1.5] quit

· Configure GigabitEthernet 1/0/1.6 to terminate VLAN-tagged packets whose Layer 1 VLAN ID is in the range of 300 to 400 and Layer 2 VLAN ID is 100.

[Sysname] interface gigabitethernet 1/0/1.6

[Sysname-GigabitEthernet1/0/1.6] vlan-type dot1q vid 300 to 400 second-dot1q 100

[Sysname-GigabitEthernet1/0/1.6] quit

· Configure GigabitEthernet 1/0/1.7 to terminate VLAN-tagged packets whose Layer 1 and Layer 2 IDs are in the range of 300 to 400 and 500 to 600, respectively.

[Sysname] interface gigabitethernet 1/0/1.7

[Sysname-GigabitEthernet1/0/1.7] vlan-type dot1q vid 300 to 400 second-dot1q 500 to 600

[Sysname-GigabitEthernet1/0/1.7] quit

· Configure GigabitEthernet 1/0/1.8 to terminate VLAN-tagged packets with a Layer 1 VLAN ID in the range of 300 to 400 and any Layer 2 VLAN ID.

[Sysname] interface gigabitethernet 1/0/1.8

[Sysname-GigabitEthernet1/0/1.8] vlan-type dot1q vid 300 to 400 second-dot1q any

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
GigabitEthernet 1/0/1.1 | 100 | 100
GigabitEthernet 1/0/1.2 | 100 | 200–300
GigabitEthernet 1/0/1.3 | 100 | 1–99, 101–199, 301–499, and 601–4094
GigabitEthernet 1/0/1.4 | 100 | 500–600
GigabitEthernet 1/0/1.5 | 200 | 500–600
GigabitEthernet 1/0/1.6 | 300–400 | 100
GigabitEthernet 1/0/1.7 | 300–400 | 500–600
GigabitEthernet 1/0/1.8 | 300–400 | 1–99, 101–499, and 601–4094

# Enable QinQ termination on the Layer 3 VE subinterfaces, and configure each subinterface to terminate VLAN-tagged packets with the specified Layer 1 and Layer 2 VLAN IDs.

· Configure Virtual-Ethernet 1.1 to terminate VLAN-tagged packets whose Layer 1 and Layer 2 VLAN ID are both 100.

<Sysname> system-view

[Sysname] interface virtual-ethernet 1.1

[Sysname-Virtual-Ethernet1.1] vlan-type dot1q vid 100 second-dot1q 100

[Sysname-Virtual-Ethernet1.1] quit

· Configure Virtual-Ethernet 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 virtual-ethernet 1.2

[Sysname-Virtual-Ethernet1.2] vlan-type dot1q vid 100 second-dot1q 200 to 300

[Sysname-Virtual-Ethernet1.2] quit

· Configure Virtual-Ethernet 1.3 to terminate VLAN-tagged packets whose Layer 1 VLAN ID is 100 and Layer 2 VLAN ID is any value between 1 and 4094.

[Sysname] interface virtual-ethernet 1.3

[Sysname-Virtual-Ethernet1.3] vlan-type dot1q vid 100 second-dot1q any

[Sysname-Virtual-Ethernet1.3] quit

· Configure Virtual-Ethernet 1.4 to terminate VLAN-tagged packets whose Layer 1 VLAN ID is 100 and Layer 2 VLAN ID is in the range of 500 to 600.

[Sysname] interface virtual-ethernet 1.4

[Sysname-Virtual-Ethernet1.4] vlan-type dot1q vid 100 second-dot1q 500 to 600

[Sysname-Virtual-Ethernet1.4] quit

· Configure Virtual-Ethernet 1.5 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 virtual-ethernet 1.5

[Sysname-Virtual-Ethernet1.5] vlan-type dot1q vid 200 second-dot1q 500 to 600

[Sysname-Virtual-Ethernet1.5] quit

· Configure Virtual-Ethernet 1.6 to terminate VLAN-tagged packets whose Layer 1 VLAN ID is in the range of 300 to 400 and Layer 2 VLAN ID is 100.

[Sysname] interface virtual-ethernet 1.6

[Sysname-Virtual-Ethernet1.6] vlan-type dot1q vid 300 to 400 second-dot1q 100

[Sysname-Virtual-Ethernet1.6] quit

· Configure Virtual-Ethernet 1.7 to terminate VLAN-tagged packets whose Layer 1 VLAN ID and Layer 2 ID are in the range of 300 to 400 and 500 to 600, respectively.

[Sysname] interface virtual-ethernet 1.7

[Sysname-Virtual-Ethernet1.7] vlan-type dot1q vid 300 to 400 second-dot1q 500 to 600

[Sysname-Virtual-Ethernet1.7] quit

· Configure Virtual-Ethernet 1.8 to terminate VLAN-tagged packets with a Layer 1 VLAN ID in the range of 300 to 400 and any Layer 2 VLAN ID.

[Sysname] interface virtual-ethernet 1.8

[Sysname-Virtual-Ethernet1.8] vlan-type dot1q vid 300 to 400 second-dot1q any

The following table describes the configuration results:

Layer 3 VE subinterface | Layer 1 VLAN IDs of VLAN-tagged packets that the Layer 3 VE subinterface can terminate | Layer 2 VLAN IDs of VLAN-tagged packets that the Layer 3 VE subinterface can terminate
Virtual-Ethernet 1.1 | 100 | 100
Virtual-Ethernet 1.2 | 100 | 200–300
Virtual-Ethernet 1.3 | 100 | 1–99, 101–199, 301–499, and 601–4094
Virtual-Ethernet 1.4 | 100 | 500–600
Virtual-Ethernet 1.5 | 200 | 500–600
Virtual-Ethernet 1.6 | 300–400 | 100
Virtual-Ethernet 1.7 | 300–400 | 500–600
Virtual-Ethernet 1.8 | 300–400 | 1–99, 101–499, and 601–4094

# Configure GigabitEthernet 1/0/1.1 to terminate VLAN-tagged packets that include two or more layers of VLAN tags, with the Layer 1 VLAN ID 10 and Layer 2 VLAN ID 100.

<Sysname> system-view

[Sysname] interface gigabitethernet 1/0/1.1

[Sysname-GigabitEthernet1/0/1.1] vlan-type dot1q vid 10 second-dot1q 100 loose

[Sysname-GigabitEthernet1/0/1.1] quit

# Configure GigabitEthernet 1/0/1.2 to terminate VLAN-tagged packets whose Layer 1 and Layer 2 VLAN IDs are both 20.

[Sysname] interface gigabitethernet 1/0/1.2

[Sysname-GigabitEthernet1/0/1.2] vlan-type dot1q vid 20 second-dot1q 20

[Sysname-GigabitEthernet1/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
GigabitEthernet 1/0/1.1 | 10 | 100 | Yes
GigabitEthernet 1/0/1.2 | 20 | 20 | No