I have a static default route on ether1
And dynamic IP from LTE with dynamic gateway and higher distance.
I want to ping-check a remote host (eg 8.8.8.8/1.1.1.1) via static default route. (because the default gateway can be up, and isp network down)
If ping-check fails x-amount of times, I want to failover default to whatever the gateway of LTE is.
If ping-check succeeds via ether1 again, set default route back to ether1 gateway.
Maybe use distance=2 on the LTE /ip/route for 8.8.8.8 and 0.0.0.0. The default LTE distance is controlled by the APN Profile (/interface/lte/apn), so maybe set that to 2.
BTW I’d guess it’s actually load balancing (called “ECMP”) the networks, that’s what the “+” means in the route table in v7 – does have A for active on both
Changing target-scope or gateway-check of a route in v7 will not affect other routes, as it does in v6. In v7 target-scope and gateway-check are properties that are internally attached to the gateway, not to the route.
It didnt work to change to distance=2.
I still don’t get any of the default routes active. But yeah, now the 8.8.8.8/32 route is not load balanced.
I will repost this in beta-forum I guess.
But I found a workaround… I had to disable the mangle rules to get this working, also just enable lte apn to add default route.
I will have to do some more testing to see if this is good enough.
If your goal is use ether1 as primary (and has static default gateway******), and you set the default route distance in the LTE APN, that may enough without any mangle rules. While “check-gateway” doesn’t check the internet is up, if you ether1’s default gateway generally goes down when the internet goes day (say a wireless link drops), it will still failover even without mangle. Those firewall manage rules and DNS-based routes, do check “the internet” works, but most of the time it the last mile that fails, not stuff within the ISP to internet (which the 8.8.8.8 “failover” stuff does do a good job of check) – but makes this very complex in v7 to think about what’s going on…
Now in v7 there may be a different approach that check 8.8.8.8, “Detect Internet”: https://help.mikrotik.com/docs/display/ROS/Detect+Internet . This does ping stuff, but not sure it effects the routing table – their smartphone apps steer people to enabling this, but AFAIK it just shows the status, and doesn’t take any action itself.
Not the expert & didn’t try it… but I suspect, since “Detect Internet” does change the /interface/list an interface belongs to based on a ping check to internet, it should move it the ether1 out of WAN if it doesn’t have internet. Now that won’t alone effect routing, but could be used somehow to (and maybe there is some technical to use Detect Internet in routing but docs are unclear on that…). Even so, you’d still like the default route distance for LTE bigger than ether1.
Note ****** For DHCP WAN address, you used to be able use this trick to add “check-gateway” to dynamically generated routes, like from DHCP client:
Exactly - this is a LTE router that is used for OOB mgmt. The router uses a “call home” VPN via wireguard which is stateless. The OOB network is usually stable and will be used from our DC for some monitoring on a daily basis.
When shit hits the fan (either from ISP, or from ourselves) the router will just failover to the LTE connection so that I still can VPN into the OOB network and trouble shoot!
Also, I think you want the “check-gateway” on your 1.1.1.1 route. But not sure if that’s the only issue here.
WRT to which forum group, I don’t know the etiquette re using v7 in “beginner basics” (technically v7 is released for RB5009 and Chateau) & I don’t like cross posts myself. But imagine more people using v7 follow that list.