Controlling OSPF routes

Unanswered Question
Nov 13th, 2011

I have a basic setup with 2 x 6509's at 2 separate sites running OSPF area 0 over a 100MB link.

There is a also a 30MB MPLS link connecting the sites.

Default OSPF behaviour is routing traffic between the sites via the 100Mb link.

I need to change this behaviour and make the traffic go over the 30MB MPLS link.

I can either cost the interfaces, policy route, or change the way ospf advertises these networks?

What would be the best way affect the default behaviour of OSPF?

Basic diagram below.




I have this problem too.
0 votes
  • 1
  • 2
  • 3
  • 4
  • 5
Average Rating: 0 (0 ratings)
arun.nair2@wipro.com Sun, 11/13/2011 - 04:55


Costing is the best way for simple network management. The idea is to not make OSPF dependent on any external parameters, which come into play as soon as you advertise(you need to change advertising cost and stuff) or do policy route(access-lists or route-map? bah!! ).



Marwan ALshawi Sun, 11/13/2011 - 12:54

It depends how you run the ospf over the mpls is it same area as the 100 m link ?

If yes the interface cost is simple way to go with

If the route in different area over the mpls then you need to change the advertised network length where you send more specific route over the mpls

Hope this help

If helpful rate

roger.perkin Mon, 11/14/2011 - 03:52


The ospf does not run over the MPLS. We peer with the ISP router and they redistribute it into BGP and then back out the other side.

So I assume those routes would be O E2?



arun.nair2@wipro.com Mon, 11/14/2011 - 06:17


Yes exactly. They are E2 routes. Now since you are running Area 0 as your 100Mb backbone, you should get IA routes through that link, hence they would be preferred rather.



roger.perkin Mon, 11/14/2011 - 13:06

This I know,

My question is how do I make the the traffic go over the MPLS against the flow of OSPF?

Jon Marshall Mon, 11/14/2011 - 18:17


If you cannot change link between the 6500s ie. change so that it uses multiple areas then costing interfaces will do no good at all. Because you are also in the same area ie. area 0 on both sides of the link you can't summarise either as you can only summarise between areas.

Basically you need to override the OSPF routes so PBR may be an option although you need to also check the next-hop availability. The problem with this is that if you are going to use PBR then what is the point of exchanging routes via either OSPF (area 0) or BGP/OSPF (MPLS) connection ?

You could also look to use static routing with IP SLA.

Either way what you need to do is be able to tell where the failure has occured because there are multiple failure scenarios ie. -

1) the BGP/OSPF 3750 (edge 3750) could lose it's WAN link or it could lose it's link connecting to the OSPF 3750 (internal 3750).

2) the internal 3750 could lose it's link to the edge 3750

3) if either 1) or 2) happened the other edge 3750 would need to know about it.

This, as i am assure you are aware, is where routing protcols excel ie. lost link equals lost routes but if you use PBR/static + IP SLA that does not occur automatically any more.

A  further complication is what IP would you use for example for IP SLA. Lets say you add a static route using IP SLA to the internal 3750 in each site and you use the IP of the external interface of the corresponding edge 3750. So in site A for example you ping from the internal 3750 to the edge 3750. If this ping fails then you remove the static route and your internal 3750s then use the OSPF routes received via area 0. The problem is if the edge 3750 IP address is also advertised into area 0 then IP SLA will simply use this route and the static route would never fail.

So a solution could look like this -

1) on site A internal 3750 add a static route pointing to site A edge 3750 as next-hop

2) use IP SLA to track this route and the IP you need to ping is the remote site WAN interface. You need to use the remote WAN interface because if you use the local WAN interface then if the remote edge 3750 fails you won't know about it and so your static will stay in place

3) you then need to make sure that the edge 3750 WAN IPs/subnets are not advertised via area 0 so that IP SLA cannot reach them via the 6500s.

You can use PBR but you still need to check availability as above so either way would do.

Obviously this is not ideal. It's messy and goes against the whole benefit of using dynamic routing. If you need to send the traffic via the MPLS link then a better long term solution is to look at a redesign because what you have now does not really work.


Jon Marshall Mon, 11/14/2011 - 18:25


One further option which may be a lot simpler and would have saved me a lot of typing

Run BGP on your internal 3750s although this woud have to use a different AS number than the edge routers. Then you have EBGP and OSPF routes on each internal 3750 and EBGP has a much lower AD than OSPF so it would prefer the edge router.

Note it has to use a different AS as if you used the same AS the routes would then be IBGP with an AD of 200 so the OSPFroutes via area 0 would be preferred.



Login or Register to take actions

This Discussion

Posted November 13, 2011 at 3:47 AM
Replies:8 Avg. Rating:
Views:624 Votes:0
Tags: No tags.

Discussions Leaderboard

Rank Username Points
1 14,822
2 8,146
3 7,640
4 7,058
5 6,663
Rank Username Points