:local target 8.8.8.8
:if ([/ping $target count=5] = 0) do={
/ip route set [find comment=”ISP1″] disabled=yes
/ip route set [find comment=”ISP2″] disabled=no
:log warning “ISP1 DOWN! Switch ke ISP2”
} else={
/ip route set [find comment=”ISP1″] disabled=no
/ip route set [find comment=”ISP2″] disabled=yes
}
Scheduler (tiap 1 menit):
pgsql
Salin kode
/system scheduler add name=check-internet interval=1m on-event=check-internet
Leave a Reply