ospf help

Hello

I have a route to my gateway that is 2 hops but is crappy
I have a route that is 6 hops but faster and stable

I have set cost to 800 on teh interface I want it not to use, and on teh interface of the next hop I dont want to use.

But it still goes the wrong way (less hops but crap link)

Am I missing something?

Thanks

What does the resulting route table look like?

Regards

Andrew

it has its default route to the one I don’t want it to go to (the shortest one)

RouterB is the one in question, its default is always set to RouterA (and I dont want that)


So we have

Internet - RouterA - RouterB - RouterC >> the long but better way to gateway.

I did try and changed the cost on the interface on RouterA(internet side) hand for some reason that worked, but I am confused as to why.

Thanks

RouterA is your GW?

if so, that problem was there. and imho you did only possible thing.

Hello

No, RouterA is one router away from gateway

I have 4 routerA’s if you follow, 4 possible ways to get to internet.

I was hpoing to use teh strongest link not thw shortest

Thanks :slight_smile:

The issue is usually that statically configured default routes have a lower administrative distance than routing protocol routes. Cisco define a static route as an AD of 1 and and OSPF route as 110 so the static route will always be used over the dynamic one.

To change this behaviour, you need to alter the AD of the static route that you don’t want to use to something higher than 110. That way, it’s still available if your preferred route goes down.

To keep things simple, unless you have a specific requirement, leave the interface costs as default and make routing decisions based upon AD only.

Regards

Andrew

in ospf if i can i remove all the static routes (only one static route on gateway) and only GW is advertising its static route.

Agreed. Removing static routes is generally a good idea in an OSPF environment. However, if you wish to maintain a backup default route then you’ll need two static routes. Giving the backup an administrative distance above 110 means that it won’t normally be used.

Regards

Andrew