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

Advertise OSPF with higher cost

hi all,

I need to implement following scenario and i really need your help in this regard.

My active path toward Branch Office should be via 'CORE ACTIVE' and 'WAN Edge Actve'.

In case of 'WAN Edge Acive ' failure , I need to traverse that traffic through 'WAN Edge Backup'.

I used AS path prepend to implement this in BGP Configuration.

I want to Advertise OSPF routes with higher cost from 'Core Backup'

1) How should I do this ?

2) Is there any other better alternate solution which I can use ?

Thanks a lot for your time and consideration.

Hall of Fame Super Silver

Hello Harsha,you cannot

Hello Harsha,

you cannot change on the fly the routes advertised in OSPF by core backup given the link state nature of the protocol.

However, you can increase the OSPF cost of the links betweeen (core backup, WAN edge active) and of the link  (core backup, WAN edge backup) by using ip ospf cost 50 at both ends of each link in interface configuration mode.

This makes core backup less preferred by the WAN routers then core active, because of the cumulative nature of OSPF metric in a single area (area 1) as in your topology.

Hope to help



New Member

hi Giuseppe Larosa,Thanks a

hi Giuseppe Larosa,

Thanks a lot for your response. What's your recommended way to implement this kind of scenario ?

I meant that whats the best possible solution I can give other than this ?


Hall of Fame Super Silver

Hello Harsha,if OSPF is the

Hello Harsha,

if OSPF is the only protocol spoken between core routers and WAN edge routers I don't see any other way to achieve what you want  ( core backup OSPF routes less preferred then those via core active).

It is good practice to have the same cost at the two ends of a link, and this is the only recommendation that I may add.


Hope to help


Hello Harshaabba,In the past,

Hello Harshaabba,

In the past, this is how I have accomplished this in similar situations.

Under the OSPF config, something similar to this.



 distance 15 99

access-list 99 permit
access-list 99 permit

(15) = AD = OSPF Router ID = wildcard bits
99 = Access list to match


Note: This isn't always the best solution, but after looking at your diagram, this should work just fine.


CreatePlease to create content