Netwatch Enhancement

Hi,

Im trying to make a failover script. But the problem of using netwatch, host would still be available on the other interface. Can we make a netwatch that would only test connectivity on a specific interface.
Netwatch is useless for failover scripts. Its also useless if I use the check-gateway using routes because gateway or remote peer is active, except that the gateway doesn’t have internet connectivity anymore.

sample:
/tool netwatch add host=8.8.8.8 timeout=60s interval=5s interface=ether1 up-script=e-up down-script=e-down

Hope somebody can solve this one.

Netwatch is a tool for simple scenarios.

To make sure that the ICMP requests towards a particular test address will never be sent out via the “wrong” interface, you can use mangle rules assigning routing marks etc.; if you don’t need that ping to 8.8.8.8 would only go via a particular interface but DNS requests to 8.8.8.8 could use any outgoing interface, you even don’t have to use routing marks and can simply use a dedicated route to 8.8.8.8 which always beats the default one regardless the distance value.