[SOLVED] How does opnsense select gateway when OSPF

Started by alex_rhys-hurn, September 23, 2018, 11:56:51 AM

Previous topic - Next topic
September 23, 2018, 11:56:51 AM Last Edit: October 02, 2018, 02:51:19 PM by alex_rhys-hurn
I have OSPF Running, and receiving a default route. OPNSense seems to prefer the gateways manually set in the gateways page.

What is the model by which opnsense selects gateways when dynamic routing is enabled?

Thanks,

Alex

Static routes have higher priority than OSPF learned routes. You have to disable them

Hi,

Many thanks for your reply (and for the other on FRR).

Yes, I understand that route cost for static routes will always be lower than Dynamic routes.

So, are you saying that if I remove all the gateways and gateway settings from my interfaces, and then receive default routes by ospf then OPNSense will obey those?

I could then receive two OSPF Default routes (with different cost) and then do failover that way without all the policy based routing and dns malarky?

Can I make my gateway costs higher manually?

Many thanks,

Alex

Sure, in the end the failover code also just sets routes ... If you dont use them FRR will do the job.

Thats totally awesome..... For me, really simplifies things.

Cheers,

Alex

Just to interrupt here:

Firewall rules can still overrule the routing table.

Hi Fabian,

So, to answer my own question is the sequence for route selection something like this?

1st: Policy Based Routes via Firewall Rules
2nd: Static ROutes with cost lower than dymanic routes (I dont think you can modigy static route cost in the gui, which is a shame)
3: Dynamic Routing?

So given that I want to use dynamic routing as my primary default route path, I must be careful how things are configured.

Alex

I can confirm that deleteing all gateways, and setting gateway to auto in interfaces for my wan links, causes opnsense to use the OSPF injected default routes.

Failover between them is very fast, and it is load balancing via ECMP

Thanks,

Alex