Multilayer switching
Replace the router-on-a-stick with a layer 3 switch. On MLS1:
- Route between VLAN 10 (
192.168.10.1/24) and VLAN 20 (192.168.20.1/24) with SVIs. - Make Gi0/1 a routed port,
10.0.0.1/30, towards R1 (10.0.0.2). - Add a default route via R1, so the PCs can reach 8.8.8.8 (R1's loopback).
How it works: this is VulnTech NetLab, a network simulator running in your browser. Click a device in the diagram to open its console and type commands, just like on real equipment (? shows help, Tab finishes a word). Click a cable to inspect it. Tasks tick themselves off as you complete them; questions are answered in the box under each task. Your work is kept if you reload; Reset starts the network over.
Solution explanation
The SVIs are the gateways; ip routing lets the switch route between them. no switchport turns Gi0/1 into a routed port so it can hold an IP address on the link to R1, and the default route sends everything else to R1, which already knows the way back to 192.168.0.0/16.
Show solution
[MLS1]
enable
configure terminal
ip routing
interface vlan 10
ip address 192.168.10.1 255.255.255.0
no shutdown
interface vlan 20
ip address 192.168.20.1 255.255.255.0
no shutdown
interface g0/1
no switchport
ip address 10.0.0.1 255.255.255.252
exit
ip route 0.0.0.0 0.0.0.0 10.0.0.2
end
[PC1]
ping 192.168.20.10
ping 8.8.8.8
[PC2]
ping -c 3 8.8.8.8