Build the two-subnet lab every later lab uses
Task
Build the three-VM topology from the lesson and prove that a packet crosses between the two subnets. Every hands-on lab after this one assumes it exists, so this is the one to get right.
When you are finished you will have Host A on 192.168.10.0/24, Host B on 192.168.20.0/24, and a router VM with one foot in each — and you will have watched a ping cross it.
Steps
- Create two host-only networks in your hypervisor. Turn the hypervisor's own DHCP server off on both. You want to assign addresses yourself, because knowing every address in the lab is most of its value.
- Create the router VM with two adapters, one on each host-only network. Give them 192.168.10.1/24 and 192.168.20.1/24.
- Enable forwarding on the router so it will actually route:
sudo sysctl -w net.ipv4.ip_forward=1. Add it to/etc/sysctl.confto survive a reboot. - Create Host A on host-only network 1 with 192.168.10.10/24 and a default gateway of 192.168.10.1. Create Host B on network 2 with 192.168.20.10/24 and gateway 192.168.20.1.
- Snapshot all three VMs and name the snapshot
clean. Do this now, before you break anything — a lab you cannot reset is a lab you stop using.
Verify
From Host A:
ip -br addr show
ip route show
ping -c 3 192.168.20.10
traceroute -n 192.168.20.10
The ping must succeed and the traceroute must show two hops: 192.168.10.1, then 192.168.20.10. One hop means you are not routing — check the gateway. No hops means forwarding is off on the router.
Notes
If the ping fails, work the layers in order rather than guessing. ip -br addr proves the interface is configured; ping 192.168.10.1 from Host A proves the first subnet works; sysctl net.ipv4.ip_forward on the router proves it will forward; and a firewall on either host is the next suspect after that.
Keep this lab. Rebuilding it for every later exercise is the single biggest time cost in the course, and the snapshot is what avoids it.