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

OSPF static route distribution

Is it possible to change the metric of a single static route, out of numerous routes being distributed (from a main site router)as a failover for the normally desired route?

The goal is to have the OSPF domain use the normal dynamic route learned from a remote site. Then if that remote site goes down, have the OSPF domain use the distributed static route, which would direct the traffic through the main site.

Is this possible?


Re: OSPF static route distribution

possible. use route-maps while redistributing

redistribute static subnets route-map setmed

route-map setmed permit 10

match ip address 101

set metric 10

route-map setmed permit 20

'101' will match the prefix. Let me know if it works for you.

New Member

Re: OSPF static route distribution

Can I still do this if the router I want to apply this to is already doing "redistribute static subnets"

Can there be multiple redistribute statements?

Hall of Fame Super Silver

Re: OSPF static route distribution


You have asked essentially the same original question on the WAN Routing and Switching forum where I have given a substantial answer. Rather than reproduce it here I will suggest that anyone look at that forum for the answer. Short version of the answer: I believe that a route map can control redistribution so that some static routes are redistributed with different values as Gautam has suggested. But I do not think that you need route maps to achieve your desired behavior.

To answer the follow-up question that you have asked: there can be multiple redistribute statements in the sense of redistribute static, redistribute rip, redistribute connected, redistribute eigrp 100. But there can be only one redistribute static under router ospf.

CreatePlease to create content