4

Possible Duplicate:
How does IPv4 Subnetting Work?

I thought I understood this but I am momentarily confused. Here is an example:

Are all IPv4 addresses from 192.168.0.0 to 192.168.255.255 in the private range, regardless of subnet mask / routing prefix?

According to this page http://en.wikipedia.org/wiki/Reserved_IP_addresses, the CIDR prefix 192.168.0.0/16 is not routed on the public internet. My understanding is this means that all IP addresses from 192.168.0.0 to 192.168.255.255 are private, if you are using a subnet mask of 255.255.0.0/routing prefix of 16.

I thought that means if your subnet mask is 255.255.255.0/routing prefix is 24, you are no longer covered in the private range, because you are not on the same subnet when using a prefix of 24 instead of 16.

Is this correct? If this is not correct, can someone explain how the addressing using prefix 24 still covers prefix 16? I know there is a lot of info on the net about subnetting; if there is somewhere that answers this specific question please point me to it.

Edit: is it that a smaller routing prefix would not guarantee the IP to be in the same range, but a larger routing prefix would?

taz
  • 151

2 Answers2

8

Think of the /16 and /24's as a notation for how large a network is. A /24 is ~255 times smaller than a /16, but that does not mean it's not in the same range of addresses.

so yes, 192.168.0.0/24 is private, so is 192.168.1.0/24, as both are subsets of 192.168.0.0/16.

gravyface
  • 13,987
Sirex
  • 5,585
1

Yes, that is correct.

Maybe the wikipedia article should be improved with if you are using a subnet mask of 255.255.0.0/routing prefix of 16 OR SMALLER.

Though I am not sure smaller is clear in this context. Smaller value? Smaller net? Smaller host part. Maybe 192.168/Foo where foo is 16 or larger. (Damm. Clear documentation is hard.)

If one source is confusing then I like to consult another source as reference. Serverfault has one such source at How does IPv4 Subnetting Work?

Hennes
  • 4,852