Determining Quantities of Subnets and Hosts

This general technique also is useful when trying to determine the total number of subnets and hosts produced by a given mask with respect to the default mask of the class of address in question. Consider, for example, the Class B address 172.16.0.0 with a subnet mask of 255.255.254.0.

This is a prefix length of 23 bits. When you subtract the default prefix length for a Class B address of 16 from 23, you get the value 7. Raising 2 to the 7th power results in the value 128, which is the number of subnets you get when you subnet a Class B address with the 255.255.254.0 mask.

Determining the number of hosts available in each of these 128 subnets is rather simple because you always subtract the prefix length the subnet mask produces, 23 in this example, from the value 32, which represents the total number of bits in any IP address. The difference, 9, represents the remaining number of 0s, or host bits, in the subnet mask. Raising 2 to this value produces the total possible number of host IDs per subnet this subnet mask allows. Remembering to subtract 2 from this result to account for the subnet and broadcast addresses for each subnet gives you the actual number of usable host IDs per subnet. In this case, this value is 29 - 2 = 510.

Repeated practice with this technique will reduce your time to obtain the desired answer to mere seconds, leaving more time for the more challenging tasks in each question. You have a wealth of examples and scenarios in this chapter, as well as in the review questions, on which to try out your technique, not to mention alternative methods with which to check your work and build your faith in this faster method.

Was this article helpful?

0 0

Post a comment