大网数据广告活动
服务器运维问答

NTP peer's upstream source has same IP causing sync loop

· 52CE 我爱测

I have an NTP server configured to use another NTP server (10.128.0.10) as its time source. Due to some network address translation, my NTP server (192.0.2.1) has the same IP address as the peer's upstream NTP server (192.0.2.1).…

问题原文

原帖链接 · Sgt B · CC BY-SA 3.0

I have an NTP server configured to use another NTP server (10.128.0.10) as its time source. Due to some network address translation, my NTP server (192.0.2.1) has the same IP address as the peer's upstream NTP server (192.0.2.1).

$ ntpq -4 -p
     remote           refid      st t when poll reach   delay   offset  jitter
==============================================================================
 10.128.0.10   192.0.2.1        3 u   18   64    7    0.710   -3.887   0.926

My NTP server discards the peer due to a potential synchronization loop. Is there a means by which to disable this check? Here is my ntp.conf

server remote.peer.com

driftfile   /var/lib/ntp/ntp.drift

interface ignore wildcard
interface listen 192.0.2.1

restrict 192.0.2.0 mask 255.255.255.0 nomodify nopeer notrap

Network looks like this where the NAT is performed by a perimeter device.

192.0.2.0/24 ---> 192.0.2.1 ---NAT to 10.128.0.50/24---> 10.128.0.10/24 ---> 192.0.2.1

I cannot change IP addresses anywhere. Any help or insight would be appreciated. Thanks!

已采纳解答

原帖链接 · John Mahowald · CC BY-SA 3.0

You can confirm the error was peer synchronization loop by dumping the peer variables with ntpdc -c "showpeer 10.128.0.10" substituting the IP or host name of the peer. "flash 0x0800" indicates this error, from ntp.h.

I'm not aware of any means to disable this loop check. If the IP addresses cannot be changed you will need to find other NTP sources.

You will want to add at least 3 more reference clocks to your NTP server. This problem one doesn't count because of the loop. The NTP Pool project has many over the Internet. If you have rack space and can run an antenna outdoors, a GPS or other radio appliance will work even during an Internet outage.

摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。

资料来源与适用范围

资料来源
Server Fault
适用范围
以原帖系统、软件版本与发布日期为准(2018-01-05)
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY-SA 3.0

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。