Community discussions

MikroTik App
 
bbs2web
Member Candidate
Member Candidate
Topic Author
Posts: 232
Joined: Sun Apr 22, 2012 6:25 pm
Location: Johannesburg, South Africa
Contact:

Redundant paths to OSPF?

Wed Jun 17, 2020 8:49 am

Source ---- A ---- B

We have a requirement of routing a prefixes towards a customer at both A and B, but they want B as primary. We subsequently define a static route on both A and B, re-advertise them to OSPF as type 1 and set the distance of the static route on A to have a distance of 120.

Both static routes use the ping gateway check and it correctly fails over from B to A, but doesn't fall back. The OSPF route on A towards B only appears when we temporarily disabled the static on A.
Image

Any suggestions?
 
millenium7
Long time Member
Long time Member
Posts: 538
Joined: Wed Mar 16, 2016 6:12 am

Re: Redundant paths to OSPF?

Mon Jun 22, 2020 3:04 am

Routes are chosen in this order
- Most specific route
- Administrative Distance (lower is better)
- Metric/Cost (lower is better)

If a packet has a destination of 192.168.1.2 and you have the following routes in the table...

192.168.0.0/16 - Distance 1 - Cost 0
192.168.1.0/24 - Distance 110 - Cost 50
192.168.1.0/30 - Distance 110 - Cost 10000

then 192.168.1.0/30 will be used, as its the most specific. If that is unavailable then 192.168.1.0/24 even though its distance value is higher

Static routes by default have a distance of 1. So by default that will always take precedence over OSPF routes. You can set the distance value manually though. You can also change the OSPF distance value but its not recommended

Who is online

Users browsing this forum: No registered users and 17 guests