24.6.2 Creating a protocol VLAN
The following explains how to set a protocol VLAN. It provides example settings for Switch 1 shown in the figure below.
Ports 1/0/1 and 1/0/2 configure IPv4 protocol VLAN 10. Ports 1/0/3 and 1/0/4 are set for IPv4 protocol VLAN 20. Port 1/0/4 belongs to both VLAN 20 and IPv6 protocol VLAN 30 at the same time. Port 1/0/5 is the trunk port, and all VLANs are set for it.
|
- <Structure of this section>
(1) Creating a Protocol to Identify VLAN
- Points to note
-
When a protocol VLAN is set, the vlan-protocol command sets the distinguishing protocol before VLAN creation. A protocol name and a protocol value are set for a protocol. Multiple protocol values can be associated with a single name.
Because the IPv4 protocol requires that both an IPv4 Ether-type and ARP Ether-type are specified at the same time, two protocol values are associated with IPv4.
Command examples
-
(config)# vlan-protocol IPV4 ethertype 0800 ethertype 0806
Creates a protocol named IPV4. The IPv4 Ether-type value 0800 and ARP Ether-type value 0806 are associated as protocol values.
Note that protocol judgment for this setting is only for frames in Ethernet V2 format.
-
(config)# vlan-protocol IPV6 ethertype 86dd
Creates a protocol named IPV6. The IPv6 Ether-type value 86DD is associated as the protocol value.
(2) Creating a Protocol VLAN
- Points to note
-
The example below shows how to create a protocol VLAN. When a VLAN is created, a VLAN ID and the protocol-based parameter are specified. The created protocol is specified as the protocol for distinguishing VLANs.
Command examples
-
(config)# vlan 10,20 protocol-based
Creates VLANs 10 and 20 as protocol VLANs. Because VLANs 10 and 20 are used as the same IPv4 protocol VLAN, setting is done in a batch operation. This command switches to VLAN configuration mode.
-
(config-vlan)# protocol IPV4
(config-vlan)# exit
Specifies the created IPv4 protocol as the protocol for distinguishing VLANs 10 and 20.
-
(config)# vlan 30 protocol-based
(config-vlan)# protocol IPV6
Creates VLAN 30 as a protocol VLAN. The created IPv6 protocol is specified as a protocol for distinguishing VLAN 30.
(3) Configuring Protocol Ports
- Points to note
-
The protocol port set as the port for distinguishing VLANs by protocol for protocol VLANs handles untagged frames.
Command examples
-
(config)# interface range gigabitethernet 1/0/1-2
Switches ports 1/0/1 and 1/0/2 to Ethernet interface configuration mode. Because ports 1/0/1 and 1/0/2 use the same configuration, they are specified in a batch operation.
-
(config-if-range)# switchport mode protocol-vlan
(config-if-range)# switchport protocol vlan 10
(config-if-range)# exit
Sets ports 1/0/1 and 1/0/2 as the protocol port. Then, sets VLAN 10.
-
(config)# interface range gigabitethernet 1/0/3-4
(config-if-range)# switchport mode protocol-vlan
(config-if-range)# switchport protocol vlan 20
(config-if-range)# exit
Sets ports 1/0/3 and 1/0/4 as protocol ports. Also, set VLAN 20.
-
(config)# interface gigabitethernet 1/0/4
(config-if)# switchport protocol vlan add 30
Adds VLAN 30 to port 1/0/4. Two types of protocol VLAN, IPv4 and IPv6 are set for port 1/0/4.
- Notes
-
The switchport protocol vlan command does not add to the previous configuration. Instead, it replaces the settings in the specified <vlan id list>. To add and remove VLANs for ports on which protocol VLANs are already running, use the switchport protocol vlan add command and switchport protocol vlan remove command.
(4) Configuring Trunk Ports
- Points to note
-
For protocol VLANs, ports handling tagged frames are set as trunk ports, and VLANs are set for the trunk ports.
Command examples
-
(config)# interface gigabitethernet 1/0/5
Switches to the Ethernet interface configuration mode for ports 1/0/5.
-
(config-if)# switchport mode trunk
(config-if)# switchport trunk allowed vlan 10,20,30
Configure port 1/0/5 as a trunk port. Then, sets VLAN 10, VLAN 20 and VLAN 30.