有没有人有任何同步Linux(特别是红帽)到Windows NTP服务器的经验? 目前,我们的Windows服务器正在同步到互联网上的第一层服务器,但Linux机器拒绝承认它是一个很好的时间源。
经过一些研究,似乎我们的问题是Root Dispersion值可能太高。 这是ntpq的输出 –
ntpq> peers remote refid st t when poll reach delay offset jitter ============================================================================== ntp1.ourdomain 10.10.10.1 4 u 20 128 377 0.376 1397.10 22.800 ntpq> ass ind assID status conf reach auth condition last_event cnt =========================================================== 1 30939 90b4 yes yes none reject reachable 11 ntpq> rv 30939 assID=30939 status=90b4 reach, conf, 11 events, event_reach, srcadr=ntp1.ourdomain.com, srcport=123, dstadr=10.10.10.2, dstport=123, leap=00, stratum=4, precision=-6, rootdelay=93.750, rootdispersion=2333.466, refid=10.10.10.1, reach=377, unreach=0, hmode=3, pmode=4, hpoll=7, ppoll=7, flash=400 peer_dist, keyid=0, ttl=0, offset=1369.793, delay=0.000, dispersion=21.915, jitter=15.387, reftime=d7493cd7.fd3528d6 Mon, Jun 16 2014 10:52:23.989, org=d74944eb.b857f9bc Mon, Jun 16 2014 11:26:51.720, rec=d74944ea.5709a581 Mon, Jun 16 2014 11:26:50.339, xmt=d74944ea.56ea01a7 Mon, Jun 16 2014 11:26:50.339, filtdelay= 0.48 0.51 0.00 0.43 0.50 0.44 0.40 0.55, filtoffset= 1380.34 1376.38 1369.79 1362.68 1360.75 1353.16 1349.80 1343.46, filtdisp= 15.63 17.58 19.48 21.42 23.37 25.30 27.25 29.20
我试图理解的是,为什么这个值如此之高,以及有什么我们可以在Windows服务器上configuration来改变它。
更新
这里是我们的Windows NTP服务器的一些信息 –
c:\Windows\System32>w32tm /query /status Leap Indicator: 0(no warning) Stratum: 2 (secondary reference - syncd by (S)NTP) Precision: -6 (15.625ms per tick) Root Delay: 0.0312500s Root Dispersion: 1.2097655s ReferenceId: 0x9E2BC042 (source IP: 158.43.192.66) Last Successful Sync Time: 18/06/2014 04:41:16 Source: ntp2.pipex.net Poll Interval: 15 (32768s) c:\Windows\System32>w32tm /query /peers #Peers: 2 Peer: ntp1.pipex.net State: Active Time Remaining: 6264.1144284s Mode: 1 (Symmetric Active) Stratum: 2 (secondary reference - syncd by (S)NTP) PeerPoll Interval: 15 (32768s) HostPoll Interval: 15 (32768s) Peer: ntp2.pipex.net State: Active Time Remaining: 6264.1144284s Mode: 1 (Symmetric Active) Stratum: 1 (primary reference - syncd by radio clock) PeerPoll Interval: 15 (32768s) HostPoll Interval: 15 (32768s)
ntpd会拒绝时钟,如果它由于大的偏移量而导致远程时钟出现问题。 你的Linux机器很可能会拒绝Windows TS,因为偏移量高于恐慌阈值。 假设Windows时间服务器正常工作,您应该考虑添加-g标志到ntpd调用:
-g Normally, ntpd exits with a message to the system log if the offset exceeds the panic threshold, which is 1000 s by default. This option allows the time to be set to any value without restriction; however, this can happen only once. If the threshold is exceeded after that, ntpd will exit with a message to the system log. This option can be used with the -q and -x options.
或者将panic值设置得高得多或者为零:
panic panic Specifies the panic threshold in seconds with default 1000 s. If set to zero, the panic sanity check is disabled and a clock offset of any value will be accepted.
仅供参考:如果您的Windows时间安装工作正常,并且/或者按照您所描述的方式configuration,则不完全清楚。 您提到Windows服务器正在同步到Internet上的第1层机器。 然而,你的同行广告牌说,ntp1.ourdomain是在第四层:
Stratum Machine description 1 ntp ref clock on internet 2 ????????? 3 ????????? 4 ntp1.ourdomain 5 linux boxes
对于具有如此低的延迟的机器,抖动值也是非常高的,我假定这是指示在同一本地networking上的机器。