Cisco Support Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Announcements

Welcome to Cisco Support Community. We would love to have your feedback.

For an introduction to the new site, click here. And see here for current known issues.

New Member

What is the use of null route

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

26 REPLIES

Re: What is the use of null route

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

New Member

Re: What is the use of null route

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

Re: What is the use of null route

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

Re: What is the use of null route

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

Hall of Fame Super Silver

Re: What is the use of null route

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

New Member

Re: What is the use of null route

thanks rick

Hello,

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 MasoudCan you elaborate

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 don't forget to rate any posts that have been helpful. Thanks.

Hello,

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

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 don't forget to rate any posts that have been helpful. Thanks.

Hello Paul,

Hello Paul,

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

Best,

Masoud

Hello 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 don't forget to rate any posts that have been helpful. Thanks.

Hello 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

I just noticed the question

I just noticed the question was asked 9 years ago.

New Member

Hello Team,

Hello Team,

today i was reading about ospf abr summrization and saw null0 , i want to know what are advantages of Null0 and dis-advantages . if advantages of Null0 then why we run command that is

ospf discard route internal to remove Null0 entry from the network. 

i have seen that because of Null0 , a looping problem also can create in our Network that is why we run ospf discard route internal

Please let me know is this correct ?

Hello,

Hello,

Let me give you an example. Consider this senario

Internet---ASBR------ABR-------Area 0(172.16.1.0/24

                                                            172.16.2.0/24

                                                            172.16.3.0/24)

We do summarization on ABR   (172.16.0.0/16)

ABR has a default route to ASBR and 172.16.0.0 to null0

And ASBR has 172.16.0.0/16 to ABR

Suppose  172.16.3.0/24 is down and there is no Null0. ASBR sends traffic for  172.16.3.0/24 to ABR(because of summary route) and ABR returns it to ASBR( because of default of route) so if there is no Null0, there would be forwarding loop.

The command you mentioned is rarely used. But suppose this scenario. Everything is the same as above, just we have 172.16.100.0/24 behind the ASBR. Suppose from different domain. Normally, it is reachable by default route on ABR (toward ASBR), but when you do summarization, it is not reachable anymore because 172.16.0.0/16 Null0 is longer prefix than default route so packets will be dropped.  In this situation, we can use that command to remove Null0 from the routing table.

Hope it helps,

Masoud                                      

New Member

so what is the work of Null0

so what is the work of Null0 ?

we have to manually this command ?

i mean ip route 172.16.0.0 255.255.0.0 null0

or

it comes during summary

area 2 range 172.16.0.0 255.255.0.0

It sits inside the routing

It sits inside the routing table automatically after summarization. in the previous example, for instance, packets destined to 172.16.7.2 will be dropped( Null0 is a black hole), but packets destined to 172.16.2.2 will be forwarded to area 0 because 172.16.2.0/24 is longer prefix than 172.16.0.0/16 to null0.

Masoud

New Member

how it comes

how it comes

                                                            172.16.1.0/24

                                                            172.16.2.0/24

                                                            172.16.3.0/24)

We do summarization on ABR   (172.16.0.0/16)

it should be

172.16.0.0/22

New Member

Hi Rick, Ankur & DevangThanks

Hi Rick, Ankur & Devang

Thanks for the detailed explanation.

Diljith

 

Hall of Fame Super Silver

Diljith You are quite welcome

Diljith

 

You are quite welcome. I hope that this forum is helpful to you.

 

HTH

 

Rick

New Member

Hello Team,

Hello Team,

today i was reading about ospf abr summrization and saw null0 , i want to know what are advantages of Null0 and dis-advantages . if advantages of Null0 then why we run command that is

ospf discard route internal to remove Null0 entry from the network. 

i have seen that because of Null0 , a looping problem also can create in our Network that is why we run ospf discard route internal

Please let me know is this correct ?

New Member

Richard,

Richard,

Thank you for the excellent explanation of the Null routes.  I especially like the way you tied the previous answers together and expanded upon them.  

Trent 

Hall of Fame Super Silver

Trent

Trent

Thank you for posting to the forum and telling me how much you like my explanation about using route to null 0. It is gratifying to know when my responses have helped people. These forums are excellent places to learn about networking and to share what we have learned with others. I hope you will continue to be active in the forums.

HTH

Rick

I also thank you Richar for

I also thank you Richar for your support. I was amazed when I saw that you had answered the question 9 years ago. I hope you keep up so that we can learn more from you.

Masoud,

Hall of Fame Super Silver

Masoud

Masoud

Thank you for the kind words. Yes I have been active in the forums for quite a while. And I hope to continue to be active in the forum and hope that people can learn from my responses. I am glad to see your activity in the forum with very good answers and hope that you also will continue to be active.

HTH

Rick

17680
Views
33
Helpful
26
Replies
CreatePlease login to create content