cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
83749
Views
139
Helpful
31
Replies

What's the prupose of "ip route null0"?

gwhuang5398
Level 2
Level 2

We often saw configuration of putting the summary address of an internal private network in "ip route .... null0". What's the purpose of it? Why the traffic to the internal network doesn't get dropped on the router it is configured?

Would the null0 statis route show up in the "sh ip route?

Thanks

Gary

31 Replies 31

Harold Ritter
Cisco Employee
Cisco Employee

The purpose of configuring a static summary route to null0 is to make sure that traffic will be dropped on the local router if a more specific route doesn't exist.

Hope this helps,

Harold Ritter
Sr Technical Leader
CCIE 4168 (R&S, SP)
harold@cisco.com
México móvil: +52 1 55 8312 4915
Cisco México
Paseo de la Reforma 222
Piso 19
Cuauhtémoc, Juárez
Ciudad de México, 06600
México

Oh, and yes it would show up in the output of the show ip route.

Hope this helps,

Harold Ritter
Sr Technical Leader
CCIE 4168 (R&S, SP)
harold@cisco.com
México móvil: +52 1 55 8312 4915
Cisco México
Paseo de la Reforma 222
Piso 19
Cuauhtémoc, Juárez
Ciudad de México, 06600
México

Richard Burts
Hall of Fame
Hall of Fame

Gary

There are several reasons why some routers are configured with ip route ... null 0. One of those reasons has to do with route summarization. Essentially configuring the null 0 route is to provide protection from "black hole" developing. An example might help. Lets assume that a network is using subnets of 172.17.0.0. Lets assume that subnets 172.17.2.0, 172.17.4.0, 172.17.6.0, 172.17.8.0, and 172.17.10.0 are in the routing table. Lets assume that the router is going to advertise a summary route to some of its neighbors advertising 172.17.0.0/16. So the router is telling its neighbors "if you want to reach anything in 172.17.0.0, then send it to me". So what happens if a neighbor sends a packet with destination address 172.17.5.5. What should the router do? We do not know where that subnet is, so what should we do? Should we forward it to the default route? What if the router that is the next hop for the default route received our summary advertisement for 172.17.0.0 and forwards the packet back to us? As you can see this can get messy !

So configuring ip route 172.17.0.0 255.255.0.0 null 0 is a way to assure that if the packet can not be routed it will be dropped.

There are some other situations where a route may be configured to null 0. One of those is on routers that run BGP. The router may be configured with a BGP network statement, so if the route is in the routing table that BGP will advertise it. And we want to be sure that the route is in the routing table. So we configure a route to null 0 as a way to be sure that the route remains in the table and will be advertised by BGP.

HTH

Rick

HTH

Rick

Thanks all for your help

Dear Richard,

Can you explain the how we can use null0 for the following senario .

If my internal DNS is getting lots of requests from outside unknown DNS servers,in such a situation ,can I use this "null 0" command to stop unknown requests??

Thanks

In the scenario that you describe where you are receiving lots of requests from outside and you want to block them then I would suggest that you could do something like this. Configure Policy Based Routing (probably on the router at the edge of your network - we want to catch this traffic as early as we can) to identify these DNS requests. In the PBR route map use an access list to identify the traffic and then set interface null0. This will discard all of the DNS requests.

I would suggest that you consider the implications of doing this before you actually implement it. If you do discard all incoming DNS requests then you have prevented anyone outside your network from being able to resolve names to addresses for resources inside your network. Perhaps some kind of shaping or policing on the DNS requests would be a better way to handle them.

HTH

Rick

HTH

Rick

Hello Richard,

good Morning, How are you .

1. what is the difference between IBGP vs IGP.

2. How does the IBGP Router chooses the best path to a Specific Destination especially when multiple paths are available. In other IGPs there are metrics available, like hop count, cost etc to choose the optimal path, but in IBGP is there any specific attribute available to carry the metric which helps in dynamic path selection.

Please can you clear in simple language with some examples...

thanks

