Skip to content

NTP

Network Time Protocol (NTP) keeps RouterOS synchronized to an accurate time source. Correct system time is critical for log timestamps, certificate validation, scheduled tasks, and firewall time-based filters.

RouterOS v7 includes a full NTP implementation (client and server) in the System package — no additional package is required.

NTP uses UDP port 123.

/system ntp client
/system ntp client servers
/system ntp server

Configure the NTP client under /system ntp client:

PropertyDescription
enabledEnable or disable the NTP client (yes/no, default: no)
modeSync mode: unicast, broadcast, or manycast (default: unicast)
server-dns-namesComma-separated list of NTP server hostnames (unicast mode)
server-addressesComma-separated list of NTP server IP addresses (unicast mode)
vrfVRF instance for NTP traffic (default: main)

In broadcast and manycast modes, server-dns-names and server-addresses are ignored — the router discovers servers automatically.

Unicast is the standard mode for synchronizing with public NTP pools or known upstream servers. The router sends requests directly to the configured addresses.

Using DNS names (recommended for pool.ntp.org):

/system ntp client
set enabled=yes mode=unicast server-dns-names=0.pool.ntp.org,1.pool.ntp.org,2.pool.ntp.org

Using IP addresses:

/system ntp client
set enabled=yes mode=unicast server-addresses=216.239.35.0,216.239.35.4

Using MikroTik’s NTP pool:

/system ntp client
set enabled=yes mode=unicast server-dns-names=0.routeros.pool.ntp.org,1.routeros.pool.ntp.org

In broadcast mode, the client listens for NTP broadcast packets on the local network. No server address configuration is needed — the router accepts time from any broadcasting NTP server.

/system ntp client
set enabled=yes mode=broadcast

Use broadcast mode only on trusted networks, as there is no authentication of the broadcasting server.

Manycast is a hybrid: the client sends a discovery request and synchronizes with the first server that responds. Suitable for local networks with multiple NTP servers.

/system ntp client
set enabled=yes mode=manycast

Check whether the client has synchronized and review timing quality:

/system ntp client print

Read-only status fields returned:

FieldDescription
statusCurrent sync state (e.g., synchronized, reaching)
active-serverIP address of the server currently being used
stratumStratum level of the active server
offsetCurrent time offset from the server (milliseconds)
round-tripRound-trip delay to the active server (milliseconds)
jitterVariance in offset measurements (milliseconds)
last-adjustmentTime of the most recent clock adjustment

Confirm the system clock after sync:

/system clock print

For detailed per-server status, including reachability and error counters:

/system ntp client servers print detail

Force immediate DNS re-resolution for hostname-based servers (useful after a server’s IP changes):

/system ntp client servers resolve-dns-names

RouterOS can serve time to other devices on the network. The NTP server should itself be synchronized to an accurate upstream source before clients connect.

Configure the NTP server under /system ntp server:

PropertyDescription
enabledEnable or disable the NTP server (yes/no, default: no)
broadcastSend NTP broadcast packets on the local subnet (yes/no, default: no)
multicastJoin NTP multicast groups 224.0.1.1 / ff05::101 (yes/no, default: no)
manycastRespond to manycast discovery requests (yes/no, default: no)
use-local-clockServe time from the local clock even when unsynced (yes/no, default: no)
local-clock-stratumStratum advertised when serving from local clock (1–15, default: 10)
/system ntp server
set enabled=yes

This enables unicast server mode — clients can send requests directly to the router’s IP address on UDP/123.

Stratum indicates how many hops a clock is from a reference source:

  • Stratum 1 — directly connected to an atomic clock or GPS receiver
  • Stratum 2 — synchronized from a stratum 1 server
  • Stratum 15 — maximum valid stratum; higher means less reliable

When the router is synchronized via NTP client, it automatically advertises the correct stratum (upstream stratum + 1).

If the router is not synced but you still want it to serve time (e.g., for an isolated network), enable use-local-clock and set a high stratum value so clients know the time quality is low:

/system ntp server
set enabled=yes use-local-clock=yes local-clock-stratum=12

Use stratum 12 or higher for an unsynced local clock. This prevents clients from preferring a router that has no reliable time source over other options they may have.

