執行 ntpdate -d serverIP 時出現 no server suitable for synchronization found,常見兩類原因:
Server dropped: strata too high
stratum 16
正常 stratum 範圍 0~15,16 表示未同步。
NTP 伺服器尚未與上層時源或本地時鐘完成同步。
/etc/ntp.conf 加入本地參考時鐘配置:
server 127.127.1.0
fudge 127.127.1.0 stratum 8
service ntpd restartwatch ntpq -p 監控:
reach 值從 0 遞增至 17(約 320 秒)表示同步完成
transmit(192.168.30.22) ... Server dropped: no data
notrustnotrust 在 4.2+ 版本意義變更為「忽略未加密認證的封包」。restrict 行中的 notrust 參數。
service iptables stop 後嘗試同步。若成功,需在防火牆開放 UDP 123。
ntpq -c version # 查看 NTP 版本
ntpdate -d serverIP # 除錯模式查看詳細錯誤
watch ntpq -p # 即時監控同步狀態