Complete Guide for Windows & Linux Time Synchronization
Version 1.0 | January 2026
Architecture, best practices and production operations
The Network Time Protocol (NTP) is a networking protocol designed to synchronize clocks across computer systems. Accurate time synchronization is critical for:
| Stratum | Description | Typical Accuracy |
|---|---|---|
| 0 | Reference clocks (GPS, atomic clocks) | < 1 microsecond |
| 1 | Primary servers directly connected to Stratum 0 | < 10 microseconds |
| 2 | Secondary servers synced to Stratum 1 | < 100 microseconds |
| 3-15 | Downstream servers (each adds ~1ms latency) | 1-100 milliseconds |
pool-ntp.rdem-systems.com.
w32tm /query /status
w32tm /query /configuration
w32tm /config /manualpeerlist:"0.pool.ntp.org 1.pool.ntp.org 2.pool.ntp.org 3.pool.ntp.org" /syncfromflags:manual /reliable:yes /update
w32tm /resync /force
net stop w32time && net start w32time
w32tm /config /manualpeerlist:"0.europe.pool.ntp.org 1.europe.pool.ntp.org 2.europe.pool.ntp.org pool-ntp.rdem-systems.com" /syncfromflags:manual /reliable:yes /update
w32tm /config /manualpeerlist:"pa3.pool-ntp.rdem-systems.com pa4.pool-ntp.rdem-systems.com pa5.pool-ntp.rdem-systems.com" /syncfromflags:manual /reliable:yes /update; net stop w32time; net start w32time; w32tm /resync /force
For Active Directory environments, the PDC Emulator should sync to external NTP:
# On PDC Emulator (run as Administrator) w32tm /config /manualpeerlist:"0.pool.ntp.org 1.pool.ntp.org" /syncfromflags:manual /reliable:yes /update # On other Domain Controllers (automatic from PDC) w32tm /config /syncfromflags:domhier /update
| Issue | Command |
|---|---|
| Service not running | net start w32time |
| Register service | w32tm /register |
| Show peers | w32tm /query /peers |
| Debug mode | w32tm /debug /enable /file:C:\w32time.log /size:10000000 /entries:0-300 |
Chrony is the preferred NTP client for modern Linux systems. It handles intermittent connectivity and virtual machines better than ntpd.
# Debian/Ubuntu sudo apt install chrony # RHEL/CentOS/Rocky/Alma sudo dnf install chrony
# Primary NTP Servers server 0.pool.ntp.org iburst server 1.pool.ntp.org iburst server 2.pool.ntp.org iburst server 3.pool.ntp.org iburst # Optional: RDEM Systems Stratum 2 server pool-ntp.rdem-systems.com iburst # Record rate at which system clock gains/drifts driftfile /var/lib/chrony/drift # Allow NTP client access from local network #allow 192.168.0.0/16 # Serve time even if not synchronized #local stratum 10 # Specify directory for log files logdir /var/log/chrony # Step clock if offset > 1 second (first 3 updates only) makestep 1.0 3
# Check synchronization status chronyc tracking # List NTP sources chronyc sources -v # Show source statistics chronyc sourcestats # Force sync sudo chronyc makestep # Check if chrony is synchronized chronyc waitsync 1 0.01
For simple setups, systemd-timesyncd is lightweight and sufficient:
[Time] NTP=0.pool.ntp.org 1.pool.ntp.org 2.pool.ntp.org FallbackNTP=pool-ntp.rdem-systems.com
sudo systemctl enable systemd-timesyncd sudo systemctl start systemd-timesyncd timedatectl timesync-status
For systems requiring ntpd:
# NTP Servers server 0.pool.ntp.org iburst prefer server 1.pool.ntp.org iburst server 2.pool.ntp.org iburst server 3.pool.ntp.org iburst # Drift file driftfile /var/lib/ntp/drift # Restrict default restrict default kod nomodify notrap nopeer noquery restrict 127.0.0.1 restrict ::1
# Check peers ntpq -p # Check sync status ntpstat # Force sync (if offset > 1000s) sudo ntpd -gq
#!/bin/bash
# ntp-check.sh - Quick NTP status check
echo "=== System Time ==="
date
timedatectl
echo -e "\n=== Chrony Status ==="
if command -v chronyc &> /dev/null; then
chronyc tracking
chronyc sources
else
echo "Chrony not installed"
fi
echo -e "\n=== systemd-timesyncd Status ==="
if systemctl is-active systemd-timesyncd &> /dev/null 2>&1; then
timedatectl timesync-status
else
echo "systemd-timesyncd not active"
fi
# Test NTP server response ntpdate -q pool.ntp.org # Or with Chrony chronyd -Q "server pool.ntp.org iburst" # Or with sntp sntp -d pool.ntp.org
| Metric | Good | Acceptable | Needs Attention |
|---|---|---|---|
| Offset | < 10ms | < 100ms | > 100ms |
| Stratum | 2-3 | 4-5 | > 5 |
| Reach | 377 (all 8) | > 177 | < 77 |
| Jitter | < 10ms | < 50ms | > 50ms |
# Allow NTP client (outbound only) iptables -A OUTPUT -p udp --dport 123 -j ACCEPT iptables -A INPUT -p udp --sport 123 -m state --state ESTABLISHED -j ACCEPT # Block NTP server queries (if not serving time) iptables -A INPUT -p udp --dport 123 -j DROP
# /etc/chrony/chrony.conf # Disable cmdmon from network cmdport 0 # Or restrict to localhost bindcmdaddress 127.0.0.1 bindcmdaddress ::1
Always configure at least 4 NTP servers to detect and exclude false tickers (Byzantine fault tolerance requires 3f+1 servers to tolerate f faulty servers).
ntpdate -d pool.ntp.org# Chrony: Step the clock immediately sudo chronyc makestep # ntpd: Allow large offset correction sudo ntpd -gq
# Disable VMware Tools time sync vmware-toolbox-cmd timesync disable # Disable Hyper-V time sync (PowerShell) Disable-VMIntegrationService -Name "Time Synchronization" -VMName "YourVM" # Then configure NTP as normal
| Task | Windows | Linux (Chrony) |
|---|---|---|
| Check status | w32tm /query /status |
chronyc tracking |
| List sources | w32tm /query /peers |
chronyc sources |
| Force sync | w32tm /resync /force |
chronyc makestep |
| Restart service | net stop/start w32time |
systemctl restart chronyd |
pool.ntp.org - Global NTP Pooleurope.pool.ntp.org - European serverstime.cloudflare.com - Cloudflare (anycast)time.google.com - Google Public NTPpool-ntp.rdem-systems.com - Stratum 2 pool (round-robin)pa3.pool-ntp.rdem-systems.com, pa4.pool-ntp.rdem-systems.com, pa5.pool-ntp.rdem-systems.comDownload our white papers for a complete NTP reference: