Intro to Router-on-Stick Inter-VLAN Routing

We learned in a previous lesson that legacy inter-VLAN routing requires multiple physical interfaces on both the router and the switch. But in the ‘Router-on-stick’ configuration only one physical interface needed on both sides. The Router-on-a-stick allows routing packets to subnets associated with VLANs connected to a router 802.1Q trunk.

The Router-on-Stick uses VLAN trunking configuration and creates a virtual interface connected to each VLAN. The router creates multiple virtual interfaces for each associated VLAN, and then it handles all frames tagged with that VLAN ID as if they came in and out of that virtual interface. The virtual interfaces also called sub-interfaces of the router.

The sub-interfaces are software-based interfaces; associated with a single physical interface. The sub-interfaces are configured in router’s IOS, each sub-interface is independently working with IP address and VLAN assignment.  The sub-interfaces makes routing possible within the network between different VLANs.

The router-on-stick method can work and communicate up to 50 VLANs. So, if our network has more than 50 VLAN, then we cannot use Router-on-Stick method normally. The figure below illustrates the Router-on-Stick configuration. The switch is connected to the Router1 using a single; physical network connection (a trunk). The router physical interface has two subinterfaces for both VLAN 100 and VLAN 200.


The topology has two VLANs configured on the switch0 and two sub-interfaces configured on Router0. Both sub-interfaces of the router needed to work as 802.1Q trunk and the switch port as trunk mode. So the router receives VLAN-tagged traffic from the trunk on any of sub-interface and processes the packet for routing decision.

The Host 1 on VLAN 100 is communicating with Host 2 on VLAN 200 through Router0 using a single physical router interface. The host 1 sends its unicast traffic to switch0. The switch0 then tags the unicast traffic as originating on VLAN 100 and forwards the unicast traffic out to its trunk link (G0/1), connected with the Router0.

The Router0 accepts the tagged unicast traffic on VLAN 100 and routes it to VLAN 200 using its configured sub-interfaces because the sub-interfaces directly connected with the both of the LAN. The figure below illustrates the directly connected sub-interfaces.

The Router0 tagged the unicast traffic as VLAN 30 and sent out to the switch0 using the trunk link. The switch will now remove the VLAN tag of the unicast frame and forwards the frame out to host 2 of VLAN 200.

Intro to Router-on-Stick Inter-VLAN Routing 1

Configure Router-on-a-Stick

Legacy inter-VLAN routing needed the physical interface for each VLAN, and the router has a limited number of physical interfaces. So, the use of Legacy Inter-VLAN routing is very limited. As the number of VLAN increased on a network, more physical interfaces needed.

So, this configuration is not possible to use in the large network. So, the next solution for up to 50 VLAN is Router-on-a-Stick configuration. The router on Stick configuration uses VLAN trunking and sub-interfaces.

As we learned in the previous article that VLAN trunking allows a single physical router interface to route traffic for many VLANs. This technique overcomes the hardware limitations based on physical router interfaces. The figure below illustrates the Router-on-Stick configuration.

When configuring inter-VLAN routing using the router-on-a-stick model, the connected switch port must be configured as a trunk. On the router, subinterfaces for each unique VLAN on the network needed and must be assigned an IP address specific to its subnet/VLAN and is also configured to tag frames for that VLAN. So we are going to configure Router-on-Stick inter-VLAN routing.

Configure Router-on-a-Stick – Switch

The Router-on-Stick configuration needed Trunk link connected to the physical interface of the Router. The Figure above illustrates, that the Switch port G0/1 connected to the physical interface of the router.

So to enable inter-VLAN routing using router-on-a-stick, configure the trunk. Following is the switch configuration for this model of inter-VLAN routing.

Intro to Router-on-Stick Inter-VLAN Routing 2

Configure Router-on-a-Stick – Router

We just configure the switch for a router on stick model. So, let us configure the router sub-interfaces for this model. We have two VLANs on the switch, So, we need two sub-interfaces.

The figure below illustrates the configuration of the router for the router-on-stick model. We have configured two sub-interfaces according to the VLAN structure. Now both VLAN can communicate with each other. You can see the video for configuration.

Intro to Router-on-Stick Inter-VLAN Routing 3