Skip to content
CCNA 200-301 v1.1 reference — Network Access

Inter-VLAN routing

Router-on-a-stick subinterfaces and Layer 3 switch SVIs, with the trunk and routing configuration each design needs.

Objective 2.1v1.1 exam target

Router-on-a-stick versus SVIs

PropertyRouter-on-a-stickLayer 3 switch SVI
Gateway lives onRouter subinterfaces (.10, .20…)interface vlan X on the switch
Uplink to router/L3Single trunk carrying all VLANsNot needed for inter-VLAN — routing is internal
PerformanceHairpins traffic through one linkRoutes at switching speed
UseSmall sites, existing routerCampus norm
Router-on-a-stick

Route VLANs 10 and 20 over one trunk on G0/1 — Privileged EXEC → Interface + subinterface configuration

Cisco IOS / IOS XE router

configure terminal
interface gigabitethernet0/1
 no shutdown
 exit
interface gigabitethernet0/1.10
 encapsulation dot1q 10
 ip address 192.168.10.1 255.255.255.0
 exit
interface gigabitethernet0/1.20
 encapsulation dot1q 20
 ip address 192.168.20.1 255.255.255.0
 end
Verify
show ip interface brief
show vlans
ping 192.168.20.10
  • Subinterfaces show up/up with their VLAN-tag dot1q binding.
  • Inter-VLAN ping works once host gateways point at the subinterface IPs.
  • The parent interface needs no IP itself — only no shutdown.

Changes device configuration.

Layer 3 switch SVIs

Give VLANs 10 and 20 gateways on a Layer 3 switch — Privileged EXEC → Global + interface VLAN configuration

Cisco IOS / IOS XE switch

  • ip routing must be enabled globally for SVI routing to work.
configure terminal
ip routing
interface vlan 10
 ip address 192.168.10.1 255.255.255.0
 exit
interface vlan 20
 ip address 192.168.20.1 255.255.255.0
 end
Verify
show ip interface brief
show ip route
ping 192.168.20.10
  • SVIs show up/up only when the VLAN exists AND at least one port forwards in it.
  • Connected routes appear for both VLAN subnets.
  • An SVI stays down/down if no active port carries that VLAN.

Changes device configuration.

Why a host can't reach another VLAN
PC
192.168.10.10, gw 192.168.20.1
  1. The gateway must be inside the host's own subnet — 192.168.20.1 is in VLAN 20's subnet.
  2. The host computes the gateway as off-link and never ARPs for it → nothing forwards.
  3. Correct gateway: 192.168.10.1 (the VLAN 10 subinterface/SVI).

The default gateway always lives inside the host's own VLAN subnet.

On this page

Related resources

Sources

Targets CCNA 200-301 v1.1 objectives. Supplemental blocks are labeled beyond exam scope.

Search guided lessons, transcript chapters, flashcards, CLI drills and cheat sheets

Inter-VLAN routing | CCNA Study