OSPF routing question

Unanswered Question
Oct 5th, 2007

I have a remote site A which has two DS3 coming to data center1 and Data Center2. All three routers are on Cisco6500. currently DataCenter 1 is the preferred routing. Remote site uses area2 for both datacenter location. I would like to force this remote site to use Datacenter2 instead for all of its routing. what are the best options I can use, I would like to use datacenter2 for all traffice and datacenter1 to stay in redundant mode. Datacenter1 and 2 are also connected to each other via a core 6500.

Please help.

I have this problem too.
0 votes
  • 1
  • 2
  • 3
  • 4
  • 5
Overall Rating: 0 (0 ratings)
Edison Ortiz Fri, 10/05/2007 - 21:35

Before I offer a suggestion, can you tell us why DataCenter1 has the preferred routing ?

If you haven't modified the cost or bandwidth, both DataCenters should balance the load *if* they are advertising the same routes.

To answer your question, you can modify the 'ip ospf cost' under the DS3 pointing to DataCenter2 to a value lower than DataCenter1.

You can check current ospf cost values with the 'show ip os interface' command.


nawas Fri, 10/05/2007 - 21:42

I agree they should load balance but I see everything coming from datacenter1, even some local routes in the data center2 go to this remote via dc1. I just checked the cost and it is 2 on each interface going to dc1 and dc2. what about setting the tag, do you think it would be better than cost? Does implement will consider inter area routes or not?

thanks for your time and help.

nawas Fri, 10/05/2007 - 22:04

Edison, I found out why DC1 was preferred which i just fixed it. can you tell if i use ip ospf cost on the interface, is it better to do in on the remote site where i have two serial interface going to each data center or should i use lower cost command on the interface in dc2.

Mohamed Sobair Sat, 10/06/2007 - 01:00


If both Datacenters advertises the same routes to the remote site, the following comes to select OSPF best path for a route regardless of its metric:

1- Intra Area Routes. (prefered first)

2- Inter Area Routes. (prefered Second)

3- External Routes Typ1. (Prefered Third).

4- External Route Type2. (Prefered fourth).


Mohamed Sobair

Edison Ortiz Sat, 10/06/2007 - 07:52

Yes, do it at the remote site and use the lower cost command on DC2's interface.


Mohamed Sobair Sun, 10/07/2007 - 14:30

Hi Edison,

I beleive this will work out if the Routes learned from the same OSPF LSA type at the remote site router.

But if its not, would modifying the OSPF cost play a rule at this stage?

Please correct me if I mistaken on this.

PS: Apologize If I interfered with your reply, as I just want to know the right answer.


Mohamed Sobair

Mohamed Sobair Tue, 10/09/2007 - 03:49


Thanks for your feedback,

your input is always valuable and usefull.


Mohamed Sobair

nawas Tue, 10/09/2007 - 05:13

Now what do I need to do if configuring cost will not help compleltely, Do I need to tag the traffice, any other option, please let me know.


Edison Ortiz Tue, 10/09/2007 - 09:51

Can you confirm both DCs are advertising the same routes (same LSA) ?

For instance, if both DCs are advertising as an intra-area route, then the cost will definitely help you on routing preference. However, if one DC is advertising as intra-area and another advertises as inter-area, it will prefer the intra-area route regardless of the interface cost.

That's the point Mohamed was making.

nawas Fri, 10/12/2007 - 06:25

hey guys.

I have checked and found that both DCs are advertising routes as inter area, now im wondering if specifying cose will still help?

Also can I set a tag or specify a higher metric to the routes learned from DC1? Is there any config sample for this?

Thank you all for all your help.

Kevin Dorrell Fri, 10/12/2007 - 07:02

I'm not sure this will do what you want because I have not tried it, but in more recent IOS you can do a distribute-list with a route-map. You could try that on your ABR, and use the set metric in the route-map. Like I say, I don't know if it will work, but it is worth a try.

The other more conventional approach you could use is again on the ABR, to summarise the routes from the respective DC areas, and apply a cost to the summary.


Kevin Dorrell


Edison Ortiz Fri, 10/12/2007 - 10:09

In that case, you are fine. Apply the lower cost, at the remote router interface, where you want the traffic to be preferred.


This Discussion