Short answer: is the gateway a router subinterface or a VLAN interface on a layer 3 switch?
Both are ways to do inter-VLAN routing. Router on a stick trunks one router port and gives each VLAN a gateway subinterface; an SVI is a virtual gateway interface inside a layer 3 switch (interface Vlan10). That is why you check a different device first in an outage.
Side by side
- Router on a stick — inter-VLAN traffic goes switch → router → switch over the same link · that link is the bottleneck and a single point of failure · a wrong trunk allowed list or tag number cuts off just that VLAN
- SVI — routed in switch hardware, no round trip over a link · needs
ip routing, the VLAN, and an active port in it · when those break, the SVI goes down or only inter-VLAN traffic fails
How it actually works
! Router on a stick — router
interface GigabitEthernet0/0.10
encapsulation dot1Q 10
ip address 10.10.10.1 255.255.255.0
! SVI — layer 3 switch
ip routing
vlan 10
interface Vlan10
ip address 10.10.10.1 255.255.255.0
no shutdown
A subinterface comes up only when the physical port (Gi0/0) is up. Creating interface Vlan10 does not create VLAN 10, and autostate keeps the SVI's line protocol down until the VLAN exists and at least one port in it (an access port, or a trunk that allows the VLAN) has link and is in STP forwarding state.
router# show ip route connected
C 10.10.10.0/24 is directly connected, GigabitEthernet0/0.10
switch# show ip route connected
C 10.10.10.0/24 is directly connected, Vlan10
The interface name on the connected route is where the gateway lives. If a VLAN has no C route, its interface is not up/up. For trunks, see access port vs trunk port.
When to use which
- A layer 3 switch and heavy inter-VLAN traffic → SVI.
- A small branch or lab with layer 2 switches and one router → router on a stick.
- Inter-VLAN traffic must pass a firewall policy → the same design on firewall subinterfaces.
- A redundant gateway → HSRP or VRRP on SVIs in two layer 3 switches.
Failure 1: the SVI is up/down — no VLAN or no active port
Hosts in that VLAN cannot even ping their gateway.
switch# show ip interface brief | include Vlan
Vlan10 10.10.10.1 YES manual up up
Vlan20 10.10.20.1 YES manual up down
switch# show vlan id 20
VLAN id 20 not found in current VLAN database
A Status of administratively down means no shutdown is missing. If only Protocol is down, create it with vlan 20 and check its access ports or the trunk allowed list.
Failure 2: hosts reach their gateway but not other VLANs
Every SVI is up/up and PCs can ping their own gateway, but not servers in other VLANs. Without ip routing, the switch behaves like a host that owns the SVI addresses and routes nothing.
switch# show ip route
Default gateway is not set
Host Gateway Last Use Total Uses Interface
ICMP redirect cache is empty
This screen instead of a routing table means routing is off. Add ip routing and confirm a C route per VLAN.
Failure 3: router on a stick, and one VLAN cannot reach its gateway
The encapsulation dot1Q 30 subinterface is up/up, yet VLAN 30 hosts fail. The router looks fine; check the switch trunk.
switch# show interfaces trunk | begin allowed
Port Vlans allowed on trunk
Gi1/0/48 10,20
- VLAN 30 is missing from the allowed list — add it with
add(without it, the whole list is replaced) - The native VLAN's gateway must accept untagged frames, so use
encapsulation dot1Q 1 nativeand match the switch's native VLAN. If they differ, it is a native VLAN mismatch
What not to do
- Keeping the same gateway IP live on the router and the SVI mid-migration —
%IP-4-DUPADDRappears and hosts keep flipping between gateway MACs. - Enabling
ip routingbut keeping onlyip default-gateway— it is ignored once routing is on; addip route 0.0.0.0 0.0.0.0instead.
Summary
- Check whether the hosts' gateway is a subinterface or an SVI
- Read that interface's Status and Protocol in
show ip interface brief - For an SVI, check
show vlan briefandshow ip route - For router on a stick, match dot1Q numbers to the trunk's allowed list and native VLAN
To practise one VLAN failing to reach an SVI gateway across a trunk, try A trunk link comes up and one VLAN still fails.
Quick diagnostic checklist
- Check whether the hosts' default gateway is a router subinterface or an SVI on a layer 3 switch.
- Read the gateway interface's Status and Protocol in
show ip interface brief. - An SVI that is administratively down is missing
no shutdown. - For an SVI that is up/down, use
show vlan briefto confirm the VLAN exists and has a port that is up. - If hosts reach their gateway but not other VLANs, check with
show ip routethat ip routing is on. - With
ip routingon, add a default route withip route 0.0.0.0 0.0.0.0instead of relying onip default-gateway. - For router on a stick, confirm each subinterface's
encapsulation dot1Qnumber is in the switch trunk's allowed list. - Put the native VLAN gateway on
encapsulation dot1Q <id> nativeand match the switch's native VLAN.