In MikroTik RouterOS, NetWatch is a useful tool that allows you to monitor the availability of hosts on the network by sending pings (ICMP echo requests) and executing scripts when the status of these hosts changes (that is, when a host becomes reachable or unreachable).
NetWatch is primarily designed to work with IP addresses and not directly with MAC addresses.
How NetWatch works:
NetWatch allows you to configure a list of IP addresses to monitor, and you can specify specific actions (such as scripts) that should be executed when the connection status to one of these addresses changes. Typical configurations include:
- Host IP: The IP address of the device to be monitored.
- Interval: The frequency with which NetWatch sends pings to the host.
- timeout: The time to wait for the ping response.
- Up Script: The script that runs when the host becomes reachable.
- DownScript: The script that runs when the host becomes unreachable.
Using MAC Addresses in NetWatch:
Since NetWatch uses the ICMP protocol to monitor the status of hosts, it requires IP addresses to send pings. MAC addresses, which are unique identifiers assigned to network interfaces for communication within the same local network (LAN), are not usable directly in NetWatch because they are not routable or accessible beyond the local network segment.
Alternatives to Monitor Devices by MAC:
If you need to monitor devices specifically by their MAC address, you could consider alternatives such as:
- ARP monitoring: Observe the ARP table in the MikroTik, which links IP addresses with MAC addresses. You could configure a script that periodically checks the ARP table to detect whether a MAC address is still present or not.
- DHCP Leases: Monitor DHCP leases to see if specific devices (identified by their MAC addresses) are active and receiving IP addresses.
Conclusion:
NetWatch is a powerful tool for monitoring the availability of devices and services on a network using IP addresses.
For monitoring based on MAC addresses, it would be necessary to implement alternative solutions that do not directly depend on the standard NetWatch functionality in MikroTik RouterOS.
There are no tags for this post.