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 Subnetting Step #5: Determining Host Addresses For Each Subnet
(Page 3 of 3)
"Shortcuts" For Quickly Computing Host Addresses
As you can see, defining the host
IDs is really quite straight-forward. If you can substitute bits and
convert to decimal, you have all you need to know. You can also see
that as was the case with defining the subnet addresses, there are patterns
that you can use in defining host IDs and understanding how they work.
These generally define ways that we can more quickly determine certain
host addresses by working directly in decimal instead of bothering with
binary substitutions. This is a bit more complex conceptually, so only
proceed if you are feeling a bit brave.
The following are some of the shortcuts
you can use in determining host IP addresses in a subnet environment:
- First Host Address: The first host
address is always the subnet address with the last octet incremented
by 1. So, in our class C example, subnet #3's base address is 220.127.116.11.
The first host address in subnet #3 is thus 18.104.22.168.
- Subsequent Host Addresses: After you find
the first host address, to get the next one you just add one to the
last octet of the previous address. If this makes the last octet 256
(which can happen only if there are more than 8 host ID bits) you wrap
around this to zero and increment the third octet.
- Directly Calculating Host Addresses: If
the number of host ID bits is 8 or less, you can find host #N's address
by adding N to the last octet's decimal value. For example,
in our class C example, subnet #3's base address is 22.214.171.124. Therefore,
host #23 in this subnet has an address of 126.96.36.199.
If there are more than 8 bits in the host ID, this only works for the
first 255 hosts, after which you have to wrap around and
increase the value of the third octet. Consider again subnet #13 in
our Class B example, which has a base address of 188.8.131.52. Host
#214 on this subnet has address 184.108.40.206, but host #314 isn't 220.127.116.114.
It is 18.104.22.168 (host #255 is 22.214.171.124, then host #256 is
126.96.36.199, and we count up 58 more (314-256) to get to #314, 188.8.131.52).
- Range Of Host Addresses: The range of
hosts for any subnet is determined as follows:
- First Address: Base address of subnet
with last octet incremented by one.
- Last Address: Base address of next
subnet after this one, less two in the last octet (which may
require changing a 0 in the last octet to 254
and reducing the value of the third octet by 1).
For example, consider subnet
#17 in our Class B example. Its subnet address is 184.108.40.206. The
address of subnet #18 is 220.127.116.11. So, the range of hosts for subnet
#17 is 18.104.22.168 to 22.214.171.124.
- Broadcast Address: The broadcast address
for a subnet is always one less than the base address of the subsequent
subnet. Or alternately, one more than the last real
host address of the subnet. So, for subnet #17 in our Class B example,
the broadcast address is 126.96.36.199.
Did I just confuse you? Well, remember,
these are shortcuts and sometimes when you take a shortcut you get lost.
J Just kidding,
it's really not that hard once you play around with it a bit.
In closing, remember the following
quick summary when working with IP addresses in a subnet environment:
- The network ID is the same for all
hosts in all subnets, and all subnets in the network.
- The subnet ID is the same for all hosts
in each subnet, but unique to each subnet in the network.
- The host ID is unique within each subnet.
Each subnet has the same set of host IDs.
- Subnetting is fun!
|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.