Inter-VLAN Routing Explained: 3 Ways to Do It
VLANs isolate traffic by design, so devices in different VLANs can't talk without a Layer 3 device to route between them. There are three ways: a router interface per VLAN (wasteful), router-on-a-stick (one trunk, subinterfaces), or — the modern choice — a Layer 3 switch with SVIs.
The three methods
- Router per VLAN — one physical router port per VLAN. Simple but doesn't scale (you run out of ports fast).
- Router-on-a-stick — a single trunk link to the router, split into subinterfaces (one per VLAN, each with
encapsulation dot1qand an IP). Great for small networks. - Layer 3 switch (SVIs) — the switch itself routes using Switched Virtual Interfaces. Fastest and most scalable — standard in real networks.
Router-on-a-stick in brief
On the switch, the link to the router is a trunk. On the router, you create a subinterface per VLAN: interface g0/0.10 → encapsulation dot1q 10 → ip address …. Each subinterface becomes the default gateway for its VLAN. It's a favourite CCNA lab — practise it, then test yourself on our CCNA quiz.
Frequently asked questions
Why can't VLANs communicate by default?
VLANs are separate broadcast domains at Layer 2; traffic between them must be routed by a Layer 3 device (router or Layer 3 switch).
What is router-on-a-stick?
A method where one router interface, configured with subinterfaces over a trunk link, routes between multiple VLANs — economical for small networks.
What is an SVI?
A Switched Virtual Interface — a virtual Layer 3 interface on a multilayer switch that acts as the gateway for a VLAN, enabling fast inter-VLAN routing.
Related articles
Want hands-on training?
Learn this on real Cisco lab devices with placement support at Attila Technologies, Ahmedabad.