Vlans stands for virtual Lans means you are dividing users based on function or category.For ex-Vlan10 for Sales department,Vlan20 for Accounts,Vlan30 for Logistics and so on.You can create as many as vlans you want with Cisco switch like 2-1005.An easy way to understand this -Assume an office building with 3 floors with each floor has 5 users.We can then create separate Vlans based on floors like Vlan 10 for floor 1,Vlan 20 for floor 2 and so on.I have name them as Sales,Accounts and Logistics.Separating users with Vlans will create separate Broadcast Domain which you can say a Network area in which users can communicate.Creating 3 Vlans will create three Broadcast domain and user in one Vlan can't communicate with the user in the other Vlan.To provide connectivity between different Vlans,we need a Router (also a Layer 3 device).We are not dividing users physically,its logical division.Its convenient for troubleshooting,administration.To enable communication between these Vlans,we also need to give those Vlans IP addresses which i am going to publish in the coming days.
Steps to create Vlans :
Switch>
Switch>enable
Switch#configure terminal (or conf t)
Switch(config)#vlan 10
Switch(config-vlan)#name sales
Switch(config-vlan)#vlan 20
Switch(config-vlan)#name Accounts
Switch(config-vlan)#vlan 30
Switch(config-vlan)#name Logistics
Switch(config-vlan)#exit
In global configuration mode :
For single host -
Switch(config)#interface fa0/1
Switch(config-if)#switchport mode access
Switch(config-if)#switchport access vlan 10
For multiple hosts-
Switch(config)#interface range fastEthernet 0/1-5
Switch(config-if)#switchport mode access
Switch(config-if)#switchport access vlan 10
Switchport mode access command is used to make that interface an access port so that it can't negotiate trunking which we will cover later.
Steps to create Vlans :
Switch>
Switch>enable
Switch#configure terminal (or conf t)
Switch(config)#vlan 10
Switch(config-vlan)#name sales
Switch(config-vlan)#vlan 20
Switch(config-vlan)#name Accounts
Switch(config-vlan)#vlan 30
Switch(config-vlan)#name Logistics
Switch(config-vlan)#exit
Place hosts to specific vlans :
To place specific hosts into a vlans,we can use interface range fa0/1-5 command if there are more than one users or we can use interface fa0/1 to place a single host to a vlan.In global configuration mode :
For single host -
Switch(config)#interface fa0/1
Switch(config-if)#switchport mode access
Switch(config-if)#switchport access vlan 10
For multiple hosts-
Switch(config)#interface range fastEthernet 0/1-5
Switch(config-if)#switchport mode access
Switch(config-if)#switchport access vlan 10
Switchport mode access command is used to make that interface an access port so that it can't negotiate trunking which we will cover later.
No comments:
Post a Comment