Manish

Manish

While the initials look very similar there is quite a difference between IBGP and IGP. To clarify this let me start from the fact that we can differentiate routing protocols based on whether they are designed primarily to route between enterprise networks (this would be an exterior protocol and BGP is the best known example of exterior protocol) or designed primarily to route within an enterprise network (this would be an interior protocol, and EIGRP and OSPF are well known examples of Interior protocols). When we talk about Interior routing protocols in general we sometimes refer to them as IGP (Interior Gateway Protocols).

When running the exterior protocol BGP there are some differences depending on whether the peer router is within the same Autonomous System (which is IBGP) or the peer is in a different Autonomous System (which is EBGP).

So IBGP is the exterior routing protocol where both peer routers are in the same autonomous system and IGP is the general way to talk about Interior routing protocols.

It is common in the Interior routing protocols to have a metric which is used to select the best path. In the Exterior routing protocol of BGP there is not the same concept of a simple metric but there are a set of attributes which BGP evaluates to select the best path. You can use this link to see additional information about the attributes and how BGP evaluates them.

http://www.cisco.com/c/en/us/support/docs/ip/border-gateway-protocol-bgp/13753-25.html

HTH

Rick

HTH

Rick

Thanks to reply but how ibgp take to decision to reach destination..

Perhaps I am not understanding your question correctly. I thought that you were asking how IBGP selects the best path to a destination. That process beginning with evaluate the weight assigned to the advertised path is clearly described in the link that I posted. If that is not what you are asking then please clarify the question.

HTH

Rick

HTH

Rick

Yes you are right , i was asking how IBGP selects the best path to a destination after full mesh , because IBGP works on full mesh topology..

Joseph makes a good point that in terms of route selection that there is a single BGP process running on the router and making the selection of best route. IBGP will impose some restrictions that are different from EBGP in terms of what it will advertise to a neighbor. But for selecting the best route to a destination there is a single process making that selection.

HTH

Rick

HTH

Rick

Disclaimer

The Author of this posting offers the information contained within this posting without consideration and with the reader's understanding that there's no implied or expressed suitability or fitness for any purpose. Information provided is for informational purposes only and should not be construed as rendering professional advice of any kind. Usage of this posting's information is solely at reader's own risk.

Liability Disclaimer

In no event shall Author be liable for any damages wha2tsoever (including, without limitation, damages for loss of use, data or profit) arising out of the use or inability to use the posting's information even if Author has been advised of the possibility of such damage.

Posting

I believe basically iBGP uses the same path selection logic as eBGP.  Within the same AS, though, iBGP generally sees its iBGP as adjacent.  Interior routing logic will determine actual path taken (unseen by iBGP).

Hello Richard,

Please can you tell me. why i am getting this error and how to solve it.

software install file tftp://172.19.211.47/cat3k_caa-universalk9.SSA.03.12.02.EZP.150-12.02.EZP.150-12.02.EZP.bin
Preparing install operation ...
[1]: Downloading file tftp://172.19.211.47/cat3k_caa-universalk9.SSA.03.12.02.EZP.150-12.02.EZP.150-12.02.EZP.bin to active switch 1
[1]: Finished downloading file tftp://172.19.211.47/cat3k_caa-universalk9.SSA.03.12.02.EZP.150-12.02.EZP.150-12.02.EZP.bin to active switch 1
[1]: Starting install operation
[1]: Expanding bundle cat3k_caa-universalk9.SSA.03.12.02.EZP.150-12.02.EZP.150-12.02.EZP.bin
[1]: Copying package files
[1]: Package files copied
[1]: Finished expanding bundle cat3k_caa-universalk9.SSA.03.12.02.EZP.150-12.02.EZP.150-12.02.EZP.bin
[1]: Verifying and copying expanded package files to flash:
[1]: Verified and copied expanded package files to flash:
[1]: Starting compatibility checks
[1]: compatibility checks failed...

Here getting this error how to solve it and why i am getting this please can you clear it.
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: