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.

The Book is Here... and Now On Sale!

The whole site in one document for easy reference!
The TCP/IP Guide

Custom Search







Table Of Contents  The TCP/IP Guide
 9  TCP/IP Lower-Layer (Interface, Internet and Transport) Protocols (OSI Layers 2, 3 and 4)
      9  TCP/IP Internet Layer (OSI Network Layer) Protocols
           9  Internet Protocol (IP/IPv4, IPng/IPv6) and IP-Related Protocols (IP NAT, IPSec, Mobile IP)
                9  Internet Protocol Version 4 (IP, IPv4)
                     9  IP Addressing
                          9  IP Subnet Addressing ("Subnetting") Concepts

Previous Topic/Section
IP Default Subnet Masks For Address Classes A, B and C
Previous Page
Pages in Current Topic/Section
1
234
Next Page
IP Subnet Identifiers, Subnet Addresses and Host Addresses
Next Topic/Section

IP Custom Subnet Masks
(Page 1 of 4)

It's important to understand what default subnet masks are and how they work. A default subnet mask doesn't really represent subnetting, however, since it is the case where we are assigning zero bits to the subnet ID. To do “real” subnetting we must dedicate at least one of the bits of the pre-subnetted host ID to the subnet ID, as shown in the example in the topic that introduced subnet masks.

Since we have the ability to customize our choice of dividing point between subnet ID and host ID to suit the needs of our network, this is sometimes called customized subnetting. The subnet mask that we use when creating a customized subnet is, in turn, called a custom subnet mask. The custom subnet mask is used by network hardware to determine how we have decided to divide the subnet ID from the host ID in our network.

Deciding How Many Subnet Bits to Use

The key decision in customized subnetting is how many bits to take from the host ID portion of the IP address to put into the subnet ID. Recall that the number of subnets possible on our network is two to the power of the number of bits we use to express the subnet ID, and the number of hosts possible per subnet is two to the power of the number of bits left in the host ID (less two, which I will explain later in this topic).

Thus, the decision of how many bits to use for each of the subnet ID and host ID represents a fundamental trade-off in subnet addressing:

  • Each bit taken from the host ID for the subnet ID doubles the number of subnets that are possible in the network.

  • Each bit taken from the host ID for the subnet ID (approximately) halves the number of hosts that are possible within each subnet on the network.
Subnetting Bit Allocation Options

Let's take a brief example or two to see how this works. Imagine that we start with a Class B network with the network address 154.71.0.0. Since this is Class B, 16 bits are for the network ID (154.71) and 16 are for the host ID. In the default case there are no subnets (well, one “subnet” that is the whole network) and 65,534 hosts total. To subnet this network, we have a number of choices:

  1. We can decide to use 1 bit for the subnet ID and 15 bits for the host ID. If we do this, then the total number of subnets is 21 or 2: the first subnet is 0 and the second is 1. The number of hosts available for each subnet is 215-2 or 32,766.

  2. We can use 2 bits for the subnet ID and 14 for the host ID. In this case, we double the number of subnets: we now have 22 or 4 subnets: 00, 01, 10 and 11 (subnets 0, 1, 2 and 3). But the number of hosts is now only 214-2 or 16,382.

  3. We can use any other combination of bits that add up to 16, as long as they allow us at least 2 hosts per subnet: 4 and 12, 5 and 11, and so on.

Previous Topic/Section
IP Default Subnet Masks For Address Classes A, B and C
Previous Page
Pages in Current Topic/Section
1
234
Next Page
IP Subnet Identifiers, Subnet Addresses and Host Addresses
Next Topic/Section

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!
Donate $2
Donate $5
Donate $10
Donate $20
Donate $30
Donate: $



Home - 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.