Multi-Homed BGP Network – Creating a Default Route with ISP1 and ISP2 as Backup

bgpciscoredundant-routes

I do however, need ISP1 to automatically become the primary route once the route is back up. There are only 3 routers in this topology, router 1 and router 3 are connected with ISP1 and ISP2 respectively.

ISP1 AS 1000 R1        ISP3 AS 3000 R3
          \             /
           \           /
             AS 2000 R2

I am looking at using the neighbor 10.1.12.2 default-originate command, which, if I understand correctly is supposed to not only create the default route but also advertise it to the specified neighbor.

The problem with this is I don't know how I would create the backup to ISP2 with this technique. I am assuming I need to change the BGP route attributes?

I was also looking at using the AS-Path prepend and route-map command which may work for setting up my back up.

If someone could point me in the right direction as I am obviously unfamiliar with the process.

Best Answer

This link is very similar to what you are asking I think. It doesn't have specific configuration however.

If you are wanting to use default routes I would be inclined to use a floating static route on your secondary router:

ip route 0.0.0.0 0.0.0.0 *next-hop-address* 250

Where '250' is the administrative distance of the default route.

On your primary router simply use the above route without the administrative distance and then redistribute it into BGP:

bgp *ASN*
 redistribute static route-map *name of route-map* out

You can then match the default route in a prefix list:

ip prefix-list default-route seq 5 permit 0.0.0.0/0

And match the prefix list in the route-map:

route-map *name of route-map* permit *seq number*
 match ip address prefix-list default-route

iBGP has an administrative distance value of 170. So when your primary router advertises that to your secondary router it will prefer the iBGP route over the statically set default route. If you want to advertise the default from the secondary router to the primary then I would suggest using local preferences. Local Preferences values that are attached to routes on BGP advertisements. A higher Local Preference is preferred in BGP even when they have the same Administrative Distance (170) and they are the same route, in this case, 0.0.0.0/0. In that route map you can also attach local preference to the route as well as other BGP attributes.

set local-preference *value*

Note, default local preference is 100.

If you want to track whether there is reachability for the default routes you can attach an ip sla to the static route. You can read about ip sla's here.

In that link I mentioned at the start, it talks about how the ISP's would prioritise sending back to a specific connection. So I'd recommend having a read of that to see if that answers that part of your question.

Cheers,

H