Date: Fri, 30 Jul 1999 16:31:08 +0100 From: Ben Smithurst <ben@scientia.demon.co.uk> To: Summoner <summoner@uswest.net> Cc: questions@freebsd.org Subject: Re: 172.16.0.0 private net question Message-ID: <19990730163108.A9024@lithium.scientia.demon.co.uk> In-Reply-To: <37A10A17.B3EA8C04@uswest.net> References: <37A10A17.B3EA8C04@uswest.net>
next in thread | previous in thread | raw e-mail | index | archive | help
Summoner wrote: > Is the 172.16.0.0 private network range 172.16.0.0 to 172.31.255.255, > or 172.0.0.0 to 172.16.255.255? The netmask is 255.240.0.0, a 12-bit > mask. So it makes sense, mathematically, to me, at least, that the IP > range would be 172.0 to 172.16. But RFC1918 says it's 172.16 to > 172.31. Does the 172.16 net just have the 12th bit always on or > something? No, it's 172.16/12. When written in binary, decimal: 172 . 16 . 0 . 0 binary: 10101100 . 00010000 . 00000000 . 00000000 The /12 means the first 12 bits are constant in that netblock (they're the "network" part), whatever they may be, there's no reason for the second octet to be zero as you assumed above. So 172.16.0.0 is the first valid address, as shown above. If you change all the non-constant bits (the "host" part) to 1s, you get decimal: 172 . 31 . 255 . 255 binary: 10101100 . 00011111 . 11111111 . 11111111 So 172.31.255.255 is the last valid address. 172.0/12 would be another netblock, with valid addresses from 172.0.0.0 to 172._15_.255.255 (not .16. as you said above). If you wanted 172.16.0.0 to 172.16.255.255 you'd have to combine 172.0/12 and 172.16/16, I think. But that's not what you asked, so I won't go into detail. Does this clear it up at all? (If I've lived up to my normal standard of explaining things, it won't have helped at all :-) -- Ben Smithurst | PGP: 0x99392F7D ben@scientia.demon.co.uk | key available from keyservers and | ben+pgp@scientia.demon.co.uk To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?19990730163108.A9024>