UDel ntpd – 完全禁用时间服务器发现

我将UDel ntpd(版本4.2.6.p5)作为客户端configuration到由我的组织运营的三台服务器,并且(我认为)没有其他人。

server xx.yy.zz.1 iburst server xx.yy.zz.2 iburst server xx.yy.zz.3 iburst restrict default ignore restrict xx.yy.zz.1 nomodify notrap nopeer noquery restrict xx.yy.zz.2 nomodify notrap nopeer noquery restrict xx.yy.zz.3 nomodify notrap nopeer noquery 

大约五分钟的正常运行时间之后,ntpq报告守护进程已经发现并添加了两个更多的时间服务器(也是由我的组织运行的,但是没有在他们的时间服务器正式列表中):

 ntpq> pe remote refid st t when poll reach delay offset jitter ============================================================================== *xx.yy.zz.1 aa.bb.cc.dd 2 u 16 64 1 0.157 -2.230 0.032 xx.yy.zz.2 aa.bb.cc.dd 2 u 15 64 1 0.207 -2.191 0.032 xx.yy.zz.3 aa.bb.cc.dd 2 u 14 64 1 0.211 -2.171 0.014 xx.yy.zz.4 .INIT. 16 u - 64 0 0.000 0.000 0.000 xx.yy.zz.5 .INIT. 16 u - 64 0 0.000 0.000 0.000 

由于这些服务器不在地址白名单(因为我不知道他们),客户端尝试与他们沟通显然失败了。

我不知道这到底是怎么发生的,但是我从文档中得到了一个让服务器A告诉客户端的方法:“嘿,你应该和服务器B,C和D交谈。 我发现的文档有很多关于各种方法的说法,但对于如何控制它却一无所知。

因此,问题是: 如何彻底closures此function,以便客户端只尝试与configuration文件中明确列出的服务器进行通信,而不pipe它是什么?


每个请求:

 # ntpq -pncrv | redact remote refid st t when poll reach delay offset jitter ============================================================================== +xx.yy.zz.1 aa.bb.cc.dd 2 u 56 1024 377 0.177 -0.010 0.070 *xx.yy.zz.2 aa.bb.cc.dd 2 u 690 1024 377 0.237 0.028 0.046 +xx.yy.zz.3 aa.bb.cc.dd 2 u 226 1024 377 0.229 0.013 0.052 xx.yy.zz.4 .INIT. 16 u - 1024 0 0.000 0.000 0.000 xx.yy.zz.5 .INIT. 16 u - 1024 0 0.000 0.000 0.000 associd=0 status=061b leap_none, sync_ntp, 1 event, leap_event, version="ntpd [email protected] Fri Apr 10 19:04:04 UTC 2015 (1)", processor="x86_64", system="Linux/3.16.0-4-amd64", leap=00, stratum=3, precision=-22, rootdelay=0.405, rootdisp=38.394, refid=128.2.1.21, reftime=d951542d.a6db3cdc Wed, Jul 15 2015 17:50:37.651, clock=d95156df.0d2756da Wed, Jul 15 2015 18:02:07.051, peer=9102, tc=10, mintc=3, offset=0.009, frequency=-5.266, sys_jitter=0.024, clk_jitter=0.030, clk_wander=0.003 # redact < /etc/ntp.conf driftfile /var/lib/ntp/ntp.drift statsdir /var/log/ntpstats/ statistics loopstats peerstats clockstats filegen loopstats file loopstats type day enable filegen peerstats file peerstats type day enable filegen clockstats file clockstats type day enable server aa.bb.cc.1 iburst server aa.bb.cc.2 iburst server aa.bb.cc.3 iburst restrict -4 default ignore restrict -6 default ignore restrict aa.bb.cc.1 nomodify notrap nopeer noquery restrict aa.bb.cc.2 nomodify notrap nopeer noquery restrict aa.bb.cc.3 nomodify notrap nopeer noquery restrict 127.0.0.1 restrict ::1 

我没有看到任何有关从DHCP获取更多服务器的信息。

我猜测你的组织是什么,你使用的是DHCP。

是的,你的组织突出地发布了一组3台服务器 。据说你的组织还指示DHCP客户端使用另外6台服务器 。

我不知道为什么这是一个问题,您的机器正在使用dhcp公布的服务器,但你可以closures这个function,如果你想。 如果您使用的是Debian,则需要编辑/etc/dhcp/dhclient.conf并从请求语句中删除ntp-servers选项:

 request subnet-mask, broadcast-address, time-offset, routers, domain-name, domain-name-servers, domain-search, host-name, dhcp6.name-servers, dhcp6.domain-search, netbios-name-servers, netbios-scope, interface-mtu, - rfc3442-classless-static-routes; + rfc3442-classless-static-routes, ntp-servers; 

如果您不使用Debian,则需要查阅您的发行说明文档。