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