How to Calculate the Number of Hosts Per Subnet
by Stephanie EllenIn computer networking, subnets are used for routing purposes. Internet protocol (IP) networks are sometimes divided into logical subnets, which are parts of the network that can be distinctly addressed. When figuring out the number of hosts per subnet, you are limited by the number of bits that form the host ID according to the following mathematical equation: number of hosts per subnet = (2^H) - 2, where H is the number of bits in the host ID.
Determine the number of bits that form the host ID. For example, you might have a host ID of 001 (3 bits).
Figure out what the number in Step 1 is to the power of 2. Powers of 2 are 2 raised to the nth power. For example, 2^2 = 4 and 2^5 = 32. In the above example, there are 3 bits in the host ID so 2 is raised to the 3rd power: 2^3 = 8.
Subtract 2 from the answer you calculated in Step 2. In the given example, the number of hosts per subnet is 8 - 2 = 6.
References
Photo Credits
- photo_camera internet image by Soja Andrzej from Fotolia.com
Article Feedback
Click here to provide feedback on this article