Please Whitelist This Site?
I know everyone hates ads. But please understand that I am providing premium content for free that takes hundreds of hours of time to research and write. I don't want to go to a pay-only model like some sites, but when more and more people block ads, I end up working for free. And I have a family to support, just like you. :)
If you like The TCP/IP Guide, please consider the download version. It's priced very economically and you can read all of it in a convenient format without ads.
If you want to use this site for free, I'd be grateful if you could add the site to the whitelist for Adblock. To do so, just open the Adblock menu and select "Disable on tcpipguide.com". Or go to the Tools menu and select "Adblock Plus Preferences...". Then click "Add Filter..." at the bottom, and add this string: "@@||tcpipguide.com^$document". Then just click OK.
Thanks for your understanding!
Sincerely, Charles Kozierok
Author and Publisher, The TCP/IP Guide
NOTE: Using software to mass-download the site degrades the server and is prohibited.
If you want to read The TCP/IP Guide offline, please consider licensing it. Thank you.
IP Custom Subnet Masks
(Page 4 of 4)
Subtracting Two From the Number of Hosts Per Subnet and (Possibly) Subnets Per Network
There's one more issue that needs
to be explained regarding the split into subnet ID and host ID. We've
already seen how in regular classful addressing, we must
subtract 2 from the number of hosts allowed in each network. This is
necessary because two host IDs in each subnet have special
meanings: the all-zeroes host ID
meaning this network, and the all-ones host ID which is
a broadcast to all hosts on the network. These restrictions
apply also to each subnet under subnetting too, which is why we must
continue to subtract 2 from the number of hosts per subnet. (This is
also why dividing the 8 host ID bits of a Class C network into 7 bits
for subnet ID and 1 bit for host ID is not just silly, but in fact meaningless:
it leaves 21-2=0 hosts per subnet. Not particularly useful.)
There is a similar issue that occurs
with the subnet ID as well. When subnetting was originally defined in
RFC 950, the standard specifically excluded the use of the all-zeroes
and all-ones subnets. This was due to concern that routers might become
confused by these cases. A later standard, RFC 1812 (Requirements
for IP Version 4 Routers) removed this restriction in 1995.
Thus, modern hardware now has no problem with the all-zeroes or all-ones
subnets, but some very old hardware may still balk at it.
Key Concept: The number of hosts allowed in each subnet is the binary power of the number of host ID bits remaining after subnetting, less two. The reduction by two occurs because the all-zeroes and all-ones host IDs within each subnet are reserved for two special meaning addresses: to refer to the subnetwork itself and its local broadcast address. In some implementations, the number of subnets is also reduced by two because the all-zeroes and all-ones subnet IDs were originally not allowed to be used.
For this reason, you will sometimes
see discussions of subnetting that exclude these cases. When that is
done, you lose 2 potential subnets: the all-zeroes and all-ones subnets.
If you do this, then choosing 1 bit for subnet ID is no longer valid,
as it yields 21-2=0 subnets. You must choose 2 bits if you
need 2 subnets.
Note: In this Guide I assume we are dealing with modern hardware and do not exclude the all-zeroes and all-ones subnets, but I do try to make explicit note of this fact wherever relevant.
|If you find The TCP/IP Guide useful, please consider making a small Paypal donation to help the site, using one of the buttons below. You can also donate a custom amount using the far right button (not less than $1 please, or PayPal gets most/all of your money!) In lieu of a larger donation, you may wish to consider purchasing a download license of The TCP/IP Guide. Thanks for your support!|
Table Of Contents - Contact Us
The TCP/IP Guide (http://www.TCPIPGuide.com)
Version 3.0 - Version Date: September 20, 2005
© Copyright 2001-2005 Charles M. Kozierok. All Rights Reserved.
Not responsible for any loss resulting from the use of this site.