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?