最後更新: 2016-02-22
介紹
CLI:
/tool netwatch
Opts:
ping
- host (IP; Default: 0.0.0.0)
- interval (time; Default: 1m) # Time interval between pings.
- timeout (time; Default: 1s)
action(script)
- down-script (string; Default: )
- up-script (string; Default: )
# Add
/tool netwatch add host=192.168.88.150 interval=20s up-script=ipsec-up down-script=ipsec-down
# Checking
/tool netwatch print [detail]
# HOST TIMEOUT INTERVAL STATUS SINCE 0 192.168.88.150 1s 20s up feb/22/2016 07:14:32
Control Failover
假設有 WAN1 及 WAN2, 它們的 distance 分別是 1 及 2
Down:
/ip route set [find comment="WAN1"] distance=3;
Up:
/ip route set [find comment="WAN1"] distance=1;