Alternative route for OPNSense itself

Started by tkost, July 01, 2025, 08:12:59 AM

Previous topic - Next topic
July 01, 2025, 08:12:59 AM Last Edit: July 01, 2025, 08:21:24 AM by tkost
Hello.
I am using the latest version of OPNSense (Community).
On OPNSense, in addition to the WAN interface, there are several local interfaces, among which are interfaces 10.100.100.10 and 10.100.101.10. There is a remote subnet 192.168.254.0/24, which is accessible through routers 10.100.100.1 and 10.100.101.1. Routers 10.100.100.1 and 10.100.101.1 are connected to 192.168.254.0/24 by different channels and routes.

I need the OPNSense itself, not the clients, to have a route to 192.168.254.0/24 via 10.100.100.1 or 10.100.101.1 depending on whether the 192.168.254.0/24 network is reachable via 10.100.100.1 or 10.100.101.1 routers. That is, the route between 10.100.100.1 and 192.168.254.0/24 can fail, and then the OPNSense itself will have a route to 192.168.254.0/24 via 10.100.101.1. And the opposite case, when the route from 10.100.10.1 to 192.168.254.0/24 drops, then on OPNSense itself a route to the network 192.168.254.0/24 was built through 10.100.100.1.
It would be ideal if OPNSense chose the most responsive route through one of the routers based on ping time.
The connection between OPNSense and routers 10.100.100.1 and 10.100.101.1 is always available, since these routers are local, and the network 192.168.254.0/24 is remote.
I'm a newbie, and I need some ideas on where to start and what to do. In the OPNSense settings, when creating a static route, I can't select a gateway group. This would simplify the task.
10.100.100.1 and 10.100.101.1 are OpenWRT.
It is desirable that all configuration be carried out through the web interface, since when configuring outside the web interface, there is a chance of forgetting what and how you once configured.

A dynamic routing protocol like OSPF can do that. Check if OpenWRT supports it. For OPNsense see:

https://docs.opnsense.org/manual/how-tos/dynamic_routing_ospf.html
Deciso DEC750
People who think they know everything are a great annoyance to those of us who do. (Isaac Asimov)