Troubleshooting inter-VLAN routing

Router-on-a-stick checklist

CheckCommandLook for
Physical port upshow ip interface briefGi0/0 up/up (subinterfaces follow it)
Right VLAN per subinterfaceshow running-config | section interfaceencapsulation dot1Q matches the VLAN of that subnet
Switch port is a trunkshow interfaces trunkThe port listed as trunking, with the VLANs allowed
Gatewaysipconfig / ip route on the PCsThe subinterface address of their own VLAN

Multilayer switch checklist

CheckCommandLook for
Routing onshow ip route"Default gateway is ..." means ip routing is off
SVIs upshow ip interface briefVlan10 up/up; up/down means the VLAN is missing or has no active ports
Access portsshow vlan briefPC ports in the right VLANs

Here R1's Gi0/0.20 says encapsulation dot1Q 21: frames for VLAN 20 never reach it. Spot it in the configuration:

In NetLab

▶ PC2
student@PC2:~$ ping -c 2 192.168.20.1
PING 192.168.20.1 (192.168.20.1) 56(84) bytes of data.
From 192.168.20.10 icmp_seq=1 Destination Host Unreachable
From 192.168.20.10 icmp_seq=2 Destination Host Unreachable

--- 192.168.20.1 ping statistics ---
2 packets transmitted, 0 received, 100% packet loss, time 1001ms
▶ R1
R1>enable
R1#show running-config | section interface GigabitEthernet0/0.
interface GigabitEthernet0/0.10
 encapsulation dot1Q 10
 ip address 192.168.10.1 255.255.255.0
interface GigabitEthernet0/0.20
 encapsulation dot1Q 21
 ip address 192.168.20.1 255.255.255.0

Tip: Packet Walk is excellent here: it shows the router dropping a frame tagged for a VLAN none of its subinterfaces handles.

HOME LABS COMMUNITY DASHBOARD