Back to course

Inter-VLAN Routing: Router-on-a-Stick (RoaS)

CCNA: 0 to Hero - Comprehensive Network Engineering Bootcamp

Lesson 27: Inter-VLAN Routing: Router-on-a-Stick (RoaS)

VLANs separate broadcast domains, meaning hosts in different VLANs cannot communicate without a Layer 3 device (a router) to route traffic between them.

Router-on-a-Stick (RoaS) Concept

RoaS uses a single physical router interface connected to a switch trunk port. The router interface is logically divided into multiple subinterfaces, one for each VLAN.

The Subinterface Acts as the Default Gateway for its respective VLAN.

RoaS Configuration Steps

  1. Configure the Router Physical Interface: Use no shutdown.
  2. Create and Configure Subinterfaces:

ios ! Assume router is connected to Gi0/0 and we need to route VLAN 10 (192.168.10.0/24) and VLAN 20 (192.168.20.0/24)

Router(config)# interface GigabitEthernet 0/0.10 Router(config-subif)# encapsulation dot1Q 10 Router(config-subif)# ip address 192.168.10.1 255.255.255.0 Router(config-subif)# exit

Router(config)# interface GigabitEthernet 0/0.20 Router(config-subif)# encapsulation dot1Q 20 Router(config-subif)# ip address 192.168.20.1 255.255.255.0 Router(config-subif)# no shutdown

  1. Ensure Switch Trunk: The switch port connecting to the router must be configured as a trunk, allowing VLANs 10 and 20.