How to Configure VLAN In Cisco Switch

VLAN is Stand for Virtual LAN.Configure VLAN In Cisco Switch. It means device  logically divided in to different-2 LAN. Its improve security and reliability of your network. Switch create logical broadcast domain to each VLAN. In a Single Switch you can create Multiple VLAN for separate Department like, Account , IT, Sales ,HR department.

 

 

Configure VLAN In Cisco Switch
 
 
 
 

Configure VLAN In Cisco Switch

Switch 1
 
switch1>en
switch1#conf t
switch2#vlan database
switch1(vlan)#vlan 10
VLAN 10 added:
    Name: VLAN0010
switch1(vlan)#vlan 20
VLAN 20 added:
    Name: VLAN0020
switch1(vlan)#exit
APPLY completed.
Exiting….
switch1#
 
Assign IP address to the VLAN

switch1>en
switch1#conf t
switch1(config)#int vlan 10
switch1(config-if)#ip add 192.168.1.1 255.255.255.0
switch1(config-if)#no shut
switch1(config-if)#exit
switch1(config)#int vlan 20
switch1(config-if)#ip add 192.168.2.1 255.255.255.0
switch1(config-if)#no shut
switch1(config-if)#exit
switch1(config)#exit
 
Assign Port to the VLAN

switch1#conf t
switch1(config)#int f0/2
switch1(config-if)#switchport mode access 
switch1(config-if)#switchport access vlan 10
switch1(config-if)#int f0/3
 
switch1(config-if)#switchport mode access
switch1(config-if)#switchport access vlan 10
switch1(config-if)#int f0/4
switch1(config-if)#switchport mode access
switch1(config-if)#switchport access vlan 20
switch1(config-if)#int f0/5
switch1(config-if)#switchport mode access
switch1(config-if)#switchport access vlan 20
 
Show VLAN INFORMATION

switch1#sh vlan

 

 

 

VLAN Name                       Status    Ports

 

—- ——————————– ——— ————————-
1    default                     active    Fa0/1, Fa0/6, Fa0/7Fa0/8
                                           Fa0/9, Fa0/10, Fa0/Fa0/12
                                           Fa0/13, Fa0/14, Fa0/15, Fa0/16
                                           Fa0/17, Fa0/18, Fa0/19, Fa0/20
                                           Fa0/21, Fa0/22, Fa0/23, Fa0/24
                                           Gig1/1, Gig1/2
10   VLAN0010                    active    Fa0/2, Fa0/3
20   VLAN0020                    active    Fa0/4, Fa0/5

 

VLAN Creation in Switch 2
 
switch2>en
switch2#conf t
switch2#vlan database
switch2(vlan)#vlan 10
VLAN 10 added
    Name: VLAN0010
switch2(vlan)#vlan 20
VLAN 20 added:
    Name: VLAN0020
switch2(vlan)#exit
APPLY completed.
Exiting….
 
Assign IP address to the VLAN
switch2>en
 
switch2#conf t
switch2(config)#int vlan 10
switch2(config-if)#ip add 192.168.1.1 255.255.255.0
switch2(config-if)#no shut
switch2(config-if)#exit
switch2(config)#int vlan 20
switch2(config-if)#ip add 192.168.2.1 255.255.255.0
switch2(config-if)#no shut
switch2(config-if)#exit

Assign Switch Port to VLAN
switch2#conf t
switch2(config)#int f0/2
switch1(config-if)#switchport mode access
switch2(config-if)#switchport access vlan 10
switch2(config-if)#int f0/3
switch1(config-if)#switchport mode access
switch2(config-if)#switchport access vlan 10
switch2(config-if)#int f0/4
switch1(config-if)#switchport mode access
switch2(config-if)#switchport access vlan 20
switch2(config-if)#int f0/5
switch1(config-if)#switchport mode access
switch2(config-if)#switchport access vlan 20
switch2(config-if)#exit

Show VLAN information in switch 2 
 
switch2#sh vlan

 

 

 

VLAN Name                       Status    Ports

 

—- ——————————– ——— ————————-
1    default                     active    Fa0/1, Fa0/6, Fa0/7Fa0/8
                                           Fa0/9, Fa0/10, Fa0/Fa0/12
                                           Fa0/13, Fa0/14, Fa0/15, Fa0/16
                                           Fa0/17, Fa0/18, Fa0/19, Fa0/20
                                           Fa0/21, Fa0/22, Fa0/23, Fa0/24
                                           Gig1/1, Gig1/2
10   VLAN0010                    active    Fa0/2, Fa0/3
20   VLAN0020                    active    Fa0/4, Fa0/5
 
 
 
                
In this information port Fa0/2 and Fa0/3 are define for VLAN 10 , and Port  Fa0/4 and Fa0/5 are define for VLAN 20
 
 

Read Also

Share This onShare on FacebookTweet about this on TwitterShare on LinkedInShare on RedditShare on StumbleUponShare on Google+Pin on PinterestBuffer this pageShare on Tumblr
Rakesh Kumar
at
Rakesh Kumar is a Network engineer and a Blogger. He is crazy for learn and write about Technology , Tech and Computer Tips and Tricks Blog.