Configure VLAN on cisco switches
VLAN stands for virtual LAN and technically we can say, a VLAN is a broadcast domain created by switch. When managing a switch, the management domain is always VLAN 1, the default VLAN. All ports of switch are assigned to VLAN 1 by default.
Any member of VLAN 2 can not talk with any member of VLAN 3 without router but all the members of VLAN 2 and VLAN 3 can talk with other members within their VLANs.
Configuring of VLAN is as follow:
Configuration to create VLAN 2
First we enter the configuartion mode
SwitchA(config)#configure terminal
Define VLAN
SwitchA(config)#vlan 2
Assign name to the VLAN2
SwitchA(config)# vlan 2 name marketing
Exit from VLAN 2
SwitchA(config)# exit
Now configure VLAN 3
SwitchA(config)# configure terminal
Define VLAN
SwitchA(config)#vlan 3
Assign name to VLAN 3
SwitchA(config)# vlan 3 name management
Exit from VLAN 3
SwitchA(config)# exit
Now add port 2 and 3 to VLAN 2 . Following are the commands to add ports.
Add port 2
SwitchA(config)#configure terminal
SwitchA(config)#interface fastethernet 0/2
SwitchA(config-if)#switchport access vlan 2
SwitchA(config-if)#exit
Add port 3
SwitchA(config)#interface fastethernet 0/3
SwitchA(config-if)#switchport access vlan 2
SwitchA(config-if)#exit
Now add port 4 and 5 to VLAN3. Following are the commands
add port 4
SwitchA(config)#configure terminal
SwitchA(config)#interface fastethernet 0/4
SwitchA(config-if)#switchport access vlan 3
SwitchA(config-if)#exit
add port 5
SwitchA(config)#interface fastethernet 0/5
SwitchA(config-if)#switchport access vlan 3
SwitchA(config-if)#exit
To show VLAN interface , run the command show-vlan

Leave a Reply