I'm studying for my networking finals and this thought experiment crossed my mind. I was told that as long as two hosts are in the same subnet they can communicate by using only ARP requests skipping the default-gateway.

Let's suppose that we connect two hosts with a single cable. Is there anything in operating systems or NIC drivers which would prevent two hosts communicating (in the aforementioned way) in subnet /0? Can you essentially create your "own local internet" with all IPv4 (or IPv6) addresses?

In the same setup is it possible to block all communication by setting subnet mask to be /32?

  • Unfortunately, the configuration or behavior of a particular host OS is off-topic here. You could try to ask this question on Server Fault for a business network, or on Super User for a personal network, but what a host does in this situation will completely depend on the host's OS. – Ron Maupin May 22 '17 at 19:20

I don't know platform that allows IP address with mask of 0. So generally the answer is you simply can't use /0.

On the other hand if route is pointing to the interface, hosts with /32 masks can reach each other. Again, not each host allows /32 on the interface configured.


Linux does allow /0 CIDR notation. Behavior doesn't really change: you still can access hosts on shared segment with ip route via interface.

General answer:

If host supports particular CIDR notation and routes are pointing to the interface, it can reach other hosts with similar route configuration. Mask doesn't really matter in this case.

Note: all of above may be useful for educational purposes but is almost not applicable in practice. Don't do this in production.

  • It was obviously educational question, I just don't want to say anything stupid, so I double check my facts. – Daniel Sharp May 22 '17 at 20:45
  • As for an actual testing I've done in a home LAN setting, Windows allows IP's as long as the network bits are not 0 but not for some weird reason. So /0 is out of question in this case. – Daniel Sharp May 22 '17 at 21:01

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