Pre-requisites for this LAB: 

Configure VLANs and assign the switchports to their specific vlans as mentioned in the topology. Refer to the VLAN Configuration LAB if you face any issues in configuring the VLANs

Task:

Configure Inter-vlan Routing on R1 and ensure that users in VLAN 10 should be able to ping users in VLAN 20 and vice-versa.  

Press RETURN to get started!

Router>enable
Router#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#hostname R1
R1(config)#interface gigabitEthernet 0/1
R1(config-if)#no ip address
R1(config-if)#no shutdown

R1(config-if)#
%LINK-5-CHANGED: Interface GigabitEthernet0/1, changed state to up

%LINEPROTO-5-UPDOWN: Line protocol on Interface GigabitEthernet0/1, changed state to up

R1(config)#interface gigabitEthernet 0/1.10
R1(config-subif)#
%LINK-5-CHANGED: Interface GigabitEthernet0/1.10, changed state to up

%LINEPROTO-5-UPDOWN: Line protocol on Interface GigabitEthernet0/1.10, changed state to up

R1(config-subif)#description *SUBINTERFACE FOR VLAN10*
R1(config-subif)#encapsulation dot1Q 10
R1(config-subif)#ip address 192.168.1.1 255.255.255.0
R1(config-subif)#exit
R1(config)#interface gigabitEthernet 0/1.20
R1(config-subif)#
%LINK-5-CHANGED: Interface GigabitEthernet0/1.20, changed state to up

%LINEPROTO-5-UPDOWN: Line protocol on Interface GigabitEthernet0/1.20, changed state to up

R1(config-subif)#description *SUBINTERFACE FOR VLAN20*
R1(config-subif)#encapsulation dot1Q 20
R1(config-subif)#ip address 192.168.2.1 255.255.255.0
R1(config-subif)#exit
R1(config)#exit
R1#
%SYS-5-CONFIG_I: Configured from console by console

Configure GigabitEthernet 0/1 on SW1 as a trunk link

SW1>enable
SW1#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
SW1(config)#interface gigabitEthernet 0/1
SW1(config-if)#switchport trunk encapsulation dot1Q
SW1(config-if)#switchport mode trunk

SW1(config-if)#
%LINEPROTO-5-UPDOWN: Line protocol on Interface GigabitEthernet0/1, changed state to down

%LINEPROTO-5-UPDOWN: Line protocol on Interface GigabitEthernet0/1, changed state to up

SW1(config-if)#exit
SW1(config)#exit
SW1#
%SYS-5-CONFIG_I: Configured from console by console

Verification: Ping from 192.168.1.2 a user in VLAN 10 to 192.168.2.2 a user in VLAN 20 and verify if you get the reply

Ping from 192.168.2.3 a user in VLAN 20 to 192.168.1.2 a user in VLAN 10 and verify if you get the reply

Add comment

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.