Hi everyone,
I’m looking for a MikroTik script or configuration that can do the following:
I have multiple internet interfaces:
Priority 1: VDSL (e.g., PPPoE)
Priority 2: LTE (e.g., lte1 (ether/DHCP Client)
Priority 3: RJ45 (e.g., ether4, connected to another router by DHCP Client)
All interfaces are physically up – so I don’t want basic failover based on link status. Instead, I want to use ping checks (e.g., to 8.8.8.
to verify if the internet is reachable through each interface.
Only interfaces that successfully respond to the ping should be considered “online”.
The script should automatically select the highest-priority available interface as the default gateway (similar to metrics, but based on reachability).
Has anyone done something similar and has a working script or config to share?
I’m fine with using routing tables, mangle rules, scheduler scripts, or any other method.
I prefer configuring via Winbox, but I’m also okay with CLI.
Thanks in advance!
PS.
A script where I can simply define the interface names and gateways at the top as variables, and then the rest of the logic runs automatically based on that, would also be totally fine. So something like: define VDSL interface, LTE interface, RJ45 interface, their respective gateways and priorities – and then let the script do the checking and routing.