My bare knuckles networking understanding led me to believe that if I set an IP address of, for example, 10.0.2.25 with netmask 255.255.0.0 on a machine, it should see all hosts in the subnet 10.0.1.0/24 (and many others on the whole 10.0.0.0/16 subnet)
I just tried it, but the machine with 10.0.2.25/16 didn't see at all 10.0.1.0/24 addresses.
Two questions:
- How to set up such a network simply?
- What's the mistake in my understanding?
10.0.2.25/16 can send packets to 10.0.1.0/24, but when 10.0.1.0/24 tries to respond it thinks the opther host is outside it's network hence will try to send the packets back through a router (or fail).
Just as you did, you got it right in principal, there must just be an issue with the implementation - certainly there's nothing wrong with the idea of doing what you did.
Nothing, you just need to ensure that this use of a /16 is implemented everywhere appropriate, on every machine in that range, in every router etc.
Use of non-/24 netmasks is extremely common these days and works great, but you do need to ensure they're properly, and thoroughly, implemented.
Otherwise good work ;)
Obviously, if the other machine is a /24, it can only see machines in that scope. The subnet masks need to match if they are going to be visible to one another.