< Home

protocol-vlan vlan

Function

The protocol-vlan vlan command associates an interface with a protocol-based VLAN.

The undo protocol-vlan vlan command disassociates an interface from a VLAN.

By default, an interface is not associated with any protocol-based VLAN.

Format

protocol-vlan vlan vlan-id { all | protocol-index1 [ to protocol-index2 ] } [ priority priority ]

undo protocol-vlan { all | vlan vlan-id { all | protocol-index1 [ to protocol-index2 ] } }

Parameters

Parameter

Description

Value

all

The all keywords in the command have different meanings:
  • The one followed by protocol-index1 indicates all protocols.
  • The one followed by vlan indicates all protocol-based VLANs.

-

vlan vlan-id

Specifies the ID of a protocol-based VLAN.

The value is an integer that ranges from 1 to 4094.

protocol-index1 [ to protocol-index2 ]

Specifies the start protocol index. If no protocol index is set, the switch generates an index based on the order in which protocols were associated with a VLAN.

The value range varies according to the device type.
  • S2720-EI, S5720I-SI, S5720-LI, S5720S-LI, S5720S-SI, S5720-SI, S5730S-EI, S5730-SI, S6720-LI, S6720S-LI, S6720S-SI, and S6720-SI: 0 to 11
  • S5735-L, S5735S-L, S5735S-L-M, S5735-S, S5735-S-I, and S5735S-S: 0 to 7
  • other models: 0 to 15

The value of protocol-index2 must be greater than or equal to the value of protocol-index1.

priority priority

Specifies the 802.1p priority of a VLAN.

The value is an integer that ranges from 0 to 7. A larger value indicates a higher priority. The default value is 0.

Views

Ethernet interface view, GE interface view, XGE interface view, 40GE interface view, 100GE interface view, MultiGE interface view, Eth-Trunk interface view, port group view, 25GE interface view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

Protocol-based VLAN assignment is a method to associate protocols with VLANs. After a protocol is associated with a VLAN, packets of this protocol are transmitted in the associated VLAN. This function allows different protocol packets to be transmitted on different paths.

After an interface is associated with a protocol-based VLAN:

  • When receiving an untagged packet, the interface searches for the VLAN entry matching the protocol type of the packet. If a matching entry is found, the interface forwards the packet based on the matching VLAN ID and priority. If no matching entry is found, the interface uses other matching rules to forward the packet.
  • When receiving a tagged packet, the interface forwards the packet based on the port-based VLAN configuration.

Prerequisites

The VLAN has been associated with a protocol using the protocol-vlan command.

Precautions

On access and trunk interfaces, protocol-based VLAN assignment can be used only when the protocol-based VLAN is the same as the PVID. It is recommended that protocol-based VLAN assignment be configured on hybrid interfaces.

After an interface is associated with a protocol-based VLAN, the switch checks the protocol type of a received packet and forwards the packet in the VLAN associated with the protocol.

Example

# Associate GE0/0/1 with VLAN 2, which is associated with the protocol with index 0.

<HUAWEI> system-view
[HUAWEI] interface gigabitethernet 0/0/1
[HUAWEI-GigabitEthernet0/0/1] port link-type hybrid
[HUAWEI-GigabitEthernet0/0/1] protocol-vlan vlan 2 0
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >