elicro 已修改 . 還原成這個修訂版本
1 file changed, 8 insertions
add-dhcp-static-leases-to-netwatch.rsc(檔案已創建)
| @@ -0,0 +1,8 @@ | |||
| 1 | + | { | |
| 2 | + | :local dhcpServer "ip_pool_192.168.0..x" | |
| 3 | + | :foreach i in=[/ip/dhcp-server/lease/find where server=$dhcpServer and !dynamic] do={ | |
| 4 | + | :local lease [/ip/dhcp-server/lease/get number=$i]; | |
| 5 | + | :local ipAddress ("$lease"->"address"); | |
| 6 | + | /tool/netwatch/add host=$ipAddress type=icmp interval=10s timeout=3s | |
| 7 | + | } | |
| 8 | + | } | |
上一頁
下一頁