Number of IP Subnets Available

Answered Question
Aug 19th, 2007

The command ip subnet-zero allows the zero subnet to be used on a Cisco router. Does it also allow the all 1s subnet to be used ? Normally the number of available subnets is (2^n) - 2, where n is number of subnet bits. The two which are normally excluded are the all 0s and all 1s subnets. Does the above command include both of these ?

I have this problem too.
0 votes
Correct Answer by Richard Burts about 9 years 5 months ago

Pavlo got it exactly right (and I rated his post). The all ones (broadcast) subnet has always been available for use regardless of whether ip subnet-zero was enabled or not.

The all ones subnet and the all zero subnet are frequently thought of together (suggesting that they are related) but they are in fact quite separate in their functionality and in any restriction.

The point is also valid that ip subnet-zero has been enabled by default for a long time. I am sure that some study materials (and perhaps some certification tests) still put some emphasis on this. But in terms of practical networking the reality is that all subnets are available without making any effort.

The formula which subtracts 2 is the accurate formula for determining the number of hosts in a subnet. It also is sometimes found in some training materials (and who knows about some certification tests?). It represents an old (conservative) approach to network design. My perspective is that you would never go wrong by following it, but that little negative outcome will result if you do not follow it. I would hope that if this kind of question appeared on a test that both alternatives (subtract 2 or not subtract 2) would not show up as answer choices.

HTH

Rick

  • 1
  • 2
  • 3
  • 4
  • 5
Overall Rating: 4.3 (4 ratings)
Loading.
Edison Ortiz Sun, 08/19/2007 - 08:57

> Normally the number of available subnets is (2^n) - 2, where n is number of subnet bits.

> The two which are normally excluded are the all 0s and all 1s subnets.

That formula is to calculate the number of hosts in a subnet. The '-2' is used to allocate the subnet-id and broadcast address for that subnet.

alwahidi22 Sun, 08/19/2007 - 09:14

Hi my friend,

When you use ip subnet-zero you can use subnet zero and subnet all ones , so you use 2^n where n is the subnet bit count that you borrowed , and you use 2^n-2 for number of hosts per subnetwork.

BR,

Ibrahim Alwahidi

Pavel Bykov Sun, 08/19/2007 - 09:17

>Does it also allow the all 1s subnet to be used

By default all IOSes support that, without any command. So the command you provided does not enable this functionality. It's just there.

Correct Answer
Richard Burts Sun, 08/19/2007 - 14:11

Pavlo got it exactly right (and I rated his post). The all ones (broadcast) subnet has always been available for use regardless of whether ip subnet-zero was enabled or not.

The all ones subnet and the all zero subnet are frequently thought of together (suggesting that they are related) but they are in fact quite separate in their functionality and in any restriction.

The point is also valid that ip subnet-zero has been enabled by default for a long time. I am sure that some study materials (and perhaps some certification tests) still put some emphasis on this. But in terms of practical networking the reality is that all subnets are available without making any effort.

The formula which subtracts 2 is the accurate formula for determining the number of hosts in a subnet. It also is sometimes found in some training materials (and who knows about some certification tests?). It represents an old (conservative) approach to network design. My perspective is that you would never go wrong by following it, but that little negative outcome will result if you do not follow it. I would hope that if this kind of question appeared on a test that both alternatives (subtract 2 or not subtract 2) would not show up as answer choices.

HTH

Rick

Pavel Bykov Mon, 08/20/2007 - 13:16

Thanks, Rick.

Paolo: Ah, yes, the RFC 3021. But we couldn't implement this feature when the time came to crunch.

In this document:

http://www.cisco.com/univercd/cc/td/doc/product/software/ios122/122newft/122t/122t2/ft31addr.htm#wp1031177

Check out the lines:

Feature History

12.2(2)T - This feature was introduced.

12.2(28)SB - This feature was integrated into Cisco IOS Release 12.2(28)SB.

Good thing it's an enterprise, so it doesn't have any adverse effect on Internet address space, but still... Just by looking at provider edge config I can see 12 addresses that could have been saved.

Now we just need a big campaign ad:

"Want twice* as many public IP addresses for free? You got it! RFC 3021 saves you money and time!

*results may vary depending on count of point to point links"

Actions

This Discussion