InterVlan Routing between L3 Switch and Router By Networking Hub




In this blog we are going to configure InterVLAN routing between Layer-3 switches and a Router. We can use this lab for two below scenarios.

1. InterVLAN Routing Lab.
2. How To Configure Layer -3 switch to the internet.




LAYER-3 SWITCH CONFIGURATION:

Firstly switch side we will create three VLAN (100-102) and configure the IP address for each VLANs.

After IP addressing of VLAN we will configure router connected interface as a trunk.


Press RETURN to get started!



Switch>en

Switch#config t

Enter configuration commands, one per line.  End with CNTL/Z.

Switch(config)#hostname LANswitch

LANswitch(config)#Vlan 101
LANswitch(config-vlan)#Vlan 102
LANswitch(config-vlan)#Vlan 100

LANswitch#config t
LANswitch(config)#int Vlan 100
LANswitch(config-if)#ip address 100.10.10.1 255.255.255.0
LANswitch(config-if)#no shutdown 
LANswitch(config-if)#int Vlan 101


LANswitch(config-if)#ip address 100.10.20.1 255.255.255.0
LANswitch(config-if)#no shutdown 
LANswitch(config-if)#int Vlan 102


LANswitch(config-if)#ip address 100.10.30.1 255.255.255.0

LANswitch#config t
LANswitch(config)#int fastEthernet 0/1
LANswitch(config-if)#Switchport trunk encapsulation dot1q 
LANswitch(config-if)#switchport mode trunk 
LANswitch(config-if)#Switchport trunk allowed vlan all

ROUTER CONFIGURATION:

On the router side We will firstly configure the interfaces which is connected to Layer-3 switch.

Router>en
Router#config t
]Router(config)#Int FastEthernet 0/0
Router(config-if)#no shutdown 
Router(config-if)#Int fastEthernet 0/0.100
Router(config-subif)#ip address 100.10.10.2 255.255.255.0
Router(config-subif)#encapsulation dot1Q 100
Router(config-subif)#ip address 100.10.10.2 255.255.255.0
Router(config)#Int FastEthernet 0/0.101
Router(config-subif)#encapsulation dot1Q 101
Router(config-subif)#ip address 100.10.20.2 255.255.255.0
Router(config-subif)#Int fastEthernet 0/0.102
Router(config-subif)#encapsulation dot1Q 102
Router(config-subif)#ip address 100.10.30.2 255.255.255.0

TESTING:


We can test the connecting by ICMP response.

ROUTER SIDE:

Router#ping 100.10.10.2

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 100.10.10.2, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 0/2/4294967295 ms

Router#ping 100.10.10.1

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 100.10.10.1, timeout is 2 seconds:
.!!!!
Success rate is 80 percent (4/5), round-trip min/avg/max = 0/0/0 ms

Router#ping 100.10.20.1

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 100.10.20.1, timeout is 2 seconds:
.!!!!
Success rate is 80 percent (4/5), round-trip min/avg/max = 0/0/0 ms

Router#ping 100.10.30.1

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 100.10.30.1, timeout is 2 seconds:
.!!!!
Success rate is 80 percent (4/5), round-trip min/avg/max = 0/0/0 ms

SWITCH SIDE:

LANswitch#ping 100.10.10.2

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 100.10.10.2, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 0/0/1 ms

LANswitch#ping 100.10.20.3

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 100.10.20.3, timeout is 2 seconds:
.....
Success rate is 0 percent (0/5)

LANswitch#ping 100.10.20.2

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 100.10.20.2, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 0/1/5 ms

LANswitch#ping 100.10.30.2

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 100.10.30.2, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 0/0/2 ms'



1 comment: