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. 126.96.36.199) 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 188.8.131.52 and 184.108.40.206 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.
add check-gateway=ping comment="dynamische default route" distance=2 gateway=220.127.116.11
add check-gateway=ping distance=3 gateway=18.104.22.168
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=22.214.171.124/32 gateway=192.168.95.1 scope=10
add comment="check SkyDSL recursive for default route (BGP scope = target scope)" distance=1 dst-address=126.96.36.199/32 gateway=192.168.90.1 scope=10
You do not have the required permissions to view the files attached to this post.