USD ($)
$
United States Dollar
India Rupee

Router on a Stick Configuration Scenario

Created by Deepak Sharma in CCNA 5 May 2024
Share

Chapter 2.1 & 2.2

Chapter 2.3

2.1.c InterVLAN connectivity 

Inter VLAN connectivity is also known as "router on a stick". It enables connectivity between different VLANs. In traditional network setups, VLANs are isolated from each other and cannot directly communicate. However, by implementing Inter VLAN connectivity, traffic can be routed between VLANs using a single physical interface on a router.

The concept of router on a stick involves connecting a router to a switch and configuring sub-interfaces on the router's interface. The router's sub-interfaces are configured in different VLANs with each VLANs are having separate network subnet IP addresses. The router's sub-interface IP address becomes the gateway for that particular VLAN subnet hence allowing traffic between VLANs. The switch interface connecting to the router is configured as trunk link and those VLANs should be allowed through this trunk link.

Topology Diagram


Tasks

● Note enable password is CISCO

● Login to SW03 and confirm this switch has VLAN 3 and VLAN 4 configured. VLAN 3 should be assigned to interface E1/0 and VLAN 4 should be assigned to interface 0/0.

 ✓ If these VLANs don't exist or aren't configured on the access ports specified above, configure it.

● Configure interface E0/3 on SW03 to operate as an 802.1q VLAN Trunk.

● Configure router R03 as a router-on-a-stick such that it will be able to route for both VLAN 3 and VLAN 4

 ✓ Assign the first available host address for the relevant subnets to R03's sub-interfaces.

● Configure IP address 170.50.0.162 255.255.255.224 on PC03 interface E0 with gateway IP as 170.50.0.161, and IP address 170.50.0.130 255.255.255.224 on PC interface E0 with gateway as 170.50.0.129.


Configuration and Verification 

Here on SW03, VLAN 3 and VLAN 4 are already configured in previous tasks, and both are assigned to interfaces connected to PC and PC03. 

SW03:


Configure interface E0/3 on SW03 as 802.1q trunk which is connected to router R03

!

configure terminal

!

interface E0/3

 switchport trunk encapsulation dot1q

 switchport mode trunk 

 switchport trunk allowed vlan 3,4

 no shutdown

!

end

!

write

!


Create two sub-interfaces on R03 for VLAN 3 and VLAN 4, assign first IP address in the subnet of segment E and F respectively. 

R03:

!

configure terminal

!

interface E0/2.3

 encapsulation dot1q 3

 ip address 170.50.0.161 255.255.255.224

!

interface E0/2.4

 encapsulation dot1q 4

 ip address 170.50.0.129 255.255.255.224

!

interface E0/2

 no shutdown

!

end

!

write

!


Now configure IP addresses on PC and PC03 as provided in the task. Note: These are tiny Linux machines and have a simple cli more to configure IP address parameters. 

Note: It is recommended to set the hostname for these PCs as these are having default name VPC. 

PC:


PC03:


Verify the connectivity from PC to PC03, these PCs are in different VLANs, and they are able to ping each other meaning that inter-VLAN connectivity is successful. 


As you can see in the above output PC can ping its gateway and can also ping PC03 which is in the other VLAN. Note: disable ip cef using command "no ip cef" in configuration mode on SW03 if required. Use CTL+c to stop ping process on PC. 


Don't Miss to Checkout our Next Articles

Dynamic Routing Explained: EIGRP & OSPF

Understanding OSPF: Operation and Function



Other Popular & Useful Articles

Explaining Cisco Default Route Configuration

Setting Up Static Routes on Cisco Routers


Comments (0)

Share

Share this post with others

Contact learning advisor