Advantages:
- Can be used for one or more interfaces.
- Any type of interface.
- Ping multiple hosts, since relying on a single host is too unreliable.
- You can run it as often as you like — it can detect fail relatively fast.
- Easy setup — you only need to set a couple of variables.
- Works on RouterOS 6 and 7.
Just create script in /system scripts
and set variables in SETTINGS
to your liking. Variables are provided with comments and examples.
Add a task to the scheduler with short interval (even a couple of seconds is OK).
/system script run Check_ISP1
You can use this firewall rule to test the script:
/ip firewall filter add action=drop chain=output comment=INT_CHECK_TEST \
out-interface=ETHER1 protocol=icmp