Un-prefer an OSPF interface?

What's the best way to force an interface to be the least preferred for all OSPF routes? I want to create a backup GRE tunnel on a VPN router and when I turn it on, a few routes prefer that router over my regular T1 (on another router). How can I make it less interesting compared to the T1, until that T1 goes down? All my network runs OSPF.

Rob

Reply to
Rob
Loading thread data ...

conf t int tunnel 1 ip ospf cost 65535 !! well I would probably choose a smaller number

I expect that 65535 will be OK but then you are testing whether the developers of every ospf participating router have done their boundary condition testing correctly.

Choose a number such that your max ospf metric is less than say 32000 anywhere in the network.

R3#sh ip route O 10.0.1.2/32 [110/129] via 10.0.0.1, 1d14h, Serial1/0 [110/129] = [Administrative-Distance/Metric]

Reply to
Bod43

Hmm.. That didn't seem to work. I still have some tunnel0 routes.

Reply to
Bob

OK.

I made some sweeping assumptions. i.e. You were relying on OSPF for all routing and had only one area.

One thing is that connected networks will always have precedence so that far end of the tunnel will always be reachable over the tunnel. As I understand it this cannot be changed.

If you have more than one OSPF area then you will need to consider that inra area routes are preferred over inter area router (I think).

By default static routes are preferred over OSPF routes.

Best thing is to post:-

sh ip route - highlighting your concerns.

There might be enough there to work with. If you want include the routing protocol configuration too.

Did you apply the cost to both ends of the tunnel? I do not understand what OSPF does if they are different although I am sure that it does accept them to be different.

Reply to
Bod43

yes - the routes will still be there.

But - OSPF prefers lowest cost routes, and these should be high cost, so will only be used when there arent lower cost routes in the routing table.

You may see a different behaviour if the different paths are advertising different mark lengths - but that would need you to be explicitly altering the default OSPF behaviour, or you have some inconsistent setup somewhere.

Connected routes are special - so the tunnel0 routes will get used to get to devices directly connected to the tunnel - ie the 2 end points.

any traffic to routes "further away" should go by an alternate path.

1 other point - you need the cost set at the far end as well, or you may find traffic in 1 direction avoids the tunnel, but the return traffic uses it.
Reply to
stephen

Cabling-Design.com Forums website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.