← lab guides · 2026-08-20 · 90m
VLANs + Inter-VLAN Routing on IOS
Trunk, SVI, and the native VLAN gotcha that breaks pings.
topic: routing-switching · tool: cisco-ios, eve-ng · difficulty: beginner
TOPOLOGYFig. — lab diagram
[ LAB TOPOLOGY — add topology.svg to this bundle ]
[ PC1 ]──[ SW1: vlan10 ]──[ R1 ]──[ FW ]── Internet
└─ vlan99 MGMT vlan20 OT (PLC/HMI)On this page
Objective
You split a two-switch, one-router lab into VLAN 10 (LAB), VLAN 20 (OT), and VLAN 99 (MGMT). You route between VLANs with router-on-a-stick and then check isolation.
Steps
- Create VLANs on SW1 and SW2 and assign access ports.
- Trunk the link between switches with
switchport mode trunkandswitchport trunk allowed vlan 10,20,99. - On the router, build subinterfaces with
encapsulation dot1Q 10and assign an IP for each VLAN. - Test with
pingacross VLANs. Verify withshow vlan briefandshow ip interface brief.
Gotcha
If you mismatch native VLANs, you drop frames with no error. Set
switchport trunk native vlan 99 on both sides, or keep both sides at default 1. I left one side at default and spent 20 minutes chasing it.Takeaways
- Router-on-a-stick versus SVI tradeoffs
- Native VLAN changes forwarding, it is not cosmetic
show interfaces trunktells you the truth