cancel
Showing results for
Did you mean:
cancel
Announcements

201
Views
0
5
Replies
Highlighted
Beginner

## Ip subnet zero

Hi everyone, i have little confusion regarding 2n-2 formula, when we were subtracting 2 from 2n, first thing we were subtracting was the first subnet i.e 0 but wats the second thing that we used to subtract ?

thanks

5 REPLIES 5
Participant

## Re: Ip subnet zero

Thanks

Salman.

Hall of Fame Master

## Re: Ip subnet zero

Ovais

I believe that there is some confusion about the formula 2n -2. This formula is accurately applied to calculate the number of hosts in a subnet given the number of subnet bits.

That formula is also frequently used in calculating the number of subnets when subnetting. But the formula is really not accurate for that purpose. Many people state that it is to exclude the all zero subnet and the all one subnet. The all zero subnet is what is involved with subnet zero. In very old IOS the default was to not use subnet zero. And the subnet-zero command was invented to allow it to be used. For a long time the default has been to allow the use of subnet zero by default.

And the all one subnet has always been allowed. The IOS has never prevented use of the all one subnet.

HTH

Rick

By doing so, and until end of January, you are helping Doctors Without Borders
Beginner

## Re: Ip subnet zero

sorry i didnt get it i m taking this example as reference

http://www.cisco.com/en/US/tech/tk648/tk361/technologies_tech_note09186a0080093f18.shtml

network is 172.16.0.0/16 it is subnetted with 3 bits so now we have 172.16.0.0/19 and these are the subnets

0

32

64

96

128

160

192

224

256

now it is saying that we used to subtact 2 i.e all zero subnet and all ones subnet

all zero subnet -> 172.16.0.0/19

all ones subnet -> 172.16.224.0/19

but on router when i disable ip subnet zero by no ip subnet-zero i m not able to use 172.16.0.0/19 but i can use 172.16.224.0/19 why is that so ??? why did cisco allowed all ones subnet ? were they always allowed ? if not then why can i use them even after disabling subnet zero

Beginner

## Re: Ip subnet zero

Hi,all 1 subnet creates confusion when directed broadcast was used.For example if you receive a packet with destination ip 172.16.255.255, where will you broadcast it? to 172.16.0.0/16 or 172.16.224.0/19 ?

But this is no longer an issue in a classless environment.In classless environment we least bother about classes and all we bother about is prefix/mask.

Both all 0 and all 1 subnets are no longer an issue in classless environment.

Hope this helps.

Hall of Fame Master

## Re: Ip subnet zero

Ovais

My previous response very clearly states that Cisco has always allowed the use of the all ones subnet. This has never been a problem in IOS. People do sometimes make the point about possible confusion with directed broadcast as a reason to avoid using the all ones subnet. But IOS has never had any rule or policy that the all ones subnet was not allowed. It has always worked - and it has nothing to do with subnet-zero (as you have discovered).

HTH

Rick