Basic NTP Client Configuration
Basic NTP Client Configuration
Section titled “Basic NTP Client Configuration”TL;DR (Quick Start)
Section titled “TL;DR (Quick Start)”For the impatient: here’s the 30-second version.
# Enable NTP and add time servers/system ntp client set enabled=yes/system ntp client servers add address=time.cloudflare.com/system clock set time-zone-name=America/New_YorkOverview
Section titled “Overview”This guide demonstrates how to configure the NTP client on MikroTik RouterOS to synchronize the router’s clock with internet time servers.
Prerequisites
Section titled “Prerequisites”- A MikroTik router running RouterOS 7.x or later
- Internet connectivity
- Access to the router via SSH, WinBox, or WebFig
Configuration Steps
Section titled “Configuration Steps”Step 1: Configure NTP Client
Section titled “Step 1: Configure NTP Client”Enable the NTP client and configure time servers:
/system ntp client set enabled=yesStep 2: Add NTP Servers
Section titled “Step 2: Add NTP Servers”Add public NTP servers:
/system ntp client servers add address=time.cloudflare.comStep 3: Set Timezone
Section titled “Step 3: Set Timezone”Configure the system timezone:
/system clock set time-zone-name=America/New_YorkVerification
Section titled “Verification”Check 1: NTP Client Status
Section titled “Check 1: NTP Client Status”/system ntp client printExpected Output:
enabled: yes mode: unicastCheck 2: NTP Servers
Section titled “Check 2: NTP Servers”/system ntp client servers printExpected Output:
Flags: D - dynamic # ADDRESS MODE 0 time.cloudflare.com unicastCheck 3: Clock Status
Section titled “Check 3: Clock Status”/system clock printExpected Output:
time: 14:30:25 date: jan/17/2026 time-zone-autodetect: yes time-zone-name: America/New_York gmt-offset: -05:00 dst-active: noTroubleshooting
Section titled “Troubleshooting”Problem: Time not syncing
Section titled “Problem: Time not syncing”Symptoms: Clock shows wrong time, NTP status shows no synchronization.
Causes & Solutions:
-
DNS not working - NTP hostnames require DNS:
/ip dns print/ping time.cloudflare.com count=1Ensure DNS servers are configured and reachable.
-
Firewall blocking NTP - Allow UDP 123 outbound:
/ip firewall filter print where dst-port=123 -
No route to NTP server - Check routing:
/ip route check time.cloudflare.com
Problem: Large time offset after sync
Section titled “Problem: Large time offset after sync”Symptoms: Time jumps significantly after NTP sync.
Causes & Solutions:
-
CMOS battery dead - Router loses time on power loss. Replace battery if possible, or ensure NTP syncs quickly after boot.
-
Wrong timezone - Verify timezone setting:
/system clock print
Problem: NTP server unreachable
Section titled “Problem: NTP server unreachable”Symptoms: Cannot connect to configured NTP servers.
Causes & Solutions:
-
Server address wrong - Verify server configuration:
/system ntp client servers print -
Try different servers - Use multiple servers for redundancy:
/system ntp client servers add address=pool.ntp.org/system ntp client servers add address=time.google.com
Problem: Clock drifts between syncs
Section titled “Problem: Clock drifts between syncs”Symptoms: Time slowly becomes inaccurate between NTP updates.
Causes & Solutions:
-
Normal hardware drift - This is expected. Ensure NTP is enabled and syncing regularly.
-
Check sync frequency:
/system ntp client print
Related Topics
Section titled “Related Topics”Prerequisites
Section titled “Prerequisites”- DNS Server - DNS required for NTP pool names
- Firewall Basics - allow UDP 123 outbound
Related System Topics
Section titled “Related System Topics”- NTP Server - run your own NTP server
- Clock - manual time configuration
- Scheduler - time-based task scheduling
Services Requiring Accurate Time
Section titled “Services Requiring Accurate Time”- Certificates - certificate validity depends on time
- Logging - accurate log timestamps