Router on a Stick Inter-VLAN Routing (ROS)
The Router on a Stick Inter-VLAN routing solution (aka. Lollipop Router) solves the limitation of Legacy Inter-VLAN routing. This methodology simply requires one physical Ethernet interface on a router to route traffic between multiple VLANs
Such method is achieved by configuring an Interface as an 802.1Q trunk and connecting it to a trunk port on a Layer 2 switch. A router interface is configured using sub-interfaces per VLAN
The sub-interfaces are software-based virtual interfaces. Each interface is independently configured with an IP address and assigned to a VLAN. Sub-interfaces are configured for different subnets that correspond to their VLAN assignment.
When VLAN-Tagged traffic enters the interface, it is then forwarded to the VLAN logical sub-interface. A router will make a routing decision and after determining the exit interface for such traffic, the frames will be VLAN-Tagged with the new VLAN and sent out the physical interface.
- Interface G0/0/0 was segmented into 3 sub-interfaces representing 3 different VLANS (10,20 and 30)
- F0/1 on Switch 1 is configured as a TRUNK (accepting and forwarding traffic to/from all VLANS) and is connected to R1 via interface G0/0/0
- F0/2 on Switch 1 is also configured as a TRUNK port since it’s a Switch to Switch communication and is via interface F0/1 to R2
- F0/3 on Switch 1 is an access port forwarding only VLAN10 tagged traffic, PC1 is on VLAN10 connected to Switch 1
- F0/10 on Switch 2 is also an access port forwarding only VLAN10 tagged traffic, PC2 is on VLAN10 connected to Switch 2
- F0/20 on Switch 2 is an access port forwarding only VLAN20 tagged traffic, PC3 is on VLAN20
- F0/30 on Switch 2 is an access port forwarding only VLAN30 tagged traffic, PC4 is on VLAN30
| Port | MAC Address | VLAN |
|---|---|---|
| SW1 F0/1 (T) | TRUNK | 10,20,30 |
| SW1 F0/2 (T) | TRUNK | 10,20,30 |
| SW1 F0/3 (A) | PC1 MAC | 10 |
| SW2 F0/1 (T) | TRUNK | 10,20,30 |
| SW2 F0/10 (A) | PC2 MAC | 10 |
| SW2 F0/20 (A) | PC3 MAC | 20 |
| SW2 F0/30 (A) | PC4 MAC | 30 |
In this scenario, all PCs 1,2, and 3 can communicate with each other via the Router on a Stick (aka. Lollipop Router) solution. When R1 accepts the tagged unicast traffic on a specific VLAN, it routes that traffic to other VLANS, using its configured sub-interfaces.
The trunk links must be used between intermediary devices for all tagged traffic to go forward.
[NOTE] Such a solution of Inter-VLAN Routing, does not scale beyond 50 VLANS.