Inter-VLAN routing forwards traffic between subnets assigned to different VLANs. VLANs segment a LAN at Layer 2, while routing connects those segments at Layer 3; hosts use a router interface or SVI as their default gateway. section 12.0 section 12.4
Choose an inter-VLAN routing design according to the available hardware and physical links:
- Use separate router interfaces and switch access ports, with one physical link per subnet. This is simple but consumes ports quickly as VLAN count grows. section 12.4
- Use router on a stick (ROAS): connect one router interface to a switch trunk and create one router subinterface per VLAN. section 12.4.1
- Use a multilayer switch, which routes internally through switch virtual interfaces (SVIs) and does not require an external router for internal VLAN traffic. section 12.4.2
ROAS for VLANs 10, 20, and 30
Configure the switch-to-router link as an 802.1Q trunk, allow only VLANs 10, 20, and 30, and use an unused native VLAN. On R1, enable G0/0, then create subinterfaces whose VLAN associations and gateway addresses match the VLANs: G0/0.10 with 172.16.1.1/26, G0/0.20 with 172.16.1.65/26, and G0/0.30 with 172.16.1.129/26. A frame from VLAN 20 reaches R1 tagged, is routed, and leaves toward VLAN 10 in a newly addressed frame. section 12.4.1
Figure 12.10 PC3 (in VLAN 20) sends a packet to PC10 (in VLAN 10), and the packet is routed using the router on a stick method. R1’s G0/0 interface has three subinterfaces: G0/0.10 (VLAN 10, 172.16.1.1), G0/0.20 (VLAN 20, 172.16.1.65), and G0/0.30 (VLAN 30, 172.16.1.129). PC3’s frame to R1 is tagged in VLAN 20 over the trunk link from SW1 G0/1 and R1 G0/0. R1’s frame to PC10 is tagged in VLAN 10 over the trunk link from R1 G0/0 to SW1 G0/1, and the trunk link from SW1 G0/0 to SW2 G0/0.
Trace a VLAN 20 packet through a ROAS trunk, router subinterfaces, and the VLAN 10 destination. section 12.4.1
Figure 12.11 SW1, a multilayer switch, routes a packet from PC1 to PC5. SW1 has three SVIs: VLAN 10 (172.16.1.1), VLAN 20 (172.16.1.65), and VLAN 30 (172.16.1.129), allowing SW1 to route packets internally, without relying on an external router.
Visualize a multilayer switch routing between VLAN 10, VLAN 20, and VLAN 30 through its SVIs. section 12.4.2
