How to find the total number of subnets available for one subnet mask?.

For example, take this subnet mask: and IP address as, book shows that there are 6 subnet for the given subnet mask, ranging from to , how 6 ?

I tried to solve it like this 2^3 = 8 and 8-2 = 6 But I thought that we should subtract 2 only when we find number of hosts (because of network ID and Broadcast).

Why do we subtract 2 for subnets?

  • That stems from the time when there were plenty of IPv4 addresses, and we used network classes, which were killed in 1993 by RFCs 1518 and 1519. The Internet went commercial in 1995, and we saw the writing on the wall, It no longer made sense to waste two subnets for every network.
    – Ron Maupin
    Mar 27, 2017 at 14:27
  • Did any answer help you? If so, you should accept the answer so that the question doesn't keep popping up forever, looking for an answer. Alternatively, you could provide and accept your own answer.
    – Ron Maupin
    Aug 17, 2017 at 5:26

1 Answer 1


If a network address is subnetted, the first subnet obtained after subnetting the network address is called subnet zero and the last subnet obtained is called the all-ones subnet.

In your example:


Subnet Mask:


Subnet            Broadcast   <-- subnet zero    <-- all ones

Traditionally, it was strongly recommended that subnet zero and the all-ones subnet not be used for addressing.

According to RFC 950 from 1985:

"It is useful to preserve and extend the interpretation of these special (network and broadcast) addresses in subnetted networks. This means the values of all zeros and all ones in the subnet field should not be assigned to actual (physical) subnets."

Remember that this is a 1985 recommendation. More than 30 years have passed from then.

Using subnet zero for addressing is discouraged because of the confusion inherent in having a network ( and a subnet ( with indistinguishable addresses, and the all-ones subnet for the confusion inherent in having a network and a subnet with identical broadcast addresses (

This recommendation was overruled in 1995 by RFC-1878 and RFC-1812. So, nowadays we can use all the subnets and the devices' hardware /software support it.

  • You are confusing subnet and address. The first address of a subnet is the "all zero" address (the network address) and the last address is the all one (broadcast) address. Nothing prevent using the first and last subnet
    – JFL
    Mar 27, 2017 at 8:45
  • read this explanation: routerfreak.com/subnet-zero-and-all-ones-subnet
    – jcbermu
    Mar 27, 2017 at 8:54
  • 2
    I admit it may relevant to the question, but this date from classful addressing era and is totally deprecated now. This is not relevant to modern networking. Also the question is obviously educational / home working and as such off-topic.
    – JFL
    Mar 27, 2017 at 9:19
  • I added an explanation of how it is a dated recommendation.
    – jcbermu
    Mar 27, 2017 at 9:31

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.