26.10.2 Configuring VLAN as Layer 3 Interfaces
- Points to note
-
VLANs can be used as Layer 3 interfaces by setting an IP address. Various Layer 3 functionality settings can be performed by the interface vlan command and in the VLAN interface configuration mode.
The following describes an example of setting an IPv4 address for a VLAN interface. For details about the Layer 3 functionality that can be set for a VLAN interface, see the chapter for the respective functionality used.
Command examples
-
(config)# interface vlan 10
Switches to the VLAN interface configuration mode for VLAN 10. If the VLAN ID specified for the interface vlan command is not yet set, a port VLAN is automatically created and set using the vlan command.
-
(config-if)# ip address 192.168.1.1 255.255.255.0
Sets the IPv4 address 192.168.1.1 and the subnet mask 255.255.255.0 for VLAN 10.