cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
55711
Views
121
Helpful
34
Replies

What is the use of null route

rangap26.
Level 1
Level 1

when i say the configuration in the router When we advertise the subnets directly in BGP using network command

we are using a static route of the same full subnet pointing to NULL 0

Can any one Help me understanding this concept of NULL 0 Routing

34 Replies 34

ankurbhasin
Level 9
Level 9

Hi Friend,

Null 0 routing is used to prevent routing loops in some conditions as if any packet is destinated for some specific route in that subnet which is not available for an example is down due to any reason instead of going through the default route and packet reaching somewhere else packet destined for that specific route within that subnet must be dropped.

So basically NULL 0 creates a block hole where if packtes are matched is dropped. So any packet destined to some specific route in that subnet will look for most specific route first and if that is not available will check the static route pointing to null 0 interface because that will be the best next match and then will be dropped.

HTH

Ankur

Hi ankur got u r information but last doubt is that when we onfigure the BGP using the network statement for a particular subnet for eg

Network 206.152.240.0 mask 255.255.240.0 route-map AS01213-internal

ip route 216.152.240.0 255.255.240.0

why we are giving like this

Hi Friend,

You are advertising 206.152.240.0 255.255.240 network via BGP. There will be many specific routes which will lie under this network right.

Now what happens if someone from the remote side will try to hit any specific route within this network it will reach your advertising router who had advertised this network and if any chance that specific route is down due to any reason what will happen if there is no static route pointing t that same network it will be either dropped or if you have any default route configuredit will be fwded to that router and it may result in routing loop.

Now once the packet for any specific route will reach your advertising router and if that specific route is down the best next match will be a static route pointing to null 0 interface and will let the packet dropped and will prvent any occurance for routing loop.

HTH, if yes please rate the post.

Ankur

devang_etcom
Level 7
Level 7

NULL 0 is known as bit bucket...when yu are useing static route like

ip route 10.0.0.0 255.0.0.0 null0 then packet destain for the network 10.0.0.0 will point to the null 0 it means that the packet destain for the network 10.0.0.0 will discarded as they are pointing to the null interface 0...some time using this you can prevent the loops in routing anivronment...

hope this helps

rate this post if it helps

regards

Devang

The original post asked about static routing to null 0 and both Ankur and Devang have provided good answers about using null 0 so that packets to some subnet that is not reachable will be discarded instead for being forwarded using the default route. But the original post asked about null 0 routing in the context of BGP and in the context of BGP there are a couple other aspects of null 0 that come into play.

When configuring BGP there are at least two reasons why null 0 routes are used in addition to the reason about controlling packets to non-reachable subnets. One of the reasons to use null 0 is to promote stability in the BGP network. In BGP networking stability of routes is of high importance and a flapping of routes in BGP may have even more impact than flapping of routes in Interior Protocols. When there is a static route to null 0 then that network will always appear to be reachable and the BGP will always advertise that network (or subnet) to its neighbors (the route will never be withdrawn in the BGP table).

The other reason for using null 0 routes in BGP is when BGP network statement uses the mask option then the exact prefix of the network statement must appear in the IP routing table (same address and same mask length). A static route to null 0 may be the easy way to be sure that an exact match will be found in the IP routing table.

HTH

Rick

HTH

Rick

thanks rick

Hello,

All answers are correct. I am just adding more info.  As Rechard mentioned, BGP advertises default route if only default route is installed in the routing table. Using NULL0 as the nexthop for default route is harmless because any traffic which does not have any match in the routing table will finally end upbeing dropped. Having IP route to NULL 0 is similiar to "Deny" at the end of the access-list which does not do anything because default  is deny. (or for log purpose)

There is another way to advertise default route which is implemented per neighbor. I like this one better because I have more control per neighbor.

neighbor 1.1.1.1 default-originate will advertise default route to the neighbor.

Using default route and NULL 0 is not applicable for RIB and IGRP to advertise default route because they do not understand 0.0.0.0 . IP default-network is used instead.

Hope it helps,

Masoud

Hello Masoud

Can you elaborate on this please

"Using default route and NULL 0 is not applicable for RIB and IGRP to advertise default route because they do not understand 0.0.0.0 . IP default-network is used instead."

I am not sure what you are saying?


Res
Paul


Please rate and mark as an accepted solution if you have found any of the information provided useful.
This then could assist others on these forums to find a valuable answer and broadens the community’s global network.

Kind Regards
Paul

Hello,

How do you redistribute default route in IGRP? Can you do it with

ip route 0.0.0.0 0.0.0.0  and redistribute static ? Why?

res,

Masoud

Hello masoud

Forgive me but I dontI understand what you are explaining?

I was referring to your previous statement 

"Using default route and NULL 0 is not applicable for RIB and IGRP to advertise default route because they do not understand 0.0.0.0 . IP default-network is used instead."

are you saying you cannot use a default null for advertising a default route in rip and the only way to do this is by a candidate route?

res

Paul


Please rate and mark as an accepted solution if you have found any of the information provided useful.
This then could assist others on these forums to find a valuable answer and broadens the community’s global network.

Kind Regards
Paul

Hello Paul,

Yes, I meant that.IGRP and RIB V1. Do you other idea?

Best,

Masoud

Hello Masoud

Humm - I think that an incorrect statement regards RIP - Null defaults can be use on both versions it and as for  IGRP , the question I would ask why would you want to use this routing protocol  when the more advanced EIGRP would be applicable? - However saying that I wasn’t aware that the Null default cannot be used in IGRP -

That is nice little nugget to know and once again I have learnt something new from these forums and for that’s the reason I am on them

As for candidate routes I am on the understanding even though newer versions of IOS support them and allow the configuration they don’t work and are EOL. - Only older ios version would work for them.

Lastly please don’t be offended with my questioning - I am here to learn as much as possible I constantly ask questions when I am not sure about a something or may have misinterpreted the post ( which i do on a daily basis may I add!)

Res
Paul


Please rate and mark as an accepted solution if you have found any of the information provided useful.
This then could assist others on these forums to find a valuable answer and broadens the community’s global network.

Kind Regards
Paul

Hello Paul. 

I am not offended at all regarding questions. Nobody is perfect. Sometimes, I am not very sure about a question, but I try to give my opinion. I might be wrong, but It may give posers a hint. If every answer was correct, choosing the best answer and rating would not have any meaning and it prevents people to give their opinions if all answers must be correct. We need to avoid causing discouragment.

You are right about RIB. It is habit  I use IGRP and RIB v1 together. In IGRP, I am correct.

Best,

Masoud

how can i using null0 as config for converting 0.0.0.0 default route to 1.1.1.1?

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community:

Review Cisco Networking products for a $25 gift card