Static Routes:

Unanswered Question
May 24th, 2008
User Badges:

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.

  • 1
  • 2
  • 3
  • 4
  • 5
Overall Rating: 0 (0 ratings)
cisco_lad2004 Sat, 05/24/2008 - 06:58
User Badges:
  • Gold, 750 points or more

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.


Edison Ortiz Sat, 05/24/2008 - 06:59
User Badges:
  • Super Bronze, 10000 points or more
  • Hall of Fame,

    Founding Member

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




lamav Sat, 05/24/2008 - 07:30
User Badges:
  • Blue, 1500 points or more

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.



sdoremus33 Sun, 05/25/2008 - 17:08
User Badges:
  • Bronze, 100 points or more

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


This Discussion