Router-on-a-Stick: One VLAN Works, the Other Does Not

intermediate
LAB TOPOLOGY

Router-on-a-Stick Lab

One 802.1Q trunk · router subinterfaces as gateways

ACCESS VLAN 10NICE0/1ACCESS VLAN 20NICE0/3802.1Q TRUNKE0/0E0/0PC1VLAN 10192.168.10.10/24PC2VLAN 20192.168.20.10/24SW1Layer-2 SwitchR1802.1Q SubinterfacesE0/0.10 .254 · E0/0.20 .254

Symptom

VLAN 10 users can reach their gateway on R1. VLAN 20 users cannot. The physical R1 E0/0 link is up.

Do not start by rebooting

A working VLAN 10 already proves the physical trunk path is at least partially alive. Focus on what is unique to VLAN 20.

Checks

SW1# show vlan brief
SW1# show interfaces trunk
R1# show ip interface brief
R1# show running-config interface ethernet 0/0.20

Compare: access-port VLAN, VLAN 20 allowed/active on trunk, encapsulation dot1q 20, subinterface IP and the host’s default gateway.

Example root cause

R1 E0/0.20 is configured with encapsulation dot1q 30. SW1 sends VLAN 20 tagged frames, but R1’s subinterface expects VLAN 30.

Fix

Correct the encapsulation ID, then ping the gateway from a VLAN 20 host and verify inter-VLAN traffic.