Cisco Routing/Switching – Switch Trunking

Now we must create multiple VLANS and allow them through our switch trunk ports.

Referring to our diagram above we would like to create trunk ports in the interfaces listed for each switch, Switch 1 (Top), Switch 2 (Bottom Right), Switch 3 (Bottom Left)

We require 2 Vlans as listed below:

VLAN 2 – IT

VLAN 5 – Accounting

Let’s create the Vlans on Switch 1:

S1#conf t
S1(config)#vlan 2
S1(config-vlan)#name IT
S1(config-vlan)#exit
S1(config)#vlan 5 
S1(config-vlan)#name Accounting
S1(config-vlan)#exit
S1(config)#

Let’s ensure that Fa0/2 and Fa0/3 are configured as trunks and allow the created vlans including the native vlan 1 over the trunk link.

S1#conf t
Enter configuration commands, one per line.  End with CNTL/Z.
S1(config)#int range fa0/2-3
S1(config-if-range)#switchport mode trunk
S1(config-if-range)#switchport trunk allowed vlan 1,2,5
S1(config-if-range)#exit
S1(config)#

As the top switch has two connections to other switches we are configuring these on both ports

Now to configure Switch 2

S2#conf t
Enter configuration commands, one per line.  End with CNTL/Z.
S2(config)#vlan 2
S2(config-vlan)#name IT
S2(config-vlan)#exit
S2(config)#vlan 5 
S2(config-vlan)#name Accounting
S2(config-vlan)#exit
S2(config)#do sh vlan

VLAN Name                             Status    Ports
---- -------------------------------- --------- -------------------------------
1    default                          active    Fa0/2, Fa0/3, Fa0/4, Fa0/5
                                                Fa0/6, Fa0/7, Fa0/8, Fa0/9
                                                Fa0/10, Fa0/11, 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, Gig0/1
                                                Gig0/2
2    IT                               active    
5    Accounting                       active    
1002 fddi-default                     act/unsup 
1003 token-ring-default               act/unsup 
1004 fddinet-default                  act/unsup 
1005 trnet-default                    act/unsup 

VLAN Type  SAID       MTU   Parent RingNo BridgeNo Stp  BrdgMode Trans1 Trans2
---- ----- ---------- ----- ------ ------ -------- ---- -------- ------ ------
1    enet  100001     1500  -      -      -        -    -        0      0
2    enet  100002     1500  -      -      -        -    -        0      0
5    enet  100005     1500  -      -      -        -    -        0      0
 --More--

We can also see the vlans have been configured also by running a sh vlan (Or if you are in global configuration mode do sh vlan)

Configure the trunking:

S2(config)#int fa0/1
S2(config-if)#switchport mode trunk
S2(config-if)#switchport trunk allowed vlan 1,2,5
S2(config-if)#exit
S2(config)#

And finally configure the VLANS on Switch 3

S3#conf t
Enter configuration commands, one per line.  End with CNTL/Z.
S3(config)#vlan 2
S3(config-vlan)#name IT
S3(config-vlan)#exit
S3(config)#vlan 5 
S3(config-vlan)#name Accounting
S3(config-vlan)#exit

Then finally the trunking:

S3(config)#int fa0/1
S3(config-if)#switchport mode trunk
S3(config-if)#switchport trunk allowed vlan 1,2,5
S3(config-if)#
S3#
%SYS-5-CONFIG_I: Configured from console by console

 

Leave a Reply

Your email address will not be published. Required fields are marked *