How can I Compute the Maximum Number of Hosts for a Subnet Mask?
To compute the maximum number of hosts for a subnet mask, take two and raise it to the amount of bits allocated to the subnet (count the number of 0.s in the subnet mask binary value) and subtract two. You must subtract two from the resulting value because the first value in the IP address range (all 0s) is reserved for the network address, and the last value in the IP address range (all 1s) is reserved for the network broadcast address. For example, DSL networks commonly use 8 bits for their subnets. The amount of allowable hosts for such a DSL network could be computed by the following formula: max hosts = (2^8)-2 = 254 hosts. As you subnet networks, the number of bits represented by the subnet mask will decrease. You decrease the octets in order starting from the rightmost value and proceed left as you reach a zero value. Mask values decrease by a power of two each time you split a network into more subnets. Values are 255, 254*, 252, 248, 240, 224, 224, 192, 128. Each decrease indi