MikroTik router guide

MikroTik Ping Watchdog Guide (RouterOS Ping Reboot)

How the MikroTik RouterOS ping watchdog works, the exact commands to set it up on an LTE router, and how to avoid locking yourself into a reboot loop.

ModelRouterOS 7 CategoryLTE Network4G LevelAdvanced

MikroTik has had ping reboot for a very long time. RouterOS 2.9 documentation from around 2006 already describes it. It is called the ping watchdog, it lives in the system watchdog settings, and it is blunter than the Teltonika or ProRoute versions: it watches one address and its only action is a reboot. That makes the target and the timing even more important.

MikroTik ping watchdog at a glance

Where/system watchdog
TargetOne address, watch-address
CheckSix pings spread across ping-timeout, reboots only if all six fail
Start delayping-start-after-boot, 5 minutes by default
ActionReboot only
Biggest trapAn unreachable address reboots the router about every 6 minutes with default timings

How it behaves

Once you set a watch address, RouterOS sends six pings to it, spread evenly across the ping-timeout period, which is one minute by default. If all six fail, it reboots. After a boot it waits for ping-start-after-boot, five minutes by default, before it starts again. The log records it as System rebooted because of ping watchdog timeout.

MikroTik’s own documentation is honest about the risk: if the address stays unreachable, the router reboots after every start delay plus timeout, roughly every six minutes with the defaults. That is the ping reboot cycle of death in its purest form.

Setting it up on an LTE router

Test the target from the router first:

/ping 8.8.8.8 count=5

Then set the watchdog. On a cellular link I lengthen both timings, so a short outage or a slow LTE attach does not trigger a reboot:

/system watchdog set watch-address=8.8.8.8 ping-start-after-boot=5m ping-timeout=15m

With ping-timeout at 15 minutes, the six pings go out every two and a half minutes, and the router only reboots if the target has been silent for the whole 15 minutes. Check it with:

/system watchdog print

And turn it off again with:

/system watchdog set watch-address=none

Choosing the address

Because there is only one address, choose it carefully. On an internet connection a large anycast resolver is reasonable. On a private APN or a VPN-dependent site, use an address inside that network, such as the APN gateway or the VPN head end. Make sure ping-start-after-boot is longer than the LTE link takes to come up, otherwise the router reboots before it has had a chance to connect.

Keep another way in before you enable it. If the address is wrong, every boot window is your only chance to log in and set watch-address=none. Console access, or MAC Telnet from a neighbouring router, saves a site visit.

What it cannot do

It cannot restart just the LTE interface, it cannot try a second address, and it cannot send an alert instead of rebooting. For anything more nuanced, RouterOS has Netwatch, which can run a script when a host goes down, but that is a scripting job rather than a setting. The settings builder produces the watchdog command for your timings.

Questions

Where is ping reboot on MikroTik?

It is the ping watchdog under /system watchdog. Set watch-address to the host you want to monitor.

How does the MikroTik ping watchdog decide to reboot?

It sends six pings spread across ping-timeout, one minute by default, and reboots only if all six fail.

Why does my MikroTik reboot every six minutes?

The watch address cannot be reached. With default timings the router reboots after every 5-minute start delay plus 1-minute timeout. Set watch-address=none during a boot window and choose a reachable target.