Sharing Ilmu

Sharing for useful things

Configuration Intervlan routing on Switch Layer 3 Cisco

Hello everyone, in this tutorial I’ll discuss about how to configuration intervlan routing on Switch layer 3.  Before I have discuss about intervlan routing on router device https://www.taufiknurhuda.web.id/2022/07/03/configuration-intervlan-routing-router-on-stick-on-cisco-packet-tracer/. There is a slight difference for the configuration between router and switch L3.

The following is the topologi are used :

And the following is step by step configuration :

Configure SW1 :

Switch>en
Switch#config t
Switch(config)#hostname SW1

Add Vlan interface :

SW1(config)#vlan 10
SW1(config-vlan)#exit
SW1(config)#vlan 20
SW1(config-vlan)#exit

Assign interface ethernet to each vlan :

SW1(config)#int e0/1
SW1(config-if)#sw mode acc
SW1(config-if)#sw acc vlan 10
SW1(config-if)#exit
SW1(config)#int e0/2
SW1(config-if)#sw mode acc
SW1(config-if)#sw acc vlan 20
SW1(config-if)#exit

Configure trunk port

SW1(config)#int e0/0
SW1(config-if)#sw trunk encapsulation dot1q
SW1(config-if)#sw mode trunk
SW1(config-if)#exit

 

Configure SW 2 :

Switch>en
Switch#config t
Switch(config)#hostname SW2

Add Vlan interface :

SW2(config)#vlan 10
SW2(config-vlan)#exit
SW2(config)#vlan 20
SW2(config-vlan)#exit

Assign interface ethernet to each vlan :

SW2(config)#int e0/1
SW2(config-if)#sw mode acc
SW2(config-if)#sw acc vlan 10
SW2(config-if)#exit
SW2(config)#int e0/2
SW2(config-if)#sw mode acc
SW2(config-if)#sw acc vlan 20
SW2(config-if)#exit

Configure trunk port

SW2(config)#int e0/0
SW2(config-if)#sw trunk encapsulation dot1q
SW2(config-if)#sw mode trunk
SW2(config-if)#exit
SW2(config)#

 

Check VLAN status on SW1

SW1#show vlan brief

VLAN Name Status Ports
---- -------------------------------- --------- -------------------------------
1 default active Et0/3
10 VLAN0010 active Et0/1
20 VLAN0020 active Et0/2
1002 fddi-default act/unsup
1003 token-ring-default act/unsup
1004 fddinet-default act/unsup
1005 trnet-default act/unsup
SW1#

 

Check VLAN status on SW2

SW2#show vlan brief

VLAN Name Status Ports
---- -------------------------------- --------- -------------------------------
1 default active Et0/3
10 VLAN0010 active Et0/1
20 VLAN0020 active Et0/2
1002 fddi-default act/unsup
1003 token-ring-default act/unsup
1004 fddinet-default act/unsup
1005 trnet-default act/unsup
SW2#

 

Configure SW L3

SWL3(config)#vlan 10
SWL3(config-vlan)#exit
SWL3(config)#vlan 20
SWL3(config-vlan)#exit
SWL3(config)#int vlan 10
SWL3(config-if)#ip add 192.168.10.1 255.255.255.0
SWL3(config-if)#no shutdown
SWL3(config-if)#exit
SWL3(config)#int vlan 20
SWL3(config-if)#ip add 192.168.20.1 255.255.255.0
SWL3(config-if)#no shutdown
SWL3(config-if)#exit
SWL3(config)#

SWL3(config)#int range e0/1-2
SWL3(config-if-range)#sw trunk encapsulation dot1q
SWL3(config-if-range)#sw mode trunk
SWL3(config-if-range)#exit

 

Show vlan :

SWL3#show vlan brief

VLAN Name Status Ports
---- -------------------------------- --------- -------------------------------
1 default active Et0/0, Et0/3
10 VLAN0010 active
20 VLAN0020 active
1002 fddi-default act/unsup
1003 token-ring-default act/unsup
1004 fddinet-default act/unsup
1005 trnet-default act/unsup


Test ping from PC1 to another

VPCS> ping 192.168.10.1

84 bytes from 192.168.10.1 icmp_seq=1 ttl=255 time=1.078 ms
84 bytes from 192.168.10.1 icmp_seq=2 ttl=255 time=1.457 ms
84 bytes from 192.168.10.1 icmp_seq=3 ttl=255 time=4.075 ms

VPCS> ping 192.168.10.3

84 bytes from 192.168.10.3 icmp_seq=1 ttl=64 time=2.649 ms
84 bytes from 192.168.10.3 icmp_seq=2 ttl=64 time=1.687 ms
84 bytes from 192.168.10.3 icmp_seq=3 ttl=64 time=1.397 ms

VPCS> ping 192.168.20.2

192.168.20.2 icmp_seq=1 timeout
192.168.20.2 icmp_seq=2 timeout
192.168.20.2 icmp_seq=3 timeout

VPCS> ping 192.168.20.3

192.168.20.2 icmp_seq=1 timeout
192.168.20.2 icmp_seq=2 timeout
192.168.20.2 icmp_seq=3 timeout


Configure IP Routing on Switch L3 to activate L3 mode :

SWL3(config)#ip routing
SWL3(config)#

Test ping again from PC1 :

VPCS> ping 192.168.20.2

192.168.20.2 icmp_seq=1 timeout
84 bytes from 192.168.20.2 icmp_seq=2 ttl=63 time=2.081 ms
84 bytes from 192.168.20.2 icmp_seq=3 ttl=63 time=1.834 ms
84 bytes from 192.168.20.2 icmp_seq=4 ttl=63 time=1.616 ms

VPCS> ping 192.168.20.3

192.168.20.3 icmp_seq=1 timeout
84 bytes from 192.168.20.3 icmp_seq=2 ttl=63 time=1.936 ms
84 bytes from 192.168.20.3 icmp_seq=3 ttl=63 time=3.209 ms
84 bytes from 192.168.20.3 icmp_seq=4 ttl=63 time=2.116 ms

Connection already successfull

z

Leave a Reply

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

*
*
You may use these <abbr title="HyperText Markup Language">HTML</abbr> tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>