elicro / add-dhcp-static-leases-to-netwatch.rsc
0 curtidas
0 bifurcações
1 arquivos
Última atividade
| 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 | } |
Próximo
Anterior