Use it when hosts can reach their own VLAN but not other VLANs.
Inter-VLAN Routing
Inter-VLAN routing forwards traffic between VLANs at Layer 3, using either SVIs on a Layer 3 switch or subinterfaces on a router connected by a trunk (router-on-a-stick). Each VLAN's hosts use the router's address in that VLAN as default gateway.
1. From each host: ping its own gateway. Fails → fix that VLAN first.
2. show ip route connected — both subnets present?
3. Layer 3 switch: ip routing enabled?
4. show ip interface vlan <id> | include access list — ACL dropping traffic?
5. Hosts' default gateway and mask correct?
each host reaches its own gateway → gateway interfaces up → both subnets connected → routing enabled → no ACL blocks → hosts in different VLANs reach each other
Test each host-to-gateway boundary, inspect ARP/MAC/ACL and destination access/trunk state.
Continue only after interpreting the current observation.Context & applicabilityCommon mistakes · platform/version boundaries
Operational reference
Fast context before you go deeper.
Verification & Troubleshooting
Start with the observed symptom, prove the nearest boundary, and move outward only when the current state is understood.
Use the operational verification above to establish the expected state.
Capture the concrete output, symptom, packet, log or counter before changing anything.
Step 1 Verification and output interpretation Verify boundary
Verify the source host has the correct IP/mask/default gateway, then confirm the gateway interface is up and neighbor resolution works. Inspect the routing table for both source and destination connected networks and use CEF to see the forwarding adjacency for a destination address. Layer-2 evidence must also show the source and destination VLANs are present and carried to their endpoints. A successful ping between gateways shows less than a host-to-host test because endpoint firewalls and return routes may differ. If one direction works and the other does not, preserve both route and policy evidence before changing configuration.
Evidence · 1 on this Topic
Expected observations and documentation recipes are reference material. Record actual output, device identity, scope and time before claiming a verified result.
Subtopics
Go one level deeper into this subject.
First prove each VLAN works locally: host to its own gateway. Then check that routing is on (ip routing on a Layer 3 switch), that both subnets are connected routes, and that nothing filters in between (ACLs on the SVIs). Wrong host default gateway or mask is a common cause.
show ip interface brief— gateway interfaces up/up with addresses.show ip route connected— each VLAN subnet present as a connected route.show ip arp vlan <id>— hosts resolved in each VLAN.show running-config | include ip routing— routing enabled on a Layer 3 switch.show ip interface vlan <id> | include access list— ACLs on the SVI.
ReferenceImportant terms & boundaries5 sections · depth on demand
In depth
Inter-VLAN routing: how traffic moves between VLANs
Hosts in different VLANs are in different subnets, so their traffic must be routed. The Catalyst 9300 interface guide describes the switch's routing function working on SVIs and routed ports. In its example, VLAN 20 and VLAN 30 each have an SVI with an IP address, and hosts in the two VLANs communicate through the switch without an external router.
Three ways to route between VLANs
| Method | How | Typical use |
|---|---|---|
| Layer 3 switch with SVIs | One SVI per VLAN on the switch | Standard campus design |
| Router-on-a-stick | 802.1Q subinterfaces on a router, one trunk to the switch | Small sites, labs |
| One router interface per VLAN | A physical router port in each VLAN | Rare; doesn't scale |
C9300(config)# ip routing
C9300(config)# interface Vlan20
C9300(config-if)# ip address 10.20.0.1 255.255.255.0
C9300(config)# interface Vlan30
C9300(config-if)# ip address 10.30.0.1 255.255.255.0
C9300# show ip route connected
C 10.20.0.0/24 is directly connected, Vlan20
C 10.30.0.0/24 is directly connected, Vlan30
host-in-vlan20$ traceroute -n 10.30.0.25
1 10.20.0.1 0.612 ms
2 10.30.0.25 0.981 ms
The traceroute shows one hop: the SVI is the gateway, and the switch routes directly to VLAN 30.
Requirements
| Item | Detail |
|---|---|
ip routing | Enables routing on the switch; without it the SVIs are only management addresses |
| Default gateway on hosts | The SVI (or FHRP virtual) address of their VLAN |
| Licensing | Network Essentials supports static routes and RIP only, per the guide |
Policy between VLANs
Routing between SVIs is open by default. Use ACLs on the SVIs, VRFs, or route the VLANs through a firewall when traffic between groups must be controlled.
Troubleshooting
| Symptom | Check |
|---|---|
| Hosts reach their gateway but not other VLANs | ip routing missing; host gateway wrong |
| One VLAN unreachable | Its SVI is down (autostate) or shut down |
| Asymmetric or slow paths | Two gateways with FHRP active on different switches than the STP root |
Documented example, not captured output.
Two boundaries must work
Inter-VLAN routing needs both Layer 2 delivery to the gateway and Layer 3 routing between subnets. If a host cannot reach its own gateway, do not start with the remote VLAN route table; show access VLAN, trunk path, ARP/MAC and gateway-interface state first.
Quick reference
Inter-VLAN routing forwards traffic between VLANs, which are separate subnets, through a Layer 3 device. Hosts send packets for other VLANs to their default gateway, which routes them into the destination VLAN.
| Method | Characteristics |
|---|---|
| Layer 3 switch with SVIs | Hardware routing, scalable — standard today |
| Router-on-a-stick | One trunk with subinterfaces, limited by link bandwidth |
| Separate router interfaces per VLAN | Legacy, uses many ports |
Check the host's gateway, the SVI or subinterface state, and routing on the Layer 3 device when hosts in different VLANs cannot reach each other.
State model and protocol mechanics
Hosts in different VLANs cannot exchange frames directly because VLANs are separate Layer-2 domains. A host sends off-subnet traffic to its default gateway, first resolving that gateway's MAC through ARP or ND. The Layer-3 device decapsulates the ingress Ethernet frame, performs an IP route/CEF lookup, decrements TTL/hop limit, resolves the destination-side adjacency and emits a new Ethernet frame into the target VLAN. This can happen on a multilayer switch using SVIs or on a router using physical/subinterfaces. The routing step creates a policy boundary where ACLs, QoS, first-hop redundancy and other controls may apply. Connected routes for each VLAN are normally present when the Layer-3 interfaces are operational.
Limits and common misconceptions
Inter-VLAN routing is not achieved by simply allowing both VLANs on the same trunk; a Layer-3 forwarding point is required. Conversely, a working SVI pair does not show hosts have the correct masks/gateways or that ACLs permit the desired traffic. VLANs provide Layer-2 separation but not automatic security between routed subnets. A connected route also does not validate return traffic through upstream networks. Keep endpoint addressing, Layer-2 VLAN carriage, gateway state, routing/CEF and policy as independent evidence layers. Also distinguish local inter-VLAN forwarding from upstream reachability: traffic can route correctly between two local SVIs while failing beyond the switch because a default route, return route or external policy is missing.
ReferenceConfiguration & state1 section · depth on demand
Design and configuration model
Define a subnet and gateway for each VLAN, create the corresponding SVI or router subinterface, and ensure Layer-3 routing is enabled. On multilayer switches, keep access/trunk VLAN state aligned with SVI state. On router-on-a-stick designs, configure 802.1Q encapsulation and IP addressing on subinterfaces and ensure the trunk carries every required VLAN. Add routing beyond the directly connected VLANs as needed, and apply ACL/security policy deliberately rather than assuming VLAN separation itself blocks traffic. Plan first-hop redundancy if gateway availability is required. Avoid overlapping subnets between VLANs because the routing model depends on each connected network being unambiguous.
Additional reference context Scope · expected state · examples · history · terminology Open only when you need the supporting context
Verification history & basis
When and against what this Topic was checked. Later text edits do not count as a new check.
Authoritative/upstream documentation reviewed for bounded claims in Switching → VLAN → Inter-VLAN Routing. Documentation verification only; this is not observed lab or production Evidence.
Basis: https://www.cisco.com/c/en/us/support/ios-nx-os-software/ios-xe-17/series.html · confidence 94%Quick lookup tables
Inter-VLAN routing methods
Fast comparison of common Cisco approaches.
| Method | Layer 2 handoff | Layer 3 gateway | Typical use |
|---|---|---|---|
| Layer 3 switch | Access/trunk VLANs terminate on switch | SVI per VLAN | Campus/multilayer switching |
| Router-on-a-Stick | 802.1Q trunk to router | Router subinterface per VLAN | Small/lab/external-router design |
Inter-VLAN Routing · operational reference
Compact state and interpretation boundaries for fast lookup.
| Stage | Key state |
|---|---|
| Source VLAN | Host reaches local gateway |
| L3 lookup | Destination route selected |
| Destination VLAN | Adjacency resolved |
| Return path | Reverse routing/policy valid |