USD ($)
$
United States Dollar
India Rupee

Router on a Stick Configuration Scenario

Created by Deepak Sharma in CCNA 23 Jun 2024
Share
«Cisco: Configure Trunk Port & Native ...

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

banner image

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:

banner image

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

!

banner image

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

!

banner image

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:

banner image

PC03:

banner image

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. 

banner image

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. 


What is CDP Protocol and Exploring LLDP»
Deepak Sharma

He is a senior solution network architect and currently working with one of the largest financial company. He has an impressive academic and training background. He has completed his B.Tech and MBA, which makes him both technically and managerial proficient. He has also completed more than 450 online and offline training courses, both in India and ...

More... | Author`s Bog | Book a Meeting

Related Articles

#Explore latest news and articles

CCNA Course Syllabus: Topics Explained 27 Jul 2024

CCNA Course Syllabus: Topics Explained

Examine the latest Cisco CCNA course syllabus and understand the details of each 200-301 exam topics with practical on lab devices. Start Now!
What is CDP Protocol and Exploring LLDP 23 Jun 2024

What is CDP Protocol and Exploring LLDP

Dive into what is CDP protocol and understand LLDP with configuration to explore the difference between CDP and LLDP
What is Spanning Tree: Cisco Rapid PVST+ 23 Jul 2024

What is Spanning Tree: Cisco Rapid PVST+

Understand what is spanning tree particularly rapid pvst+ with its configuration on Cisco switches topology scenario.

Comments (0)

Share

Share this post with others

Contact learning advisor

Captcha image