5

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.

5
  • Maybe there's some kind of proxy ARP thing they are running. Commented Aug 5, 2015 at 13:09
  • What do you have set as your default gateway? If its the other computer's IP address, then that would be why it is working.
    – Eddie
    Commented Aug 5, 2015 at 13:32
  • I have not configured a default gateway on either computer.
    – albinotuba
    Commented Aug 5, 2015 at 13:34
  • What OSs? What does tcpdump/wireshark on the receiver say about who is sending the ICMP traffic? Are you sure that you're using /30 prefix, and that only one IP/prefix is configured on the NICs involved? Are there any other configured NICs on the system (connected to a mutual network)?
    – stevieb
    Commented Aug 5, 2015 at 14:14
  • Mac OS 10.10 on one and 10.8 on the other. Wireshark shows an ARP broadcast from the pinging computer (10.0.0.6) asking who has 10.0.0.1, and then 10.0.0.1 responds with its MAC address, and then they ping. I don't see anything out of the ordinary going on in Wireshark. I'm almost completely certain I configured the subnets correctly. It's always possible that I made a stupid mistake. I'm using 255.255.255.252 on both computers. They both have Wifi and other NICs, but they are all disabled. Only ethernet is active.
    – albinotuba
    Commented Aug 5, 2015 at 14:27

1 Answer 1

5

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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.