Cisco Support Community
Showing results for 
Search instead for 
Did you mean: 

Welcome to Cisco Support Community. We would love to have your feedback.

For an introduction to the new site, click here. And see here for current known issues.

New Member

Static Routes:

Am working for a company that discourages the use of static routes,instead OSPF is used.The problem is with one of our providers;sometimes they pass through OSPF traffic at times they don't,hence the need to have some static route.

My problem is configuring a static route with a cost that is slightly lower that the one that will be obtained by OSPF,so that OSPF will be used when its running,when it fails then there is no outage-it just falls to the static route.

I hope you've figured out the scenario-i just want a metric to put on the static route that is just lower than the OSPF metric.


Re: Static Routes:

Static routes have their benefits and are very useful in some cases.

When 2 different routing protocols are used, metrics will not be the criterion to prefer one over the other. However Admin Distance (AD) is, and lower AD is better.

OSPF AD is 110 where as static route are either 1 or 0. to achieve your set up , you need to assign a higher AD than 110 to the static routes.

ip route 112

Pls rate all helpful posts.


Hall of Fame Super Bronze

Re: Static Routes:

Based on your requirement, you want a static route with a metric higher than OSPF so OSPF is the preferred routing protocol.

The lower the metric, the more preferred is the route.

OSPF's default administrative distance is 110 so I recommend configuring a static route with a distance of 115, for instance:

ip route 115





Re: Static Routes:

The key thing to remember, though, is that the static route you create, with the higher Administrative Distance, will have to be compared to an exact same length prefix from OSPF. Otherwise, the static route will be placed in the routing table, no matter how high you make the AD.

So, if your router learns of network from OSPF and you create a static route with a higher AD than OSPF for (same prefix length), only then will the OSPF route be chosen because the routes are comparable. If that comparable OSPF route did not exist, then the static route would have been placed in the routing table.



New Member

Re: Static Routes:

What about a floating statci route

The AD of OSPF IS 110

so add the following

route x.x.x.x y.y.y.y z.z.z.z 111