Just for your information. I use a subset of that advanced load balancing setup (as I need no load balancing, only failover and only outgoing connections)
The explanation is in that advanced load balancing setup without scripting.
Scope plays an important role, to be able to ping-check a remote server (.e.g. 8.8.8.8) and to enable/disable the corresponding route to the local gateway, based on that remote ping result. No so easy to understand at first sight! It's about recursive routing.
In my setup:
Route distances 10 and above are only there to still try to connect , even if 8.8.8.8 and 8.8.4.4 would be down, but the rest of internet is up. = fallback
Route distances above 20 are DHCP set routes (when the local gateways are replaced with devices with other addresses) = fallback of the fallback
The distance 2 and 3 define which gateway is preferred. I prefer 4G now, as I have multiple 4G connections on a load balancer, and the satellite has a 700 ms roundtrip delay.
192.168.90.1 and 192.168.95.1 are the LAN side addresses of the modem/gateway towards 4G and the satellite modem.. "90.1" is a satellite connection, "95.1" is a set of 4G SXT kits.
/ip route
add check-gateway=ping comment="dynamische default route" distance=2 gateway=8.8.4.4
add check-gateway=ping distance=3 gateway=8.8.8.8
add comment="fallback dynamische default route" distance=10 gateway=192.168.90.1
add distance=11 gateway=192.168.95.1
add comment="check 4G recursive for default route (BGP scope = target scope)" distance=1 dst-address=8.8.4.4/32 gateway=192.168.95.1 scope=10
add comment="check SkyDSL recursive for default route (BGP scope = target scope)" distance=1 dst-address=8.8.8.8/32 gateway=192.168.90.1 scope=10
.
.
Klembord-1.jpg
You do not have the required permissions to view the files attached to this post.