Yes you may have to play with scopes, something I dont understand either.
In any case, you completely understood well what I do which is very basic recursive where the connectivity to the first ISP is checked via two different DNS and if truly not available then the router switches to the second ISP.
{looking at my own config I do use scope=10, which is different from the default on these parts of the IP routes (but dont remember why):
add comment=PrimaryRecursive distance=5 dst-address=1.0.0.1/32 gateway=
ISP1gatewayIP scope=10
add comment=PrimaryRecursive distance=8 dst-address=9.9.9.9/32 gateway=
ISP1gatewayIP scope=10
What you need probably and what rextended provided is more likely the path you should take. He is very skilled at complex requirements and you just need to be patient in terms of understanding his direction/advice as sometimes its difficult to follow (difficult because our level of knowledge is not the same).
I will definitely try this and report, since you use this solution I suggest you try the blackhole routes as well, there are cases where the router gets stuck to the secondary ISP and has to be rebooted to fallback to the primary ISP. I had this happen to me, a router would switch from fiber to adsl and I ended up using netwatch.
Hi there, I use a script to do that work. I am not familiar with using black holes for anything but will look at it.
The script is placed in my dhcp client area…Basicallyl it says anytime my ISP1 is bound, Then do the following
go to the interface settings in dhcp client details, find the gateway and then put the new gateway in my recursive routing.
The issue I had with fibre is UNLIKE cable when it gets a new IP it doesnt automatically change the route entry like my cable connection does.
So I had to find a way to get the available gateway into my routes.
[ perhaps my distance=255 is something like a black hole, not sure why that is there but it has a purpose]
/ip dhcp-client
add comment=BellFibre default-route-distance=255 disabled=no interface=
vlanbell script=“:if ($bound=1) do={\r
\n:local iface $interface\r
\n:local gw [ /ip dhcp-client get [ find interface=$"iface" ] gateway ]
\r
\n/ip route set [ find comment="PrimaryRecursive" gateway!=$gw ] gatewa
y=$gw\r
\n/ip route set [ find comment="SecondaryRecursive" gateway!=$gw ] gate
way=$gw\r
\n/tool e-mail send to="myemail@address.com" subject=([/system iden
tity\r
\nget name]) body=" This is your new gateway IP: $gw";\r
\n:local sub3 ([/system clock get time])\r
\n/tool fetch "https://api.telegram.org/botxxxxxxxxxxx\
xxxxxxxxxxxxxxxx/sendMessage\?chat_id=-xxxxxxxxx&text=At+$sub3+BellFibr
e+Changed+WANIP"\r
\n:log info "Telegram notification sent VlanBell IP Changed"\r
\n}” use-peer-dns=no use-peer-ntp=no