Useable IP addresses in private networks
The goal of this post is to give a definitive answer to the question of the number of useable IP addresses for each private network.
I say definitive because I've seen this number stated incorrectly in a few places.
According to RFC 1918, we have three private network ranges:
10.0.0.0/8(10.0.0.0 to 10.255.255.255)172.16.0.0/12(172.16.0.0 to 172.31.255.255)192.168.0.0/16(192.168.0.0 to 192.168.255.255)
For each network, the first IP address is the network address and the last IP address is the broadcast address. These two addresses cannot be assigned to hosts.
This means the number of useable IP addresses is:
Total IP addresses - 2 = Useable IP addresses
Let's calculate this for each private network:
10.0.0.0/8
- Total addresses: 2^24 = 16,777,216
- Useable addresses: 16,777,216 - 2 = 16,777,214
172.16.0.0/12
- Total addresses: 2^20 = 1,048,576
- Useable addresses: 1,048,576 - 2 = 1,048,574
192.168.0.0/16
- Total addresses: 2^16 = 65,536
- Useable addresses: 65,536 - 2 = 65,534
These calculations assume you're using the entire private network range as a single subnet. In practice, you would typically subnet these ranges further, and each subnet would have its own network and broadcast addresses.
Remember: the key principle is that every IP network loses exactly 2 addresses (network and broadcast), regardless of size.