For networks where you want all devices to receive time without being configured with the router’s IP, enable multicast mode:

/system ntp server
set enabled=yes multicast=yes

Multicast NTP uses the well-known groups 224.0.1.1 (IPv4) and ff05::101 (IPv6). Clients must also be configured in multicast mode to receive these packets.

To push NTP packets as layer-2 broadcast (useful for simpler devices that only support NTP broadcast client mode):

/system ntp server
set enabled=yes broadcast=yes

View server status and packet counters:

/system ntp server print detail
/system ntp server monitor

The monitor output includes last-bad-packet-from and last-bad-packet-reason fields to identify malformed or rejected client requests.

  1. Verify the client is enabled and servers are configured:

    /system ntp client print
    /system ntp client servers print
  2. Check UDP/123 connectivity — ensure no firewall rule blocks outbound UDP port 123 to the NTP server. Test basic reachability with a ping to the server IP.

  3. Check mode compatibility — for Internet servers, use unicast mode. Broadcast and manycast only work on local networks.

  4. Inspect the reachability register:

    /system ntp client servers print detail

    The server-reachability field is an octal shift register of the last 8 polls:

    • 377 — all 8 recent polls succeeded (fully reachable)
    • 0 — no recent polls succeeded (unreachable)
    • Values between indicate intermittent loss
  5. Check bad packet fields — if last-bad-packet-reason shows a value, the server is responding but sending malformed or invalid NTP packets. Try a different upstream server.

  6. Force DNS re-resolution — if using hostnames and the server’s IP recently changed:

    /system ntp client servers resolve-dns-names
  7. Enable system logging to capture NTP events:

    /system logging add topics=system,info action=memory
    /log print where topics~"system"
  8. Isolate the upstream source — replace the configured server with a known-good public NTP server (e.g., time.cloudflare.com or 0.pool.ntp.org) to rule out source quality issues.

  9. If serving time to clients, verify the router itself is synchronized first — clients inherit inaccurate time from an unsynced server.

SymptomLikely CauseResolution
Status stuck at reachingUDP/123 blocked or server unreachableCheck firewall; verify server IP/port
server-reachability = 0No responses from NTP serverCheck connectivity; try alternate server
High offset or jitterPoor upstream NTP quality or network latencyUse a geographically closer or more accurate server
Client not syncing after IP changeStale DNS cacheRun resolve-dns-names
Clients not syncing from local serverServer not enabled or mode mismatchEnable server; verify broadcast/multicast settings match client mode
Time correct but timezone wrongClock timezone not setSee Clock configuration

For applications requiring sub-microsecond accuracy — industrial automation, financial systems, telecom — RouterOS supports IEEE 1588-2008 Precision Time Protocol (PTP) with hardware timestamping on supported hardware.

PTP is configured under /system ptp.

FeatureNTPPTP
Typical accuracy1–10 ms (WAN), sub-ms (LAN)Sub-microsecond to nanosecond
Hardware requirementNoneRequires hardware timestamping support
Use caseGeneral network time syncIndustrial, telecom, financial
TransportUDP (unicast/multicast)UDP or Ethernet

Use PTP when:

  • Sub-millisecond synchronization accuracy is required
  • Deploying timing-sensitive equipment (e.g., LTE base stations, SCADA systems)
  • Participating in a SyncE or IEEE 1588 telecom profile network

For standard router and network device synchronization, NTP is sufficient.

PTP accuracy depends on hardware timestamping, which captures exact packet transmit/receive timestamps at the hardware level rather than in software. Check the MikroTik hardware specifications for your device to confirm PTP and hardware timestamping support.

A typical deployment: RouterOS syncs from public NTP pools and serves time to LAN devices.

# Sync from public NTP pool
/system ntp client
set enabled=yes mode=unicast \
server-dns-names=0.pool.ntp.org,1.pool.ntp.org,2.pool.ntp.org
# Serve time to local network
/system ntp server
set enabled=yes
# Set correct timezone (adjust to your region)
/system clock
set time-zone-name=Europe/London
# Verify sync
/system ntp client print
/system clock print
  • Clock — time zone and daylight saving time configuration
  • Scheduler — running scripts at scheduled times
  • Log — exporting logs to external systems