BGP conditional advertisement with 2 local routers and 2 ISP

Unanswered Question
Mar 19th, 2007

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?

I have this problem too.
1 vote
  • 1
  • 2
  • 3
  • 4
  • 5
Overall Rating: 5 (4 ratings)
Loading.
walleyewiz Mon, 03/19/2007 - 11:26

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

mrzepa Mon, 03/19/2007 - 11:43

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

Harold Ritter Mon, 03/19/2007 - 12:50

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 Mon, 03/19/2007 - 12:54

The conditional advertisement command should really be:

neighbor advertise-map non-exist-map

Harold Ritter Mon, 03/19/2007 - 12:57

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,

mrzepa Mon, 03/19/2007 - 13:00

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.

Harold Ritter Mon, 03/19/2007 - 13:03

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,

mrzepa Mon, 03/19/2007 - 13:07

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!

walleyewiz Mon, 03/19/2007 - 13:10

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

Harold Ritter Mon, 03/19/2007 - 13:12

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,

sundar.palaniappan Mon, 03/19/2007 - 13:10

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

Brian Dean Tue, 11/17/2015 - 14:14

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.

Actions

This Discussion