TechKnowSurge
Cisco CCNA 2.1 Cisco CCNA 2.2 Cisco CCNA 3.1
VideoNetworkFree

DEMO: Troubleshooting Router-on-a-Stick Issue 1

A misconfigured 802.1Q encapsulation tag on a router-on-a-stick subinterface blocks inter-VLAN traffic, and a systematic ping-based troubleshooting process leads to identifying and correcting the VLAN ID mismatch.

Complete this video to capture a CTF flag worth 1 point.

About this video

Inter-VLAN routing problems in a router-on-a-stick topology can be subtle because partial connectivity often masks the true source of the fault. In this scenario, a host on VLAN 10 can reach its default gateway and even the VLAN 20 gateway address, but cannot reach any device actually residing on VLAN 20. That pattern — reachability to the gateway IP but failure beyond it — points toward a forwarding or tagging issue rather than a routing or physical link failure. A methodical divide-and-conquer approach works through the problem layer by layer. Pinging the local default gateway first confirms basic LAN connectivity. Pinging the VLAN 20 subinterface address from the source host confirms the router is receiving and responding to traffic. Pinging a host on VLAN 20 directly from the router then isolates the failure to the path between the router and the downstream switch, narrowing the search considerably. Inspecting the router's subinterface configuration with show run interface reveals the culprit: the 802.1Q encapsulation on the VLAN 20 subinterface was set to VLAN 30 instead of VLAN 20. As a result, every packet the router forwarded toward VLAN 20 was tagged with VLAN 30, causing Switch 1 to place that traffic onto the wrong VLAN entirely. The destination host on VLAN 20 never received the frames and had no opportunity to respond. Correcting the encapsulation statement to dot1q 20 on the subinterface resolves the issue immediately, restoring full inter-VLAN communication. This example illustrates how a single misconfigured encapsulation value can silently break connectivity in ways that look like routing failures but are actually a VLAN tagging mismatch at the interface level.

What you'll learn

What's covered

Troubleshooting Router on a Stick

Aligned to

Cisco CCNA
2.1 Configure and verify VLANs (normal range) spanning multiple switches
2.2 Configure and verify interswitch connectivity
3.1 Interpret the components of routing table

Key terms

Virtual LAN
VLAN
A logical grouping of network devices that behave as if they are on the same network regardless of physical location.
Router
A network device that forwards data packets between networks based on IP addresses.
Default Gateway
The router that a device uses to send traffic to destinations outside its local network.
Encapsulation
The process of wrapping data with protocol headers as it passes down the layers of the OSI model.
Router-on-a-Stick
An inter-VLAN routing design in which a single physical router interface is connected to a switch trunk and divided into subinterfaces, one per VLAN, each configured with 802.1Q encapsulation and the default gateway address for that VLAN's subnet.
Subinterface
A logical subdivision of a physical router interface that allows it to carry traffic for multiple VLANs, each assigned a unique VLAN ID and IP address.
802.1Q
The IEEE standard that defines VLAN tagging, specifying how a 4-byte tag is inserted into an Ethernet frame to identify its VLAN membership across trunk links.

Topics

Networking Inter Vlan Routing Router On A Stick 802.1q Subinterface Configuration Vlan Troubleshooting

Transcript

We're going to actually learn how to troubleshoot some of the issues that can occur with router on a stick. So we're going to jump in and start troubleshooting and figuring out what's going wrong.

I have the same setup, where I'm connected to all of the devices, switch one, two and three, even though we may not access some of those, and router one. I have the IP, or some information about my network here on the right. I've got the network diagram right here. I'm pinging the demo Pi 1, which is on the same network, and I'm being successful with that. And then I am not able to ping demo Pi 2, which is on VLAN 20, so it's a different VLAN. So let's take a look to see what would we do to troubleshoot this issue.

Starting With the Default Gateway

If I were to try to access a resource on demo Pi 2 and not be able to connect, the first thing that would jump into my mind is, okay, well what can I ping, what can I get to? So I'd start out by opening up a command prompt. So I'm going to open up a command prompt, and I always like to ping my default gateway first. So 10.1.10.1, it's part of the local area network and it's pretty key to a lot of communications, and sometimes when things go down, quite often it's my connectivity to the default gateway. So I just like to start there. It's kind of a divide and conquer method, it's a good division line to see if I've got remote connectivity.

