VLANs allow for the logical grouping of switch interfaces, enabling communication as if all connected devices were on the same isolated network.
(switch(config)#) Create VLAN:
vlan <VLAN>
(switch(config)#) Configure an interface to associate it with a VLAN:
interface ethernet 1/22
(switch(config interface ethernet 1/22)#) From within the interface context, configure the interface mode to “access”:
switchport mode access
(switch(config interface ethernet 1/22)#) From within the interface context, configure the access VLAN membership:
switchport access vlan 6
(switch(config)#) Configure an interface as a trunk port:
interface ethernet 1/35
(switch(config interface ethernet 1/35)#) From within the interface context, configure the interface mode to “trunk”.
switchport mode trunk
(switch#)
show vlan [VLAN]