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.
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 ] } }
Parameter |
Description |
Value |
---|---|---|
all |
The all keywords in the command have different meanings:
|
- |
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.
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. |
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
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:
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.