UDel ntpd - 完全停用時間伺服器發現

UDel ntpd - 完全停用時間伺服器發現

我將 UDel ntpd(版本 4.2.6.p5)配置為我的組織運營的三台伺服器的客戶端,(我認為)沒有其他伺服器。

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 通訊。”我發現的文檔有很多關於各種方法的冗長廢話,但絕對沒有關於如何控制它的內容。

因此,問題是:如何完全關閉此功能,以便客戶端僅嘗試與設定檔中明確列出的伺服器通信,無論如何?


根據要求:

# 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 獲取其他伺服器的內容。

答案1

我猜測您的組織是什麼並且您正在使用 dhcp。

是的,您的組織顯著地發布了一組 3 台伺服器話雖如此,您的組織也指示 dhcp 用戶端使用其他六台伺服器

我不確定為什麼您的電腦使用 dhcp 中公佈的伺服器會出現問題,但如果您願意,您可以關閉此功能。如果您使用 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,則需要查閱發行版文件。

相關內容