Pcornel
Browse topics
Options
Recent
Favorites
Networking · Technical reference

Inter-VLAN Routing

Direct answer

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.

When to use this

Use it when hosts can reach their own VLAN but not other VLANs.

First 30 seconds

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?

Operational verification

each host reaches its own gateway → gateway interfaces up → both subnets connected → routing enabled → no ACL blocks → hosts in different VLANs reach each other

Evidence · next step

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
Platform / version applicability
Cisco IOS / IOS XE
applies
Structured applicability is explicit Topic metadata; it does not infer compatibility beyond the stored rows.
At a glance

Operational reference

Fast context before you go deeper.

PlatformCisco IOS / IOS XE · Cisco IOS XE
Scope / prerequisiteUse it when hosts can reach their own VLAN but not other VLANs.
What next?3 suggested next steps
Child topics (this level)2
Evidence1
On this pageJump to a specific section
Operational workflow

Verification & Troubleshooting

Start with the observed symptom, prove the nearest boundary, and move outward only when the current state is understood.

1 steps Observe → verify → isolate → change minimally → repeat the original test.
ObservedRecord what the original test actually shows

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 references

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.

command output · 1
Command lookup Jump straight to Cisco syntax
Drill down

Subtopics

Go one level deeper into this subject.

Key points

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.

Key checks
  • 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

MethodHowTypical use
Layer 3 switch with SVIsOne SVI per VLAN on the switchStandard campus design
Router-on-a-stick802.1Q subinterfaces on a router, one trunk to the switchSmall sites, labs
One router interface per VLANA physical router port in each VLANRare; 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

ItemDetail
ip routingEnables routing on the switch; without it the SVIs are only management addresses
Default gateway on hostsThe SVI (or FHRP virtual) address of their VLAN
LicensingNetwork 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

SymptomCheck
Hosts reach their gateway but not other VLANsip routing missing; host gateway wrong
One VLAN unreachableIts SVI is down (autostate) or shut down
Asymmetric or slow pathsTwo gateways with FHRP active on different switches than the STP root

Documented example, not captured output.

Source basisSource attribution states what this section is based on; it is not independent proof that the current environment matches it.

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.

MethodCharacteristics
Layer 3 switch with SVIsHardware routing, scalable — standard today
Router-on-a-stickOne trunk with subinterfaces, limited by link bandwidth
Separate router interfaces per VLANLegacy, 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.

Source basisSource attribution states what this section is based on; it is not independent proof that the current environment matches it.

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
Technical verification history

Verification history & basis

When and against what this Topic was checked. Later text edits do not count as a new check.

2026-09-14 · vendor docCisco IOS / IOS XE Current documentation reviewed 2026-09-14

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%
Embedded reference data

Quick lookup tables

Inter-VLAN routing methods

Fast comparison of common Cisco approaches.

MethodLayer 2 handoffLayer 3 gatewayTypical use
Layer 3 switchAccess/trunk VLANs terminate on switchSVI per VLANCampus/multilayer switching
Router-on-a-Stick802.1Q trunk to routerRouter subinterface per VLANSmall/lab/external-router design

Inter-VLAN Routing · operational reference

Compact state and interpretation boundaries for fast lookup.

StageKey state
Source VLANHost reaches local gateway
L3 lookupDestination route selected
Destination VLANAdjacency resolved
Return pathReverse routing/policy valid
Confirmation

Confirm action

Continue?