I am using the below method for WAN failover.
I am putting host check IP(208.67.222.222) in route table to check it through ISP1 gateway only but when ISP1 is down that time also the host check IP(208.67.222.222) is able to ping from ISP2 gateway. Because of this, the netwatch script is not working properly.
Please help me to resolve this issue.
/ip route
add dst-address=208.67.222.222/32 gateway=gateway1ip
Code: Select all
/ip route
add gateway=gateway1ip distance=1 comment=WAN1
add gateway=gateway2ip distance=2 comment=WAN2
/tool netwatch
add down-script="/ip route set [find where comment=\"WAN1\"] distance=3;\r\
\n:log warning \"WAN1 down, switching to WAN2\"" host=208.67.222.222 up-script="/ip\
\_route set [find where comment=\"WAN1\"] distance=1;\r\
\n:log warning \"WAN1 restored\""
/ip route
add dst-address=208.67.222.222/32 gateway=gateway1ip