Historically, it was always recommended that a subnet of all 0s or a subnet of all 1s not be used. Therefore, the formula of 2N – 2
was used to calculate the number of valid subnets created. However, Cisco devices can use those subnets, as long as the command ip subnet-zero
is in the configuration. This command is on by default in Cisco IOS Software Release 12.0 and later; if it was turned off for some reason, however, you can reenable it by using the following command:
Router(config)# ip subnet-zero
Now you can use the formula 2N rather than 2N – 2.
2N | Number of total subnets created | |
2N – 2 | Number of valid subnets created | No longer needed because you have the ip subnet-zero command enabled |
2H | Number of total hosts per subnet | |
2H – 2 | Number of valid hosts per subnet |
Note
All of this is explained in great detail in RFC 950, Internet Standard for Subnetting Procedure (August 1985).
Note
RFC 1878, Variable Length Subnet Table for IPv4 (December 1995), states, “This practice [of excluding all-zeros and all-ones subnets] is obsolete. Modern software will be able to utilize all definable networks.”