protocol-vlan
Syntax
protocol-vlan [ protocol-index ] { at | ipv4 | ipv6 | ipx ethernetii | mode { ethernetii etype etype-id | snap etype etype-id } }
undo protocol-vlan { protocol-index [ to protocol-end ] | all }
View
VLAN view
Default level
2: System level
Parameters
at: Specifies the AppleTalk based VLAN.
ipv4: Specifies the IPv4 based VLAN.
ipv6: Specifies the IPv6 based VLAN.
ipx ethernetii: Specifies the IPX based VLAN..
mode: Configures a user-defined protocol template for the VLAN, which could also have the following encapsulation formats: ethernetii and snap.
ethernetii etype etype-id: Matches Ethernet II encapsulation format and the corresponding protocol type values. The etype-id argument is the protocol type ID of inbound packets, in the range of 0x0600 to 0xFFFF (excluding 0x0800, 0x809B, 0x8137, and 0x86DD).
snap etype etype-id: Matches SNAP encapsulation format and the corresponding protocol type values. The etype-id argument is the Ethernet type of inbound packets, in the range of 0x0600 to 0xFFFF (excluding 0x8137).
protocol-index: Specifies a protocol template index, in the range of 0 to 15. The system will automatically assign an index if this parameter is not specified.
to protocol-end: Specifies the end protocol index, in the range of 0 to 15. The protocol-end argument must be greater than or equal to the protocol-index argument.
all: Removes all the protocols bound to the VLAN.
Description
Use protocol-vlan to configure the VLAN as a protocol based VLAN and configure the protocol template for the VLAN.
Use undo protocol-vlan to remove the configured protocol template.
By default, no VLAN is bound to any protocol template.
When you use the mode keyword to configure a user-defined protocol template, do not set etype-id in ethernetii etype etype-id to 0x0800, 0x809B, 0x8137, or 0x86DD. Otherwise, the encapsulation format of the matching packets will be the same as that of the IPv4, AppleTalk, IPX, and IPv6 packets, respectively.
When you use the mode keyword to configure a user-defined protocol template, do not set etype-id in snap etype etype-id to 0x8137. Otherwise, the template format will be the same as that of the IPX protocol. You can set etype-id to 0x0800, 0x809B, or 0x86DD, corresponding to IPv4, AppleTalk, and IPv6, respectively.
Related commands: display protocol-vlan vlan.
Examples
CAUTION: IP uses ARP for address resolution in Ethernet. To prevent communication failure, configure the IP and ARP templates in the same VLAN and associate them with the same port. | ||
# Configure VLAN 3 as an IPv4 based VLAN.
<Sysname> system-view [Sysname] vlan 3 [Sysname-vlan3] protocol-vlan ipv4
# Create an ARP protocol template for VLAN 3 (ARP code is 0x0806) to make VLAN 3 transmit ARP packets.
To use Ethernet encapsulation, use this command:
[Sysname-vlan3] protocol-vlan mode ethernetii etype 0806
To use 802.3 encapsulation, use this command:
[Sysname-vlan3] protocol-vlan mode snap etype 0806