cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
2439
Views
6
Helpful
7
Replies

Choosing from Multiple Default Routes

frank.williams
Level 1
Level 1

I have two internet links running BGP. I'm redistributing the BGP default routes from both ISPs into OSPF. My goal is to have my internal routers selectively choose the default route for the internet link that I want them to use.

I tried redistributing BGP into OSPF with a TAG. Then my internal routers should be able to use a route-map, match the tag, then set the metric for that route. However, this isn't working.

Any suggestions?

1 Accepted Solution

Accepted Solutions

Redistributing BGP as external type 2 will work fine for me because my two ISP links are in geographically different data centers. Thanks for the help!

View solution in original post

7 Replies 7

spremkumar
Level 9
Level 9

hi

for simplicity sake if you are getting default routes from your ISPs and if you r running ospf in tht router(ASBR) then you can redistribute the default routes to other routers using default-information originate command under router ospf .

regds

prem

I realize I can use default information originate - and it works. However, my goal is to be able to force my internal routers to prefer one default route over another - AND - if that route goes away (i.e. BGP session drops), then the internal router will select the alternate default route. For example, if I have 20 internal routers, 10 may chose Def Route A, and the other 10 will choose Def Route B. In the event that Def Route A goes away, all 20 internal routers will use Def Route B.

There are some things about your question that I do not understand. In particular I am not clear if both BGP connections are into the same router or whether the BGP connections come into two different routers. How the default would work will be different depending on what the topology is.

Beyond that I think you are running into the fact that OSPF treats a default route differently from other routes. It is not something that you can apply a TAG to and match in a route map. The OSPF default route identifies what router is capable of getting to route destinations that are not present in the routing table. And if there is more than one router that can do this, then OSPF uses a set of selection criteria (intra-area, inter-area, comparing OSPF metrics to routers within the same classification) to decide which one it will use.

HTH

Rick

HTH

Rick

I'm not sure why you'd want to split traffic across different "defaults", but one way to choose one default over another is to set a higher local pref to the default received from one of your ISPs. that would essentially force all traffic to use ISP 1 as your "port of call"... If the peer drops, then all of your traffic would head towards ISP2. This works great in scenarios where ISP1 is say, a DS3 and ISP 2 is a couple of T1s.

HTH.

redistribute the default routes from bgp to ospf as external type 2 routes. external type 2 routes use the cumulative ospf cost, instead of external type 1 which uses a default metric of 20 no matter how may links it goes through. each router recieving these will choose the default with the least cost. if one default goes away they will use the other as it is the only one left.

Your suggested alternative works if the BGP connections are to two different routers in two different parts of the OSPF network. It almost works (but not well) if the BGP connections are to two different routers in the same data center. And it does not work at all if the BGP connections are into the same router.

As I commented earlier, we need to know more about the topology before we can really know what solution might work.

HTH

Rick

HTH

Rick

Redistributing BGP as external type 2 will work fine for me because my two ISP links are in geographically different data centers. Thanks for the help!