Subnet – Pinging across different subnets? This shouldn’t work but it does

arppingsubnet

I have two computers: PC1 and PC2. PC1 has an IP address of 10.0.0.1/30, and PC2 has an IP address of 10.0.0.6/30. They are connected directly to each other with a crossover cable. My understanding is that they should not be able to ping each other, but I just tested it, and they can both ping each other. Have I misunderstood something about how subnets work?

Thanks!

EDIT: I can change the IP addresses and subnet masks to anything I want, and they can still ping.

Best Answer

I have seen this before on other host types. Putting in default gateway addresses should prevent this behavior. Without a default gateway, the host sends an ARP for the other host's layer-3 address, and it receives a reply because the hosts are on the same layer-2 domain. With a default gateway, the host would ARP for the gateway's layer-3 address, not the other host's layer-3 address, but there is no gateway address for which to ARP.

Related Topic