This lab demonstrates Inter-VLAN Routing using Router-on-a-Stick (ROAS) across two switches.
| VLAN | Network |
|---|---|
| VLAN 10 | 10.0.0.0/26 |
| VLAN 20 | 10.0.0.64/26 |
| VLAN 30 | 10.0.0.128/26 |
interface range f0/1-2
switchport mode access
switchport access vlan 10
interface range f0/3-4
switchport mode access
switchport access vlan 30interface range f0/2-3
switchport mode access
switchport access vlan 10
interface f0/1
switchport mode access
switchport access vlan 20interface g0/1
switchport mode trunk
switchport trunk allowed vlan 10,20,30
switchport trunk native vlan 1002interface g0/1
switchport mode trunk
switchport trunk allowed vlan 10,20,30
switchport trunk native vlan 1002interface g0/2
switchport mode trunk
switchport trunk allowed vlan 10,20,30
switchport trunk native vlan 1002interface g0/0
no shutdown
interface g0/0.10
encapsulation dot1q 10
ip address 10.0.0.62 255.255.255.192
interface g0/0.20
encapsulation dot1q 20
ip address 10.0.0.126 255.255.255.192
interface g0/0.30
encapsulation dot1q 30
ip address 10.0.0.190 255.255.255.192ping 10.0.0.1
ping 10.0.0.65
ping 10.0.0.129❌ Issue: VLANs could not communicate ✅ Cause: Trunk allowed VLAN mismatch
switchport trunk allowed vlan 10,20,30💡 Always ensure trunks match on both sides
✔ Full inter-VLAN connectivity achieved ✔ ROAS working correctly ✔ Trunking verified
- Trunks must match on BOTH sides
- ROAS enables routing with one interface
- VLAN design + trunking = foundation of networking
💬 This lab helped reinforce trunk consistency and real-world troubleshooting skills.










