Home
Help
Search
Login
Register
OPNsense Forum
»
Archive
»
18.7 Legacy Series
»
[SOLVED] How does opnsense select gateway when OSPF
« previous
next »
Print
Pages: [
1
]
Author
Topic: [SOLVED] How does opnsense select gateway when OSPF (Read 6346 times)
alex_rhys-hurn
Newbie
Posts: 24
Karma: 3
[SOLVED] How does opnsense select gateway when OSPF
«
on:
September 23, 2018, 11:56:51 am »
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
«
Last Edit: October 02, 2018, 02:51:19 pm by alex_rhys-hurn
»
Logged
mimugmail
Hero Member
Posts: 6766
Karma: 494
Re: How does opnsense select gateway when OSPF
«
Reply #1 on:
September 23, 2018, 12:08:06 pm »
Static routes have higher priority than OSPF learned routes. You have to disable them
Logged
WWW:
www.routerperformance.net
Support plans:
https://www.max-it.de/en/it-services/opnsense/
Commercial Plugins (German):
https://opnsense.max-it.de/
alex_rhys-hurn
Newbie
Posts: 24
Karma: 3
Re: How does opnsense select gateway when OSPF
«
Reply #2 on:
September 23, 2018, 04:54:24 pm »
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
Logged
mimugmail
Hero Member
Posts: 6766
Karma: 494
Re: How does opnsense select gateway when OSPF
«
Reply #3 on:
September 23, 2018, 04:56:35 pm »
Sure, in the end the failover code also just sets routes ... If you dont use them FRR will do the job.
Logged
WWW:
www.routerperformance.net
Support plans:
https://www.max-it.de/en/it-services/opnsense/
Commercial Plugins (German):
https://opnsense.max-it.de/
alex_rhys-hurn
Newbie
Posts: 24
Karma: 3
[SOLVED] How does opnsense select gateway when OSPF
«
Reply #4 on:
September 23, 2018, 05:12:27 pm »
Thats totally awesome..... For me, really simplifies things.
Cheers,
Alex
Logged
fabian
Hero Member
Posts: 2769
Karma: 200
OPNsense Contributor (Language, VPN, Proxy, etc.)
Re: How does opnsense select gateway when OSPF
«
Reply #5 on:
September 23, 2018, 08:47:12 pm »
Just to interrupt here:
Firewall rules can still overrule the routing table.
Logged
alex_rhys-hurn
Newbie
Posts: 24
Karma: 3
Re: How does opnsense select gateway when OSPF
«
Reply #6 on:
September 23, 2018, 11:42:23 pm »
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
Logged
alex_rhys-hurn
Newbie
Posts: 24
Karma: 3
[SOLVED] Re: How does opnsense select gateway when OSPF
«
Reply #7 on:
October 02, 2018, 02:50:48 pm »
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
Logged
Print
Pages: [
1
]
« previous
next »
OPNsense Forum
»
Archive
»
18.7 Legacy Series
»
[SOLVED] How does opnsense select gateway when OSPF