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

Null0 static route

Hi,

I have seen static route pointing towards a null0 interface in BGP. Can I know why it is used for?

Everyone's tags (3)
6 REPLIES
Hall of Fame Super Silver

Re: Null0 static route

Hello Manuadoor,

it is a way (the old way) to advertise an aggregate address, the static to null0 allows to use under BGP a network command to advertise the prefix.

the modern way to do this is to use the aggregate-address command under BGP process

example:

ip route 196.196.0.0 255.255.252.0 null0

router bgp myASN

network 196.196.0.0 mask 255.255.252.0

it is also used for stability instead of relying on component routes learned by an IGP like OSPF if the objective is to advertise a block of IP addresses the static to null0 allows to use the corresponding network command to advertise the aggregate

modern way

router bgp myASN

network 196.196.1.0 mask 255.255.255.0

...

aggregate-address 196.196.0.0 255.255.252.0 summary-only

Hope to help

Giuseppe

Re: Null0 static route

Hi,

The static route to null 0 is needed to advertise networks into BGP,

BGP would advertise Networks using any of the bellow methods:

1- with the Network command set.

2- Redistribution into BGP.

3- Aggregate address command.

All of these methods needs an exact match in the routing table , except for the aggregation which needs at least one route part of the aggregate address exist.

However, the bellow example written by Guiseppe doesnt need the (network command under bgp) as long as the aggregate address along with one part of the aggregate address exist in the IP routing table.

(((

modern way

router bgp myASN

network 196.196.1.0 mask 255.255.255.0

...

aggregate-address 196.196.0.0 255.255.252.0 summary-only ))))

Community Member

Re: Null0 static route

You mean to say,, whenever we advertise some routes to BGP it should be pointed to a null0 interface..!! Cannot digest

Most of the time I have seen that the null0 route is for a /22 network, why it is so?

Hall of Fame Super Silver

Re: Null0 static route

Hello Mohamed,

>> oesnt need the (network command under bgp) as long as the aggregate address along with one part of the aggregate address exist in the IP routing table.

I wrote the example in this way for clarity it is easier to compare the two methods in this way

a) ip route to null0 + network command for the aggregate route

b) aggregate-address + network command for component routes (at least one) or other way to inject a component route in BGP table (for example redistribution or route learned by another BGP peer)

it is a way to create an aggregate = a summary route

Hope to help

Giuseppe

Re: Null0 static route

Hi,

No, what I meant is that you might not have the Network advertised by BGP in the routing table as static or connected, so you might need to advertis them using Nul0 static into BGP.  Now regarding the /22, this doesnt have to be , it could be any subnet redistributed into bgp without specifically saying /22.

HTH

Mohamed

Community Member

Re: Null0 static route

ok...

1. Even if the IGP route is down, because of this null route, the traffic will reach this router(I read that null0 is having the least preference), so that trouble shooting also will be easier, right??

2. I think we can use null0 for privisioning also..right?

3. I clarrified with some of my collegue they are using /22 because there is a HUB router having 3 spokes, so they summerise the spokes with /22

11761
Views
0
Helpful
6
Replies
CreatePlease to create content