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!

Enjoy The TCP/IP Guide? Get the complete PDF!
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 Subnetting: Practical Subnet Design and Address Determination Example

Previous Topic/Section
IP Subnetting Step #3: Determining The Custom Subnet Mask
Previous Page
Pages in Current Topic/Section
1
2
345
Next Page
IP Subnetting Step #5: Determining Host Addresses For Each Subnet
Next Topic/Section

IP Subnetting Step #4: Determining Subnet Identifiers and Subnet Addresses
(Page 2 of 5)

Class C Subnet ID and Address Determination Example

Recall our Class C network, 211.77.20.0. The network address in binary is:

11010011 01001101 00010100 00000000

We are subnetting using 3 bits for the subnet ID, leaving 5 bits for the host ID. Now let's see the network address with the subnet bits in bold:

11010011 01001101 00010100 00000000

These are the bits we substitute with the subnet ID for each subnet. Notice that since the first three octets contain network ID bits, and the network ID is the same for every subnet, they never change. We don't even really need to look at them in binary form, though for clarity we will do so.

Here's how we determine the subnet IDs and addresses, again, starting with 0 (see Figure 78):

0. Subnet #0 has a subnet ID of 0, or 000 in binary. To find the address, we start with the network address in binary, and substitute “000” for the subnet ID bits. Well gee, those bits are already all zero! What this means is that the address for subnet #0 is the same as the address for the network as a whole: 211.77.20.0.

This is always the case: subnet #0 always has the same address as the network.

  1. Subnet #1 has a subnet ID of 1 in decimal or 001 in binary. To find the address we substitute “001” for the subnet ID bits, to yield the following:
11010011 01001101 00010100 00100000
Converting to decimal, we get 211.77.20.32.
  1. Subnet #2 has a subnet ID of 2, or 010 in binary. To find its address we substitute “010” for the subnet ID bits, to give:
11010011 01001101 00010100 01000000
Which is 211.77.20.64 in binary.
  1. Subnet #3 has a subnet ID of 011. As we can see the first three octets of the address are always 211.77.20. The last octet here is “01100000”, which is 96 in decimal, so the whole address is 211.77.20.96.

    Figure 78: Determining Subnet Addresses For A Class C Network

    This diagram shows each of the 8 possible subnets created when we use 3 bits for the subnet ID in a Class C network. The binary subnet ID is simply substituted for the subnet bits, and the resulting 32-bit number converted to dotted decimal form.

     


Starting to see a pattern here? Yep, the address of any subnet can be found by adding 32 to the last octet of the previous subnet. This pattern occurs for all subnetting choices; the increment depends on how many bits we are using for the subnet ID. Here, the increment is 32, which is 25; 5 is the number of host ID bits left after we took 3 subnet ID bits.

  1. Subnet #4 is 100, address is 211.77.20.128.

  2. Subnet #5 is 101, address is 211.77.20.160.

  3. Subnet #6 is 110, address is 211.77.20.192.

  4. Subnet #7 is 111, address is 211.77.20.224.

Key Concept: The subnet addresses in a subnetted network are always evenly spaced numerically, with the spacing depending on the number of subnet ID bits.


We only needed seven subnets in our example, #0 through #6. Subnet #7 would be a spare. Notice that the last subnet has the same last octet as the subnet mask for our network? That's because we substituted “111” for the subnet ID bits, just as we did when we calculated the subnet mask.


Previous Topic/Section
IP Subnetting Step #3: Determining The Custom Subnet Mask
Previous Page
Pages in Current Topic/Section
1
2
345
Next Page
IP Subnetting Step #5: Determining Host Addresses For Each Subnet
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.