Creating VLANs in Cisco Switch
For configuration of VLANs we assume that you have basic knowledge of VLANs if you don't have any idea about VLANs then Click Here to get some knowledge about VLANs.
Creating a Voice or Data VLAN
- Configuration of Data and Voice Vlans in Normal Mode
To create a vlan in a cisco switch, First of all access the switch and follow these steps
switch>
switch>en
switch#configure terminal
switch(config)#vlan vlan-id
switch(config-vlan)#name name
switch#exit
Example
switch>en
switch#config t
switch(config)#vlan 3
switch(config vlan)#name my-first-vlan
!name can be any name of your choice like i have choosen "my-first-vlan".
switch(config vlan)#end
Now your vlan with name "my-first-vlan"is created. you can verify it by
switch#show vlan brief
switch#show vlan name my-first-vlan
switch#show vlan id 3
Note: vlan information is stored in vlan.dat file rather than running configuration
- Creating VLAN in VLAN database (used in GNS3)
switch>en
switch(vlan)#vlan database
switch(vlan)#vlan vlan-id name name
switch(vlan)#exit
Example
switch>en
switch(vlan)#vlan database
switch(vlan)#vlan 3 name my-second-vlan
switch(vlan)#exit
Verification switch#show vlan name my-second-vlan
switch#show vlan id 3
switch#show vlan brief
- Configuration of Extended VLAN
switch>en
switch#config t
switch(config)#vtp mode transparent
switch(config)# vlan vlan-id
! vlan-id can be any number from the range of extended vlans i.e. between 1006 - 4096
switch(config vlan)#mtu mtu-size
! mtu-size is optional for extended vlan
switch(config vlan)#end
To verify VLAN information issue the following command
switch#show vlan id vlan-id
Removing a VLAN
Note: on a cisco switch any command is negated or removed by just putting a "no"at the start of that command
a VLAN can be removed in the same way. for example we have created vlan 3. now we are going to remove it so the procedure is
switch>en
switch#config t
switch(config)#no vlan 3
and vlan with id number 3 will be deleted from vlan.dat file
similarly if you want to remove it from vlan database i.e.
switch>en
switch#vlan database
switch (vlan)# no vlan 3
switch (vlan)# exit
switch#show vlan brief
Now you wont see any vlan with id number 3
Associating port with a VLAN
- Port Association to a VLAN
SW1>en
SW1#config t
SW1(config)# interface fa 0/0
SW1(config if)# switchport mode access
SW1(config if)#switchport access vlan 3
SW1(config if)#end
SW1#show vlan brief
you will see interface fa 0/0 listed infront of vlan 3. It means that not this interface fa 0/0 is in vlan 3.
for more details click here
No comments:
Post a Comment
We’re eager to see your comment. However, use of any abusive language is strictly prohibited . All the abusive words and posts will be deleted and Please Keep in mind that all comments are moderated manually by our human reviewers. Let’s enjoy a personal and evocative conversation. Thank You