cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
344
Views
0
Helpful
4
Replies

Static Routes:

nickolaskoiser
Level 1
Level 1

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.

4 Replies 4

cisco_lad2004
Level 5
Level 5

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
Hall of Fame
Hall of Fame

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.

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
Level 3
Level 3

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

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community:

Review Cisco Networking products for a $25 gift card