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 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.

  • Can ISP1 and/or ISP3 provide a default route in their BGP feed?
    – cpt_fink
    Feb 11, 2015 at 6:02
  • Sorry I forgot to mention, yes they both can however I need to configure it. In other words, I can't just assume the ISP's will take care of it.
    – Kvothe
    Feb 11, 2015 at 16:43

1 Answer 1


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 *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

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, 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.



  • First, thank you for explicit answer, I greatly appreciate it. Second, I follow you up to the point of the prefix list. Correct me if I am wrong but you are saying create a default route on both r1 and r3 with, "ip route next-hop-address" and "ip route next-hop-address 250" respectively. This would allow both ISP's to advertise their default routes via BGP while keeping ISP 1 as the primary route due to its lower AD (after redistribute command is issued). What is the purpose of using an IP prefix list then attaching it to a route map? running out of char...
    – Kvothe
    Feb 11, 2015 at 19:12
  • Regarding the fail over to ISP 2 then back to ISP 1, is that part of manipulating the Local preference?
    – Kvothe
    Feb 11, 2015 at 19:14
  • I think I may have gotten confused by your topology. I was under the understanding you had two routers each one connected to a different ISP? If this is not the case then my answer may not help. :)
    – Firebirdnz
    Feb 12, 2015 at 4:13

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.