cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1390
Views
10
Helpful
14
Replies

Regarding null route

ncnaveen_arasu
Level 1
Level 1

                   Hi.

Just imagine we have three routers A,B and C

A is connected to both B and C.

If we define a blackhole route in A as

ip route 0.0.0.0 0.0.0.0 null0.

Wether it generates a default routes to its downstream router sucha a B and C.

Plelase clarify.

14 Replies 14

John Blakley
VIP Alumni
VIP Alumni

Without labbing this up, I would say that it would generate the route, but once b and c receive and try to use it, router A will blackhole the traffic. Again though, I would have to lab this up....

HTH,
John

*** Please rate all useful posts ***

HTH, John *** Please rate all useful posts ***

mfurnival
Level 4
Level 4

You haven't said what routing protocols (if any) you are using betweeen A, B and C.

Jon Marshall
Hall of Fame
Hall of Fame

Naveen

Wether it generates a default routes to its downstream router sucha a B and C.

Not possible to say with the information you have provided.

A static route on it's own is not sent to other routers. If you were redistributing statics into your IGP or using "default-information originate" under your IGP then yes it should be sent to the other routers.

But if you were just adding a static and not running a routing protocol then no it won't.

 

Jon

mfurnival
Level 4
Level 4

Just tried this in GNS3 and BGP DOES advertise the route:

R1:

router bgp 1

no synchronization

bgp log-neighbor-changes

redistribute connected

redistribute static

neighbor 192.168.1.2 remote-as 1

neighbor 192.168.1.2 soft-reconfiguration inbound

default-information originate

no auto-summary

ip route 0.0.0.0 0.0.0.0 Null0

R2:

R2#sh ip ro 0.0.0.0

Routing entry for 0.0.0.0/0, supernet

  Known via "bgp 1", distance 200, metric 0, candidate default path, type internal

  Last update from 192.168.1.1 00:02:26 ago

  Routing Descriptor Blocks:

  * 192.168.1.1, from 192.168.1.1, 00:02:26 ago

      Route metric is 0, traffic share count is 1

      AS Hops 0

That's because you have redistribute static under your BGP config.

If you just configure a static and don't redistribute or use "default-information originate" it shouldn't.

Jon

Jon,

Yes - all that is true.

I thought the nature of the question was whether a route pointing to null0 would be advertised (rather than a route pointing to a next-hop or an interface) - regardless of how that advertisement took place.

Ahh i understand.

A static route is no different whether it points to a next hop IP or an interface and null0 is an interface in this respect (although it behaves differently in other respects).

So there is no reason why it wouldn't be advertised unless you aren't redistributing/default-information etc.

Jon

Correct me if I'm wrong though - I still haven't labbed this up

Regardless of if it's advertised out, the "unknown" route will be sent to the advertising router, but if that route is also unknown to it, then it will just drop traffic. So, in reality, the only way this configuration would make any sense is if the router that's advertising this null default route has visibility to all subnets either by full bgp table or something like that.

HTH,
John

*** Please rate all useful posts ***

HTH, John *** Please rate all useful posts ***

Hi John

Not sure i am following but maybe i misunderstood the original question.

I thought the question was asking if you configured a static default route on router A would it be advertised to B and C. To which,, as far as i know, it won't unless -

a) you are running a routing protocol between A, B and C

and

b) you are redistrbuting that static into the IGP or using "default-information originate"

i'm not sure what you mean when you say -

Regardless of if it's advertised out, the "unknown" route will be sent to the advertising router, but if that route is also unknown to it, then it will just drop traffic

ie. if it is not advertised out then there is no advertising router.

Jon

Sorry Jon, I may be confusing the issue.

I was assuming that they were using a routing protocol to distribute a default route. What I meant was that even if that default route was distributed, when the advertising router really needed to use the default, it wouldn't be able to because that traffic would be blackholed. For example, I finally labbed this up:

R1 ---- R2 --- R3

R1 has a loopback of 1.1.1.1

R1, 2, and 3 are running ospf, but R1 is not advertising the loopback.

There is a static route for 0/0 on R2 pointing to R1.

From R3:

R3(config)#do ping 1.1.1.1

Type escape sequence to abort.

Sending 5, 100-byte ICMP Echos to 1.1.1.1, timeout is 2 seconds:

!!!!!

If I change the default route on R2 to 0/0 null 0, R3 will no longer be able to get to R1's loopback:

R2(config)#no ip route 0.0.0.0 0.0.0.0 192.168.12.1

R2(config)#ip route 0.0.0.0 0.0.0.0 null0

R2(config)#do sh ip route

S*   0.0.0.0/0 is directly connected, Null0

R3(config)#do ping 1.1.1.1

Type escape sequence to abort.

Sending 5, 100-byte ICMP Echos to 1.1.1.1, timeout is 2 seconds:

U.U.U

That's what I meant by it wouldn't matter if the receiving router had the default route. Once it went to use it, the advertising router would drop the traffic. I guess my other question is why would you want to advertise a nulled default route anyway?

HTH,
John

*** Please rate all useful posts ***

HTH, John *** Please rate all useful posts ***

John

I see what you mean.

In terms of when you would to want to advertise it you pretty much covered it in your previous post. A router with a static route pointing to null0 and then advertising that would always be assumed to have full routing information ie. in your example R2 would actually have a route to R1's loopback.

So any traffic ending up at the router would be dropped if that router does not have a more specific route for it. It is a way to make sure you are not forwarding any packets for which you don't have a route for.

Jon

Thanks for the clarification. I thought I was losing it from the flu meds I'm on

HTH,
John

*** Please rate all useful posts ***

HTH, John *** Please rate all useful posts ***

ncnaveen_arasu
Level 1
Level 1

HI Jon,

Thanks for the info.. and i do rate all posts and all were very usefull for me to get the knowledge from youe end.

Thanks for sharing your knowledge and clearing my many doubts.

Naveen

Apologies, you do rate posts as you say.

I don't know why i thought you didn't, my mistake.

Jon

Review Cisco Networking products for a $25 gift card