VLAN Lab Guide For Cisco Switnches
VLAN Lab Guide For Cisco Switnches
Introduction
VLANs (Virtual Local Area Networks) allow you to divide a physical network into multiple
logical networks. This can be useful for a variety of reasons, such as:
Sw1>enable
Sw1# configure terminal
SW1
SW1(config)#vlan 10
SW1(config-vlan)#name Sales
SW1(config-vlan)#exit
SW1(config)#vlan 20
SW1(config-vlan)#name IT
SW1(config-vlan)#exit
SW1(config)#interface e1/0
SW1(config-if)#switchport access vlan 10
SW1(config-if)#exit
SW1(config)#int e1/2
SW1(config-if)#switchport access vlan 20
SW1(config-if)#exit
SW1(config)#
SW1(config)#int e0/3
SW1(config-if)#switchport trunk encapsulation dot1q
SW1(config-if)#switchport mode trunk
The output of the show vlan command will show the two VLANs that you have created.
SW1(config)#interface vlan 20
SW1(config-if)#ip add 173.x.y.20 255.255.255.0
SW1(config-if)#no shutdown
SW1(config-if)#exit
Step 9: Go to your Win-1 and Enable DHCP, then ping this Network
172.16.10.10
Router>enable
Router# configure terminal
Router(config)#hostname R1
R1(config)#interface e0/3
R1(config-if)#no shutdown
R1(config-if)#exit
R1(config)#interface e0/3.10
R1(config-subif)#encapsulation dot1Q 10
R1(config-subif)#ip address 172.x.y.1 255.255.255.0
R1(config-subif)#exit
R1(config)#interface e0/3.20
R1(config-subif)#encapsulation dot1Q 20
R1(config-subif)#ip address 172.x.y.1 255.255.255.0
R1(config-subif)#exit
The output of the show vlan command will show the two VLANs that you have created
Congratulations now you’ve created your first VLAN on SW, do the above steps to the
rest of Switches.