IP Subnet Zero Question
billscott92787
Member Posts: 933
in CCNA & CCENT
Hey guys,
I have read CISCO's website on Subnet Zero. I know that by default most routers have the command
ip subnet-zero
I'm having some difficulty with understanding this. I want to see if I understand it right. With this command if it is used. ip subnet-zero, does this allow the use of the subnet zero (first subnet address) to be assigned to a particular device/interface?
If it is assigned by the, "no ip subnet-zero" then this would mean that we can't use that address right?
I have read CISCO's website on Subnet Zero. I know that by default most routers have the command
ip subnet-zero
I'm having some difficulty with understanding this. I want to see if I understand it right. With this command if it is used. ip subnet-zero, does this allow the use of the subnet zero (first subnet address) to be assigned to a particular device/interface?
If it is assigned by the, "no ip subnet-zero" then this would mean that we can't use that address right?
Comments
-
Xenz Member Posts: 140It will reject the command
Router(config)#no ip subnet-zero
Router(config)#int Fa0/1
Router(config-if)#ip add 172.16.0.1 255.255.255.0
Bad mask /24 for address 172.16.0.1
Router(config-if)#ip add 172.16.1.1 255.255.255.0
Router(config-if)#exit
Router(config)#ip subnet-zero
Router(config)#int Fa0/1
Router(config-if)#ip add 172.16.0.1 255.255.255.0
Router(config-if)
You can see that I cannot use the very first subnet or subnet 0, but I can use anything after that. I believe IOS v12.0+ has it by default. This use to be used to avoid confusion I believe (before my time). If the command ip subnet-zero is configured you can use the very first subnet or subnet zero. If not, you must use something other than the first subnet.Currently working on:
CCNP, 70-620 Vista 70-290 Server 2003
Packet Tracer activities and ramblings on my blog:
http://www.sbntech.info -
billscott92787 Member Posts: 933So in your example would the subnet zero be 172.16.0.0 - 0.0.255.255 ? Since you started next with 172.16.1.1 ?
-
Xenz Member Posts: 140Subnet zero would be 172.16.0.1 - 172.16.0.254 in my example because my mask is 255.255.255.0. An example to show you that it extends through the 172.16.0.X subnet.
*note* I meant to start with a normal B mask @ 255.255.0.0 and subnetted using 255.255.255.0, but I suck at life and forgot to add that. See below
Router(config-if)#ip add 172.16.0.254 255.255.255.0
Bad mask /24 for address 172.16.0.254
Some more masks because I think that's what you're caught on and my example kind of sucked
192.168.1.0 255.255.255.128 or /25
Subnet 0: 192.168.1.0 (- 192.168.1.126)
Subnet 1: 192.168.1.128 (-192.168.1.126)
Router(config-if)#ip add 192.168.1.1 255.255.255.128
Bad mask /26 for address 192.168.1.1
Router(config-if)#ip add 192.168.1.129 255.255.255.128
Router(config-if)#
192.168.1.0 255.255.255.252 or /30
Subnet 0: 192.168.1.1 (- 192.168.1.2)
Subnet 1: 192.168.1.5 (- 192.168.1.6)
More subnets here...
Router(config-if)#ip add 192.168.1.1 255.255.255.252
Bad mask /30 for address 192.168.1.1
Router(config-if)#ip add 192.168.1.5 255.255.255.252
Router(config-if)#
It all depends on how you subnet, the subnet zero is the first subnet of whatever mask you apply. In the cases above the very first network block was not able to be assigned to an interface, while anything after that block is fair game.Currently working on:
CCNP, 70-620 Vista 70-290 Server 2003
Packet Tracer activities and ramblings on my blog:
http://www.sbntech.info -
billscott92787 Member Posts: 933Router(config-if)#ip add 172.16.0.254 255.255.255.0
Bad mask /24 for address 172.16.0.254
Subnet zero is basically the first subnet that is available for use. Because in this example you wouldn't be able to use any address from 172.16.0.0 - 172.16.0.255 (of course 0 is reserved for the network address, 255 for the broadcast).
192.168.1.0 255.255.255.128 or /25
Subnet 0: 192.168.1.0 (- 192.168.1.126)
Subnet 1: 192.168.1.128 (-192.168.1.126)
Router(config-if)#ip add 192.168.1.1 255.255.255.128
Bad mask /26 for address 192.168.1.1
Router(config-if)#ip add 192.168.1.129 255.255.255.128
Router(config-if)#
192.168.1.0 255.255.255.252 or /30
Subnet 0: 192.168.1.1 (- 192.168.1.2)
Subnet 1: 192.168.1.5 (- 192.168.1.6)
More subnets here...
Router(config-if)#ip add 192.168.1.1 255.255.255.252
Bad mask /30 for address 192.168.1.1
Router(config-if)#ip add 192.168.1.5 255.255.255.252
Router(config-if)#
I get what you are saying, in the last example, 192.168.1.1 is unable because the first subnet is 192.168.1.0, the next subnet is 192.168.1.4 (256 - 252 = 4) 0 + 4 = 4 *next available subnet for use * = (first available host is 192.168.1.5), with a range from 192.168.1.5 - 192.168.1.6, if you are reserving .4 and .7. I would assume this would be you implying an address to two WAN links using the /30 masks. I understand now. I appreciate the examples. Thanks, you helped me sort things out in that box I have up there. LOL -
Xenz Member Posts: 140Yeah I was listing hosts to correspond to the interface addresses I could use. ip subnet-zero only applies to subnetting, and only applies to the very first subnet. I didn't reserve .4 and .7 in the example with a /30 mask, .4 is the network number 192.168.1.4 and .7 is the broadcast address and aren't usable, unless that's what you meant?Currently working on:
CCNP, 70-620 Vista 70-290 Server 2003
Packet Tracer activities and ramblings on my blog:
http://www.sbntech.info -
mella060 Member Posts: 198 ■■■□□□□□□□What this basically means is that if the command is listed on the router then the first (zero) and last (broadcast) subnets can be used. If the command is not there then these subnets cannot be used.
The subnet zero command is enabled by default on most routers now.
My advice would be to make sure you know what it means then lock it in the memory vault and carry on with your studies. -
billscott92787 Member Posts: 933Yeah that's what I meant, the fact that they can not be used because the .4 is the subnet address (network address) .7 is the broadcast. Thanks again man, you really helped me with clearing stuff up!
-
alitech Registered Users Posts: 1 ■□□□□□□□□□All of what you have mentioned is correct but I think that there is something no body took into consideration which is this "IP Subnet zero" command is somehow related to the class-full addressing which is supposed to be not used anymore since the classless addressing revolution, but this command is still affected by this old method of addressing which is weird to me and making me confused a little bit. Here are the demonstrations which prove what I'm talking about :
R1(config)#no ip subnet-zero
R1(config)#interface fastEthernet 0/0
R1(config-if)#ip add 172.16.0.1 255.255.255.0 %not accepted because this is a class B with a default /16 subnetmask%
Bad mask /24 for address 172.16.0.1
R1(config-if)#ip add 10.16.0.1 255.255.255.0 # %notice that this is accepted although using same as above subnetmask but because it's a class A with a default /8 subnetmask%
R1(config-if)#ip add 192.168.0.1 255.255.255.0 %notice that this is accepted although using same as above subnetmask but because it's a class C with a default /24 subnetmask%.
R1(config-if)#ip add 192.168.1.1 255.255.255.248 %not accepted because it's a class C with /24, so the 4th octet is where the subnetting is happening and it can't be belonging to subnet zero%
Bad mask /29 for address 192.168.1.1
R1(config-if)#ip add 192.168.1.9 255.255.255.248 %accepted because it belongs to subnet .8%
R1(config-if)#ip add 172.16.1.1 255.255.255.248 %accepted because it's a class B with /16 by default%
R1(config-if)#ip add 10.16.1.1 255.255.255.248 %accepted because it's a class A with /8 by default%
Conclusion :
with the "no ip subnet zero" command, for the IP address to be accepted the following should be fulfilled:_
- Look for the origin class of the IP address and put it's default subnet mask in your mind, then look for the first zero octet after the 255 octet and make sure that this octet is not a network zero or if subnetted it doesn't belong to the zero subnet.
Ex:
for the IP address 192.168.1.1 255.255.255.248, is it accepted when using no ip subnet-zero command ?
solution :
--> IP address 192.168.1.1 is a class C IP address and the default mask is 255.255.255.0, so we will look on the last octet, this octet is 248 using the VLSM, 248 = 11111000
1 = 00000001 % "1" is the last octet of the IP address%
0 % Belongs to the subnet zero%
so, this IP belongs to the subnet zero, not accepted. -
theodoxa Member Posts: 1,340 ■■■■□□□□□□If Subnet Zero is disabled, then you cannot use the first or last subnet created from a classful network. That said, Subnet Zero was the default [for routers, but not the exam if I remember correctly - since then, the CCNA has begun assuming subnet-zero is enabled] even back when I was in the Network Academy (12 years ago) if I remember correctly. Though, I do believe there is an additional issue with classful routing protocols and subnet zero.R&S: CCENT → CCNA → CCNP → CCIE [ ]
Security: CCNA [ ]
Virtualization: VCA-DCV [ ]