Prioritise ospf routing

Hi,

I want to route ospf traffic to router D and if this router fails then to route to Router C

Router A
/routing ospf area
set [ find default=yes ] area-id=0.0.0.0 disabled=no instance=default name=backbone type=default
/routing ospf network
add area=backbone disabled=no network=10.100.0.16/30
add area=backbone disabled=no network=10.100.0.20/30

Router B
/routing ospf area
set [ find default=yes ] area-id=0.0.0.0 disabled=no instance=“NetworkDevice” name=backbone type=default

/routing ospf network
add area=backbone disabled=no network=10.100.0.12/30
add area=backbone disabled=no network=10.100.0.40/30
add area=backbone disabled=no network=10.100.0.16/30

Router C
/routing ospf area
set [ find default=yes ] area-id=0.0.0.0 disabled=no instance=default name= backbone type=default
/routing ospf network
add area=backbone disabled=no network=10.100.0.8/30
add area=backbone disabled=no network=10.100.0.12/30


Router D
/routing ospf area
set [ find default=yes ] area-id=0.0.0.0 disabled=no instance=default name=backbone type=default
/routing ospf network
add area=backbone disabled=no network=10.100.0.40/30
add area=backbone disabled=no network=10.100.0.44/30
OSPF.png

It’s pretty simple.

You only need to put a higher cost on the OSPF INTERFACE that connects to Router C on the OSPF interface settings in ROUTER B.

For instance, change from default 10 to 20.

This should do the trick.

Thanks for the reply but could I have a example of this please?

At present the ospf interface has dynamic entries, do i need to make these static?



/routing ospf interface> print
Flags: X - disabled, I - inactive, D - dynamic, P - passive

INTERFACE COST PRIORITY NETWORK-TYPE AUTHENTICATION AUTHENTICATION-KEY

0 D ether1 10 1 broadcast none
1 D ether2 10 1 broadcast none
2 D ether2 10 1 broadcast none

Yes! Make the entry static and set the Cost.