Inter-VLAN Routing: Mastering Router on a Stick
Inter-VLAN routing enables communication between different VLANs by using a Layer 3 device; the 'Router on a Stick' method uses a single router interface divided into multiple subinterfaces.
Why Inter-VLAN Routing?
VLANs inherently isolate traffic at Layer 2. If a host in VLAN 10 needs to send data to a host in VLAN 20, the traffic must be routed at Layer 3. This process is called **Inter-VLAN routing**. It requires a router or a Layer 3 switch to examine the destination IP address and forward the packet to the appropriate VLAN.
Router on a Stick Architecture
**Router on a Stick (ROAS)** is a classic design where a single physical interface on a router connects to a trunk port on a switch. The router interface is divided into logical **subinterfaces**, each acting as the default gateway for a specific VLAN. This saves physical router ports and switch ports while enabling full inter-VLAN communication.
Configuring ROAS
To configure ROAS, first enable the physical interface with `no shutdown`. Then, create subinterfaces (e.g., `interface GigabitEthernet0/0.10`). Under the subinterface, specify the encapsulation and VLAN ID using `encapsulation dot1Q 10`, and assign an IP address using `ip address [ip] [mask]`. Ensure the connected switch port is configured as an 802.1Q trunk.
❓ Frequently Asked Questions
Is Router on a Stick scalable for large networks?
No, ROAS can become a bottleneck due to the single physical link. Layer 3 switches (SVIs) are preferred for large networks.
Do subinterfaces need to be enabled with 'no shutdown'?
Subinterfaces inherit the state of the physical interface; you only need to issue 'no shutdown' on the main physical interface.
What is an SVI?
A Switch Virtual Interface (SVI) is a logical Layer 3 interface on a multilayer switch used for inter-VLAN routing.