What is IP Subnet Zero? – Cisco Articles & Tips
miércoles,
21 de julio de 2010
08:33
p.m.
I am sure you have
used the Cisco IOS command show running-config
before, and noticed a peculiar default command in the configuration. The
command I am talking about is ip subnet-zero.
Here is what I am talking about:
But what is this
command? Why is it there? Let’s find out.
What is a zero subnet in the first place?
Before we talk about
the command, let’s ask ourselves, “In the first place, what is a zero subnet?”
Under old IP subnetting rules, the all 0’s subnet was reserved for the network,
and the all 1’s subnet was reserved for the broadcast. Over time, engineers
found that the all 0’s subnet wasn’t really used and, if it could be handed out
as a useable network, many IP addresses could be changed.
An example of an IP
address that is using a zero subnet is 10.1.0.1 with a subnet mask of
255.255.255.0. This IP address may look pretty weird to you. Some people may
even try to argue that it is an invalid IP address because there is a 0 in
third octet. However, today, this IP address is perfectly legal when it comes
to subnetting. Thus, if I had an IP address of 10.1.0.0 with a 255.255.0.0
subnet mask and wanted to subnet it, I could actually get 255 valid networks
out of it by using the 0 subnet. In other words, I could have networks ranging
from 10.1.{0-254}.X where the X represents hosts 1-254. This gives me room for
networks 0-254, or 255 total networks, by using the 0 subnet.
Do I need to enable my router to recognize the zero
subnet?
The quick answer to
this question is NO. Your Cisco IOS router, by default, has the command ip subnet-zero enabled on the router. Because
of this command, the zero subnet can already be recognized.
Do I really want to
use the zero subnet?
Just because
something is there, doesn’t mean you should use it. That is true in the case of
the zero subnet. Because many people still believe that the zero subnet is not
a legal subnet, I would avoid using it if possible. I would do this just to
avoid confusion when it comes to network configuration. On the other hand, if
you work for a large Internet Service Provider and are handing out blocks of IP
addresses, I would definitely hand out the zero block to help conserve your IP
address resources.
Summary
In this article, we
learned the difference between the following 3 commands:
- ip default-gateway
- ip default-network
- ip route 0.0.0.0 0.0.0.0 (configuring a default route)
The default-gateway
command should only be used when a router is functioning as a bridge. The ip
default-network and ip route 0.0.0.0 0.0.0.0 commands should be used to tell
the router what route to select as the “gateway of last resort”.
No hay comentarios:
Publicar un comentario