cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
6747
Views
0
Helpful
13
Replies

How to make OSPF use a faster link as a preferred route?

gensonator
Level 1
Level 1

Our branch office has two WAN links with 2 different ISPs.  One link is a 512/512kbps ADSL service on OSPF area 0 and the other a 1Mbps SHDSL on OSPF Area 1.  I want to make the 1Mbps link the preferred route to the Head Quarters but unable to do so.  I have configured the WAN interface F0/0 of Router 1 with a higher ospf cost (ip ospf cost 4500) and configured the bandwidth to 512 but it is still taken as the preferred route.  

What can I do to get OSPF use the faster WAN link?

13 Replies 13

paolo bevilacqua
Hall of Fame
Hall of Fame

Are you running your own addresses on the links? Are the neighbors fully formed?

Anyway, for such a small netowrk, you should be running area0 only.

Because if everything was working correctly, nothing would be necessary to be done, for automatic best path selection.

nickbonifacio
Level 1
Level 1

Hi gensonator,

When you do a show IP route ospf, is the route that you want coming up as "O" or "O IA"?

Remember, you are going to perfer an O (intra-area) route over an O IA  (inter-area).

If you can, make everything area 0.

Thanks!

Nick

Nick Bonifacio CCIE #38473

Hi Paolo and Nick,

Thanks for the quick reply.   The diagram represents only one site.  We have 16 branches and all the WAN links on ISP2 are in Area 1.  The ISP2 joins us in the OSPF routing, that is their NTUs are configured with OSPF.  I cannot change the OSPF area. 

On Router 1, the route to the HQ is O.  On Router 2 it is O IA.   I want to prefer the O IA because it is the 1Mbps link.

Hi gensonator,

You could use a virtual link, in this case.  I believe that would be bad design and risky, but it could force the behavior you are looking for while keeping your design intact.

The virtual link will make the O IA route change to O.

Thanks!

Nick

Nick Bonifacio CCIE #38473

Hi Gensonator,

I checked your pic and found if left everything default then OSPF will do load-balance of all packets..can you please post some subnets thru a command "show ip route ospf" or show ip route [subnet] that is being advertised by the R1 and R2 both...give me same subnet output. here pls from both router...

Regards,

Amit

lmediavilla
Level 1
Level 1

Area 0 routes Internal will be prefered over Intra Area (IA) routes. So make both routes on the same area and the cost will work like you've already done.

Regards,

luis

turnera
Level 1
Level 1

Is there a reason for having that one link in area 1?

If not, then swap the areas between the 512 link and the 1 Mb link. Put the 1 Mb link in area 0 and put the 512 link in area 1. Then the 1 Mb link will be the perferred route to the branch office. Or put both the 512 link and the 1 Mb link in to area 1 and do the following:

Router 1 Configuration

configure terminal

router ospf 100 (or whatever you are using)

! Setup the router to run ospf in process 100

log-adjacency-changes

network xxx.xxx.xxx.xxx xxx.xxx.xxx.xxx area 0

network xxx.xxx.xxx.xxx xxx.xxx.xxx.xxx area 1

! Tell the router to run with your local ethernet interface's IP netblock

default-information originate metric 100

! Announce to other OSPF routers a default route using a metric of 100

Router 2 Configuration

configure terminal

router ospf 100 (or whatever you are using)

! Setup the router to run ospf in process 100

log-adjacency-changes

network xxx.xxx.xxx.xxx xxx.xxx.xxx.xxx area 0

network xxx.xxx.xxx.xxx xxx.xxx.xxx.xxx area 1

! Tell the router to run with your local ethernet interface's IP netblock

default-information originate metric 110

! Announce to other OSPF routers a default route using a metric of 110

!(110 > 100 so this router has a less desirable default route)

This should provide you with a default route via router 1 to the branch office. Then if that link should go down the 512 link should become the active link.

Thanks to all who replied this discussion.

The diagram that I presented is just a simplified representation of our network.  We actually have 16 branches.  Their primary link is with ISP1 and backup link with ISP2.   The WAN links provided by ISP1 have higher bandwidth than ISP2 except for this one branch that I presented in the diagram.  Since the WAN aggregation link of ISP1 is already on Area 0 with all the other branches, I cannot change it anymore to Area 1.  

ISP also joins us in the OSPF routing, that is OSPF is configured on their PE routers.

Hello Gensonator,

I guess this is the same network of the previous thread.

>> Since the WAN aggregation link of ISP1 is already on Area 0

This means each branch office router is already acting as an ABR between area 0 and area 1.

If I understood correctly all WAN links of ISP2 are in area 1

All WAN links should be placed in area 0, so that primary/secondary path can be chosen based on OSPF cost with a per branch office granularity. This can be done without additional overhead on branch office routers as they already act as ABR at least between area 0 and area 1.

As noted by other colleagues, if a different OSPF area is used in branch offices the path via area 1 is not a valid alternate path to backbone as each area requires a direct connection to area 0.

So if other areas in addition to area 0 and area 1 are used you would  need a virtual link between area X and area 0 using area 1 as a transit in order to have backup working.

The same reasoning is needed if branch internal networks are in area 0, in that case the virtual link would be needed to avoid area 0 partitioning.

Hope to help

Giuseppe

We have 16 branches with two wan links each to the HQ.  Is it better to put them all in Area 0?  The idea of the person who set this up previously was that all primary links in Area 0 and all backup link in Area 1.

By the way, there was a mistake on the previous diagram. It is currently setup like this on 16 branches.

Hi Gensonator,

The best thing you could do is put the link you want as primary in area 0 so it will be an O route, and put your backup links in area 1 so they will be O IA routes.  Otherwise, everything can be in area 0 and you can manipulate ospf cost on the interfaces.

Thanks!

Nick

Nick Bonifacio CCIE #38473

>>>> "The best thing you could do is put the link you want as primary in area 0 so it will be an O route, and put your backup links in area 1 so they will be O IA routes."

So do you mean I should leave it on the current setup?

>>>>" Otherwise, everything can be in area 0 and you can manipulate ospf cost on the interfaces."

Does this mean it is alright to put all the 2 routers in the HQ and 16 branches routers x 2 each (total of 34 routers) in Area 0? (like all of them in one broadcast domain if my analogy is right).