So I'm going to hit enter, and yes, sure enough, I do have at least some connectivity on my network, I can ping out. Which is not surprising, because I'm pinging our demo Pi 1, so I'm at least able to get across the network. So it's not completely surprising that I can get to the default gateway, but that is one of the first things that I check on.

So the next thing that I would do is I would ping, let's try to ping the next hop, like what is beyond that. And I'm trying to get to VLAN 20, and the default gateway for VLAN 20 is the same thing except for it's dot 20. So 10.1.20.1. So I'm going to ping that to see if I have connectivity to that, and sure enough I at least have some sort of connectivity to that as well. So there's nothing wrong with that. For some reason I'm not able to get beyond that to that network. I can get to that IP address but I can't get beyond that IP address, so something is different here, something is strange.

Checking From the Router

Now since I can ping that, I'm going to jump on the router, because something maybe is not routing into that network correctly. So I've got the router up here, and now I'm going to ping through the router, 10.1.20.1, and check that out to see if I can ping. Oh, excuse me, 20 dot, I should be able to ping itself. So let's give it a try. Yeah, it pings itself. That's not a problem right there. So let's try to ping 21, or 22 rather, which is the demo Pi, and it's not able to do that, not able to connect into that. So there's some sort of connectivity issue between the router and devices on this network.

So let's go ahead and do our next step, where we do a ip route and see what's in our routing table. So show ip route is rather what I'd like to do, so I can see the networks that are connected to it. And one of the networks that it's connected into is 10.1.20.0, so I have that network connected. It also shows that it's up. If the link wasn't up, that wouldn't be up. I can do a show ip interface brief to check the links, but if I have the route up, that means the link is up, and sure enough that's up. So there's nothing wrong with that.

I can do a show interface and see what the show interface does. I can read through here and check to see if there's anything that stands out with this, if there's any kind of issue at all. As I look through here, nothing is jumping out at me with this right here. So the interface looks like it's doing pretty good. Oh, this is fast ethernet, so this is actually the one that we're looking at right here, and I don't see anything with that.

Oh, here's the sub interfaces, so we can look at those sub-interfaces. And it's specifically a dot one. We know there's nothing wrong with dot 110, so we're looking at 1.20 and it's up, and VLAN 20 sub interface, that's just the description. So oh, wait a minute here, what's this VLAN ID 30? So we've got a VLAN ID 30 here. So something is off there. This actually should be VLAN 20. So let's finish this off and do a show run interface fa, and aha, encapsulation dot1q 30.

What Was Happening

So what's happening, and let me bring over this diagram right here, is the demo laptop is pinging out and we're trying to ping demo Pi 2. It's making it all the way to the router, and then the router sees that sub, which is a valid IP. I mean, that's the default gateway that it's supposed to be, and so it recognizes that network and then sends the response out. But when it responds out to that network, to put it onto the VLAN, it tags it with VLAN 30. And so this switch, switch one, figures oh, this is part of VLAN 30, and sends it out to VLAN 30 and not VLAN 20. So demo Pi 2 never receives that, and so it doesn't even have a chance to respond back.

So that's what's happening, is that most of the communication is fine, except for when it passes it from the router to the switch, it passes it tagged with VLAN 30. The switch thinks it's part of VLAN 30, and then it responds to it as if it's on VLAN 30, and we don't have connectivity.

So let's make that change and then let's see if that affects that. So I'm going to get into that interface, interface fa0/1.20, and this is the command I want to change. So I'm going to change that, I want to do 20, and I'm going to hit enter, and instantly like that it came up. Instantly it is now communicating and things are good to go. I have fixed this issue.

About TechKnowSurge

TechKnowSurge builds IT and cybersecurity professionals through hands-on, concept-first training built around real understanding — not memorization. Free interactive tools, structured programs, and 25+ years of real-world experience, all in one place.

Explore free tools and programs →