Consider a scenario where I have two border routers one peering with ISP A and the other peering with ISP B. Let say I receive full tables from both ISP A&B.

Internally we run OSPF and my question is how do I make sure that outgoing packages are routed to the correct border router in the first place?

If the best path to a certain prefix is via ISP A packages should always be directed to B1 and not B2 to avoid the extra hop.

Network diagram

1 Answer 1


The issue here is that in order for the internal routers to know which of the border routers they should route to, you would need to redistribute full Internet routing tables into OSPF which isn't going to be possible. OSPF isn't designed to handle and cannot support the 600,000+ external routes required.

You would normally have the two border routers advertise a default route into OSPF and accept that 1/2 of the traffic will need to pass across the iBGP link.

As a compromise, if you know there are some specific prefixes that would be better routed via one of the border routers you could redistribute BGP into OSPF using a route-map and prefix-lists so that only a small number of specific prefixes are redistributed into OSPF.

  • Okay thanks. When it works as I thought. If the two ISPs are very diverse (say different continent) this could be a problem. But then you can run iBGP on a few strategic internal routers I guess?
    – Peter
    Commented Oct 16, 2016 at 17:41
  • 2
    Yes, that would be a good option, just make sure BGP is running on any transit routers as well. You will need an iBGP full-mesh or route-reflectors.
    – user27899
    Commented Oct 16, 2016 at 18:00

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.