Gateway on the Wrong Subnet
Lesson 25 of 35 in Coddy's LAN Labs course.
A default gateway must be reachable directly: it has to sit inside the host's own subnet, because the host reaches it without any routing. Pointing pc1 in 192.168.1.0/24 at a gateway of 10.0.0.1 is a contradiction, even though 10.0.0.1 is a perfectly good router address on the other side.
Both tools catch it: the ping explains the contradiction, and check reports it as an ERROR. The right gateway is the router's address in the host's network.
Challenge
EasyPing pc3 from pc1, run the check, point pc1 at the router's address in its own network (192.168.1.1), and ping again.
Expected output:
pc1 -> pc3: unreachable (gateway 10.0.0.1 is not in pc1's subnet 192.168.1.0/24)
ERROR pc1: gateway 10.0.0.1 is outside its subnet 192.168.1.0/24
Lab check: 1 problem(s) found
pc1: gateway 192.168.1.1
pc1 -> pc3: reply from 10.0.0.20 (ttl=63, via r1)Try it yourself
All lessons in LAN Labs
2Addresses on the LAN
Giving a Host an AddressThe First PingWhat ARP LearnedThe Switch Learns TooRecap - First Conversation8Capstone - Fix the Branch
Survey the DamageFix the Address ClashMasks and GatewaysRecap - Prove It Works3Masks Matter
Wrong Mask, No ReplySame Switch, Other SubnetLet check Do the LookingRecap - Diagnose the Pair6Troubleshooting II
Two Devices, One AddressThe Network Address TrapGateway on the Wrong SubnetRecap - The Silent RouterPractice on your own: Terminal playground