static null 0 with BGP

I see this command " ip route 10.10.0.0 255.255.0.0 Null0" after the BGP config with "network 10.10.0.0 mask 255.255.0.0". I googled around for the static Null0 and I am getting more confused. Can the experts shed some light on this? Thanks
LVL 1
leblancAccountingAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Jan SpringerCommented:
Before a prefix can be picked and announced via BGP, it must first be in the routing table.  I always null route with a distance:

ip route 192.168.1.0 255.255.255.0 null0 255 (cisco)

ip route 192.168.1.0/24 null0 distance 255 (brocade)

This is usually because you need to announce a supernet and only its subnets are in your routing table.
0
leblancAccountingAuthor Commented:
Thanks for the reply.
"Before a prefix can be picked and announced via BGP, it must first be in the routing table" That could be accomplish by any IGP. That does not necessarily why we need the null route. Correct?

I am still confused looking at many different answers including https://supportforums.cisco.com/discussion/10908346/null0-static-route.

I just want to know why we need a null static route with BGP and what if I don't use it.
0
Jan SpringerCommented:
As long as the prefix which you want to announce is in the routing table, then no, you don't need the null route.

If I want stable BGP, I might still null route it with a distance in case the internal route is dropped just to keep my prefixes from withdrawing and announcing causing a possible dampened state.
0
leblancAccountingAuthor Commented:
" in case the internal route is dropped just to keep my prefixes from withdrawing and announcing" Can you give me an example on this?
In order for BGP to advertise the network, the route for that network needs to be in the routing table. Correct?
So let say I in my BGP process network 10.10.10.0 and 20.20.20.0 and it is in the table with static routes. Then to keep the BGP stable, do I need 2 static null0 statements?

I found some answers that say the null0 is to avoid loop. I don't understand.
0
Jan SpringerCommented:
The null0 plus distance is to avoid thrashing your prefixes and getting you dampened by your upstreams.

For example:  if your switch is announcing via OSPF the two prefixes up to your BGP speaking router and that switch becomes unreachable, the null0 routes will keep the routes in the routing table until the switch is back on-line causing your BGP neighbor announcements to *not* be withdrawn.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Network Architecture

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.