Network 0.0.0.0
-
Hello...again,
I feel like I've taken over these forums :)
Any who, I had a question about this network 0.0.0.0 command in regards to route advertisement. I will be honest, I have never seen this command. I have always just typed in the individual networks that are being advertised.
Ex:
router rip
version 2
network 192.168.1.0
network 192.168.1.64
network 192.168.1.128
network 192.168.1.192I never knew that you could instead do
router rip
version 2
network 0.0.0.0Now my question is what exactly is the router doing when it sees that 0.0.0.0? Is the 0.0.0.0 acting like a wildcard mask and the router is comparing routes to it? So "0 = we care about that bit" everything matches that 0.0.0.0.
If this is the case can I do stuff like network 0.0.0.128 or 0.0.128.0 to filter out what routes I want to advertise? Now that I sit and think about it, it sounds kind of useless and crazy to do it that way. But if you have 100's of routes you do need a quick mechanism to advertise only those that you want. I guess that is what route maps are for? ( I am currently at the beginning of that video so pardon my ignorance)
Thanks again.
-
This is not something you want to do in a production network. We use it in a lab setting because it allows us to quickly advertise EVERY ROUTE. Though, it will work, now you'd have to filter every other route you really didn't care to advertise.
A router does see this as every route but...you can't do what you're proposing which is to treat the network as a wildcard mask to filter. The wildcard mask only works for masking and not as networks. With the all ZERO network, you'll see you'll not be able to use a custom mask because it's a special address. Technically, even though you'll normally see a /0 as the mask. It will translate into a /32 mask instead. run your
show ip protocols
after doing an all ZERO network. and see the network that is advertised. Even if your router allows you enter a custom network mask, try and create networks that begin with a ZERO and you'll normally see it won't allow it so a network statement likenetwork 0.0.0.0 0.0.0.128
will probably not work.Cordially,
Ronnie Wong
Edutainer, ITProTV -
I see. Thanks