Static Routes:

Unanswered Question
May 24th, 2008

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.

I have this problem too.
0 votes
  • 1
  • 2
  • 3
  • 4
  • 5
Overall Rating: 0 (0 ratings)
Loading.
cisco_lad2004 Sat, 05/24/2008 - 06:58

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 10.1.1.0 255.255.255.0 192.168.1.1 112

Pls rate all helpful posts.

Sam

Edison Ortiz Sat, 05/24/2008 - 06:59

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 192.168.2.0 255.255.255.0 192.168.1.1 115

HTH,

__

Edison.

lamav Sat, 05/24/2008 - 07:30

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 192.168.2.0/24 from OSPF and you create a static route with a higher AD than OSPF for 192.168.2.0/24 (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.

HTH

Victor

sdoremus33 Sun, 05/25/2008 - 17:08

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

Actions

This Discussion