Netwatch to disable a static route

Hi,

I need a script that will use netwatch to check the status of a gateway every 30 seconds, and disable a static route if the gateway is unreachable. Every 30 seconds it should check again, and re-enable the route if the gateway is reachable again. This is for connection failover from cable to DSL. I’ll be glad to pay for a script like this if it hasn’t been done before. Any help is appreciated!

Thanks!

It’s easy. Add scheduler tp run every 30 seconds and add script similar to this one

:if ([/ping xx.xx.xx.xx count=3] = 3) do={
     <enable gateway here>
} else={
     <disable gateway here>
}

Hi MRZ,
I need script for following event.

if received byte per second=1 Mbps of ether1, than the router shoud send mesage to customer.

I know the How to send sms but confused to write script.

/interface monitor-traffic ether1 once do={ 
       :if ($"received-bits-per-second" = 1000000) do={
               < send sms>
       }
}



f received byte per second=1 Mbps of ether1

So you need mega BITS or BYTES? If bytes then you will also have to convert received-bits-per-second to bytes nad then compare

if possible can anyone show me step by step with photos because its very difficult for me to achive that but i dont want ping gateway to control the link example ping http://www.google.com(74.125.39.104) Every 30 seconds it should check again , and re-enable the route if the second gateway if the http://www.google.com(74.125.39.104) isreachable again

Sir what if ISP has high ping and/or slow internet connection and not totally down. how to send also notification via sms sir?