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

BGP conditional advertisement with 2 local routers and 2 ISP

I have router A connecting to ISP A and router B connecting to ISP B.

I have 2 routers (prefixes) to be advertised.

Under normal conditions, I want to have prefix A advertised to ISP A only and prefix B advertised to ISP B only.

If router A or ISP A should fail, I want router B to advertise prefix A to ISP B (and vice versa).

I am receiving only a default route from both ISPs.

I can make this work if I had only 1 router using BGP conditional advertisement, but I can't figure out how to make it work with 2 routers. Any ideas?

12 REPLIES
New Member

Re: BGP conditional advertisement with 2 local routers and 2 ISP

What are your network prefixes you would like to advertise? Let me know--this should be pretty simple to do.

New Member

Re: BGP conditional advertisement with 2 local routers and 2 ISP

I want to advertise 159.18.14.0/24 to ISP A and 159.18.27.0/24 to ISP B.

Cisco Employee

Re: BGP conditional advertisement with 2 local routers and 2 ISP

You simply need to use conditional advertisement on both routers.

on router A, use conditional advertisement for prefix B and make it a non-existant dependancy on a prefix received from ISP B.

host routerA

router bgp x

neighbor advertisement-map advertise non-existant non-exist

route-map advertise permit 10

match ip address 10

route-map non-exist permit 10

match ip address 20

match as-path 20

access-list 10 permit

access-list 20 permit

ip as-path access-list 20 permit ^$

on router B, use conditional advertisement for prefix A and make it a non-existant dependancy on a prefix received from ISP A.

host routerB

router bgp x

neighbor advertisement-map advertise non-existant non-exist

route-map advertise permit 10

match ip address 10

route-map non-exist permit 10

match ip address 20

match as-path 20

access-list 10 permit

access-list 20 permit

ip as-path access-list 20 permit ^$

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
Cisco Employee

Re: BGP conditional advertisement with 2 local routers and 2 ISP

The conditional advertisement command should really be:

neighbor advertise-map non-exist-map

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
Cisco Employee

Re: BGP conditional advertisement with 2 local routers and 2 ISP

Also, that is assuming that you already have a network statement for prefix A on router A and a network statement for prefix B on router B.

Cheers,

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
New Member

Re: BGP conditional advertisement with 2 local routers and 2 ISP

Thanks for the reply, this solution would work if I was getting a full BGP table from both ISPs, but I'm getting only a default route, prefix 0.0.0.0/0, this prefix will always exist as long as 1 of the ISPs is available.

Cisco Employee

Re: BGP conditional advertisement with 2 local routers and 2 ISP

The solution I suggested will work in your case as well.

on router A, conditional advertisement will be linked to a non-existant 0/0 from ISP B ASN and the opposite on router B.

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
New Member

Re: BGP conditional advertisement with 2 local routers and 2 ISP

To do that I would have to have both of my routers talking to both ISPs. I was not planing on that, I can see that working.

Thanks!

New Member

Re: BGP conditional advertisement with 2 local routers and 2 ISP

I was going to suggest what hritter suggested. That should work.

Cisco Employee

Re: BGP conditional advertisement with 2 local routers and 2 ISP

You don't need to have both of your routers talking to both of your ISPs. You simply need to run iBGP between your two routers. That is probably what you do already, don't you.

Cheers,

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

Re: BGP conditional advertisement with 2 local routers and 2 ISP

Mark,

Harold is correct. This solution should work.

You have 2 conditions in the route-map, named non-exist, and both conditions will need to fail for the network to be advertised.

HTH

Sundar

New Member

I had this exact scenario

I had this exact scenario except I wanted to use one circuit completely over another, rather than splitting up advertisements between two circuits. Still had two routers and each router had their defaults to the ISP. It took me a while to figure this out but it was mainly from a lack of understanding of BGP functionality.

478
Views
20
Helpful
12
Replies