Labs · · 5 min read

Lab na-12 - Router-on-a-Stick Inter-VLAN Routing

Lab na-12 - Router-on-a-Stick Inter-VLAN Routing - PingLabz Labs article title card

Router-on-a-stick is the classic technique for routing between VLANs using a router with only one physical interface to a switch. The interface becomes a trunk; the router has a virtual subinterface for each VLAN, each with its own IP address and its own VLAN ID via 802.1Q encapsulation. The result: the router can route between VLANs even though it has only one cable to the switch. This lab configures it on the base topology with R1 + SW1.

What you will learn

  • The router-on-a-stick architecture: trunk to the switch, subinterfaces with dot1Q encapsulation
  • How to configure a subinterface and assign it to a VLAN
  • How to configure a switchport as a trunk that carries multiple VLANs to a router
  • The output of show vlans on a router (the router-side VLAN table)
  • The historic vs modern use case (when this is the right design vs when SVI on L3 switch wins)

What this lab does NOT cover

  • SVI on L3 switch (the modern alternative) - that is na-13
  • Multiple physical interfaces to the same switch (typical of pre-trunk designs)
  • Inter-VLAN routing on a multi-area OSPF design

Topology

Download the PingLabz CCNA Base Topology .yaml

The PingLabz CCNA Base Topology - three iol-xe routers + one alpine host + one ioll2-xe managed switch + one unmanaged switch. The reusable foundation.

Download PingLabz CCNA Base Topology

Read next

Terminal card showing a repeating CDP native VLAN mismatch log naming Ethernet0/0 native VLAN 1 against SW2 Ethernet0/0 native VLAN 99
VLANs ·

Native VLAN Mismatch: Read the CDP Log, Fix the Trunk

%CDP-4-NATIVE_VLAN_MISMATCH hands you both interfaces and both native VLANs in one line. The real damage is underneath it: untagged frames get re-homed at the trunk boundary and two VLANs quietly become one. Captured live on IOS XE 17.18.2 in CML.