I've configured the client MtK router with two ISPs. I did put the script in there with my e-mail credentials with the idea, to send me a mail when WAN1 is offline, online, WAN2 is offline, online. But the problem is - the IP-addresses for the netwatch to follow. I did try almost every single IP saw in the traseroute but, without any success. IP-addresses are visible for both ISPs. Let's say I put the DNS, when WAN1 is down, WAN2 see the IP is online (have ping to it)and didn`t work as it should. Here's the all script I have ot this one:
all the internet is reachable through both gateways, since the distance is different, all your traffic will normally go through the 192.168.0.1 gateway (if you make an /ip route print the first route will be AS) and - if you disconnect that cable - everything will go through 192.168.1.1.
You need to add two "narrow" routes, with low distance, one for each checked address.
Let's say that you use 1.1.1.1 for the first route and 9.9.9.9 for the second:
0.0.0.0/0 means ALL addresses
1.1.1.1/32 means ONLY 1.1.1.1.
1.1.1.1/24 means ANY between 1.1.1.1 and 1.1.1.254.
A narrower route will always take precedence (when distance is the same) ove a wider one.
The fact you have a subnet mask (in LAN) of 255.255.255.0, i.e. a /24 has nothing to do with the above.
And yes, you need to specify the checked host in the netwatch script, this is one of the cases where it is easier to use the GUI to set up the scripts.
Technically, when your WAN2 is UP, nothing happens IF WAN1 is already up, as this latter has a lower distance.
If you run /ip route print with various WAN situations, you will see that WAN1 (if up) will always be AS, independently from the status of WAN2.
If you prefer, the conditions are:
IF WAN1 is up, use WAN1, NO MATTER the status of WAN2
IF WAN1 is down and WAN2 is up, then use WAN2
IF WAN1 is down and WAN2 is also down, no connection to internet
Rest assured that when you unplug the cable something happens, whether this is properly sensed by the netwatch scripts, it is another thing, maybe there is some mistake in the scripts or something else preventing the stufff to work as expected.
Usually when using netwatch check-gateway=ping is not used, maybe it is that that is interfering.
Or maybe you need an additional blackhole route, buit that should only be needed in case of dynamic routes.
You need to check using /ip route print what happens to routes in the various cases.
You should normally have the two "narrow" routes AS (Active, Static) and as well the wide one on WAN1 AS, while the WAN2 one should be S (because it has a greater distance).
When you pull out the cable for WAN1 (pulling the cable simulates only part of the possible things that can break the connection) both the routes going through the WAN1 should become S, the narrow route through WAN2 should remain AS, the wide route through WAN2 should become AS.
When you pull out the cable for WAN2, the two routes going through WAN1 should remain AS, the narrow one through WAN2 should become S, and the wide one through WAN2 should remain S.
You have a AS route for canary address 9.9.9.9 via 192.168.1.1.
The corresponding 0.0.0.0 route is S because of higher distance 2.
Then you have an AS route for canary address 1.1.1.1 via 192.168.0.1.
The corresponding 0.0.0.0 route is also AS because it has (lower) distance 1.
Right now you have worklng connections through BOTH 192.168.1.1 and 192.168.0.1.
Ther point is about what changes when you physically disconnect: