"William4" <(E-Mail Removed)> wrote in message
news:IZmJg.919$(E-Mail Removed)...
> "Alex Fraser" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
[snip]
>> That is what the notation is: a concise way to describe a (sub)network.
>> For instance, 192.168.0.0/255.255.255.0 means the same as 192.168.0.0/24.
>
> Thanks, I think I was working this backwards (from the lsb). So
> anything/0 is the whole caboodle and anything/31 is just two address then?
> - will they always be .0 & .1 or can you have w.x.y.120/31 for .121
> & .121 ?
A /30 is the smallest useful subnet you can have, but yes, you could have
w.x.y.120/30 for w.x.y.120-123. However, the address ANDed with the
complement of the subnet mask must be zero. So, for example, w.x.y.121/30 is
not valid (use a monospaced font):
mask = /30 (255.255.255.252) = 11111111 11111111 11111111 11111100
~mask = 00000000 00000000 00000000 00000011
address = w.x.y.121 = wwwwwwww xxxxxxxx yyyyyyyy 01111001
address & ~mask = 00000000 00000000 00000000 00000001
This is equivalent to saying that for /30, the last octet of the address
must be a multiple of four. For /29, it must be a multiple of eight, and so
on. For /24 down to /17, similar applies to the third octet and the last
octet must be zero, eg for /22, the third octet must be a multiple of four.
You can probably guess the rest

.
Alex