Verify Subnet zero

Answered Question
Apr 10th, 2008
User Badges:

Hi. I just need to clarify if ip subnetzero is enabled, does that mean i can use subnetworks as ip addresses like 192.168.0.0 for example?


Thanks in advance.

Correct Answer by Jon Marshall about 8 years 11 months ago

No that's not what ip subnet-ero means.


192.168.0.0 255.255.255.0 = subnet 192.168.0


You can use this subnet but 192.168.0.0 is not an address, it is a subnet number so the first address would be


192.168.0.1 255.255.255.0


You generally wouldn't want to allocate another IP out of the same subnet to another interface on the same router - with ethernet it will not let you, with serial i seem to remember reading on this forum that the router will let you do this but not sure why you would want to.


Jon

  • 1
  • 2
  • 3
  • 4
  • 5
Overall Rating: 5 (1 ratings)
Loading.
Jon Marshall Thu, 04/10/2008 - 03:55
User Badges:
  • Super Blue, 32500 points or more
  • Hall of Fame,

    Founding Member

  • Cisco Designated VIP,

    2017 LAN, WAN

Assuming 192.168.0.0/24 yes it does mean that.


Jon

marcusbrutus Thu, 04/10/2008 - 04:02
User Badges:

Just to clarify, does that mean that i can assign an ip add of 192.168.0.0/24 on one serial int and 192.168.0.1/24 on another attached serial interface within the same subnet which is 192.168.0.0/24?


Correct Answer
Jon Marshall Thu, 04/10/2008 - 04:19
User Badges:
  • Super Blue, 32500 points or more
  • Hall of Fame,

    Founding Member

  • Cisco Designated VIP,

    2017 LAN, WAN

No that's not what ip subnet-ero means.


192.168.0.0 255.255.255.0 = subnet 192.168.0


You can use this subnet but 192.168.0.0 is not an address, it is a subnet number so the first address would be


192.168.0.1 255.255.255.0


You generally wouldn't want to allocate another IP out of the same subnet to another interface on the same router - with ethernet it will not let you, with serial i seem to remember reading on this forum that the router will let you do this but not sure why you would want to.


Jon

Hi Marcus


No, I don't think a router will not allow you to configure two separate interfaces with IP addresses from the same subnet or over lapping subnets (i.e. 192.168.0.1/16 and 192.168.1.1/24) for that matter.


***Edit*** This statement is not strictly correct, as a router will allow you to configure IP addresses from the same subnet on Serial interfaces. The above statement only applies to Ethernet interfaces. Thanks Jon *** End of Edit ***


Also having "ip subnet zero" enabled has nothing to do with configuring a subnet number on an interface. Whether "ip subnet zero" is enabled or not it is considered bad design practice to assign either the network/subnet number or the broadcast IP address to any interface, whether the equipment will accept this configuration or not.


The algorithm for working out the usable host IP addrsses on a subnet is (h^2)-2, where "h" equals the number of host bits (contiguous "0's") in the subnet mask, reading in binary from right to left. On a /24 subnet this figure is 254 or (8^2) = 256 -2 = 254.


Enabling "ip subnet zero" allows the use of the first and last subnets when subnetting a major network.


E.g


If you had the major network 152.16.0.0/16 and you want to subnet it using a /24 bit mask.


With "ip subnet zero" enabled the algorithm to work out the number of subnets is n^2, where "n" is equal to the number of host bits borrowed. 8^2=256, so you have 256 usable subnets.


With "ip subnet zero" disabled, the algorithm is (n^2)-2, where "n" is equal to the number of hosts bits borrowed. (8^2) = 256 -2 = 254, so you can only use 254 subnets.


HTH


Best Regards,


Michael

marcusbrutus Thu, 04/10/2008 - 04:20
User Badges:

Jon, sorry to disturb you again. I got a bit confused on the subnet issue. Given an ip of 192.168.0.0/24, the total no. of subnets according to the formula is 254 right? But the actual subnet range would be from 192.168.0.0/24 to 192.168.254.0/24 isn't it?

Then the total would be 255. Is this right?


Jon Marshall Thu, 04/10/2008 - 04:26
User Badges:
  • Super Blue, 32500 points or more
  • Hall of Fame,

    Founding Member

  • Cisco Designated VIP,

    2017 LAN, WAN

No problem.


192.168.0.0/24 = 192.168.0.0 255.255.255.0 = 1 subnet with 254 possible host addresses


Where your confusion comes from is the subnet mask ie. /24.


192.168.0.0/16 = 192.168.0.0 255.255.0.0 is what you are thinking of.


Jon


marcusbrutus Thu, 04/10/2008 - 04:34
User Badges:

But considering that i intend to use 192.168.0.0/24, the subnet range would be 192.168.0.0/24 till 192.168.254.0 right? Which is a total of 255 subnets?

Jon Marshall Thu, 04/10/2008 - 04:36
User Badges:
  • Super Blue, 32500 points or more
  • Hall of Fame,

    Founding Member

  • Cisco Designated VIP,

    2017 LAN, WAN

Okay i see the confusion. Yes your subnets would be


192.168.0.0/24

192.168.1.0/24

192.168.2.0/24


which is summarisable as 192.168.0.0/16.


Does this make sense ?


Jon

marcusbrutus Thu, 04/10/2008 - 05:00
User Badges:

Thanks for your patience Jon. I guess i was referring to your previous statement where you said:

With "ip subnet zero" enabled the algorithm to work out the number of subnets is n^2, where "n" is equal to the number of host bits borrowed. 8^2=256, so you have 256 usable subnets.


Considering that i intend to use 192.168.0.0/24, does that mean that aside from being able to use 192.168.0.0/24 as a subnet, i can also use 192.168.255.0/24 as a subnet? If this is the case, the broadcast address of subnet 192.168.255.0/24 is 192.168.255.255 right? I think i get it now.

Actions

This Discussion