1-16
protocol-index: Beginning protocol index ranging from 0 to 4. Note that this argument must be less than
or equal to the protocol-end argument. If you do not specify this argument, the beginning protocol index
will be determined by the system.
protocol-index-end: End protocol index ranging from 0 to 4. Note that this argument must be larger than
or equal to the protocol-index argument.
all: Specifies all the protocol indexes.
When you use the mode keyword to configure a user-defined protocol template, if you set the etype-id
argument for Ethernet II or SNAP packets to 0x0800, 0x089B, or 0x8137, the matching packets have
the same format as that of IP, IPX, and AppleTalk packets respectively. To prevent two commands from
processing packets of the same protocol type in different ways, the switch will prompt that you cannot
set the etype-id argument for Ethernet II or SNAP packets to 0x0800, 0x089B, or 0x8137.
Description
Use the protocol-vlan command to configure the protocol template used for classifying protocol-based
VLANs.
Use the undo protocol-vlan command to disable the configuration.
Related command: display protocol-vlan vlan.
Example
# Configure VLAN 3 as a protocol-based VLAN and assign IP packets to VLAN 3 for transmission.
<Sysname> system-view
System View: return to User View with Ctrl+Z.
[Sysname] vlan 3
[Sysname-vlan3] protocol-vlan ip
Because the IP protocol is closely associated with the ARP protocol, you are recommended to
configure the ARP protocol type when configuring the IP protocol type and associate the two protocol
types with the same port, in case that ARP packets and IP packets are not assigned to the same VLAN,
which will cause IP address resolution failure.
# Configure an ARP protocol template. The code for the ARP protocol is 0x0806.
z Perform the following command when Ethernet encapsulation is used.
[Sysname-vlan3] protocol-vlan mode ethernetii etype 0806
z Perform the following configuration when 802.3 encapsulation format is used.
[Sysname-vlan3] protocol-vlan mode snap etype 0806