IP Subnetting Step #5: Determining Host Addresses For Each Subnet
(Page 1 of 3)
Once we know the addresses of each of the subnets in our network, we use these addresses as the basis for assigning IP addresses to the individual hosts in each subnet. We start by associating a subnet base address with each physical network (since at least in theory, our subnets correspond to our physical networks). We then sequentially assign hosts particular IP addresses within the subnet (or in a different manner, if we prefer!)
Determining host addresses is really quite simple, once we know the subnet address. All we do is substitute the numbers 1, 2, 3 and so on for the host ID bits in the subnet address. We must do this in binary of course, and then convert the address to decimal form. Again, we can do some short-cutting once the rather obvious pattern of how to assign addresses emerges. We'll look at those later in the topic.
Let's start with our Class C example again, 220.127.116.11, which we divided into 8 subnets using 3 subnet bits. Here's how the address appears with the subnet bits shown highlighted, and the host ID bits shown highlighted and underlined.:
11010011 01001101 00010100 00000000
The first subnet is subnet #0, which has all zeroes for those subnet bits, and thus the same address as the network as a whole: 18.104.22.168. We substitute the numbers 1, 2, 3 and so on for the underlined bits to get the host IDs. (Remember that we don't start with 0 here because for the host ID, the all-zero and all-one binary patterns have special meaning). So it goes like this:
11010011 01001101 00010100 00000001
In decimal, this is 22.214.171.124.
11010011 01001101 00010100 00000010
In decimal, this is 126.96.36.199
I'm sure you get the picture already; the third host will be 188.8.131.52, the fourth 184.108.40.206 and so on. There is a maximum of 30 hosts in each subnet, as we saw before. So, the last host in this subnet will be found by substituting 30 (11110 in binary) for the host ID bits, resulting in a decimal address of 220.127.116.11.
We can do the same thing for each of the other subnets; the only thing that changes is the values in the subnet ID bits. Let's take for example, subnet #6. It has 110 for the subnet bits instead of 000. So, its subnet base address is 18.104.22.168, or:
11010011 01001101 00010100 11000000
We assign hosts to this subnet by substituting 00001, then 00010, then 00011 for the host ID bits as before:
11010011 01001101 00010100 11000001
11010011 01001101 00010100 11000010
And so on, all the way up to the last host in the subnet, which is 22.214.171.124. Figure 80 shows graphically how subnet and host addresses are calculated for this sample network.
One more address we may wish to calculate is the broadcast address for the subnet. This of course is one of the special cases, found by substituting all ones for the host ID. For subnet #0, this would be 126.96.36.199. For subnet #6, it would be 188.8.131.52. That's pretty much all there is to it.
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.