NTP服务器架构

我有一个运行几个Linux的虚拟环境,我正在计划如何pipe理所有的ntp体系结构。
据我所知,在'ntp.conf'文件中没有使用两台服务器,客户端应该只有一个或多个ntp服务器,所以,我的第一种方法是有一个服务器'server1'指向4个公共服务器,特别是RHEL,然后有另外一个服务器'server2'指向server1,在我的其他所有指向server2的Linux服务器下面,但是我观察到这个架构有一个奇怪的行为。 我已经看到一些服务器在服务器2和它们之间去相互隔离,甚至有时服务器1和服务器2也没有完全同步。
我的第一个问题是,为什么会这样呢?
然后我想出了另一种架构,它具有指向公共ntp服务器的相同server1,然后有三个服务器,'server2','server3'和'server4'指向server1,在我所有指向服务器2-4的其他机器下方。
这个架构是否有可能改善我所有networking中的同步?
还是会有同样的性能同步?
build筑这个最好的方法是什么?

编辑

这里是server1的ntpq -p的输出:

 remote refid st t when poll reach delay offset jitter ========================================================================= *Time100.Stupi. .PPS. 1 u 317 1024 377 182.786 5.327 3.022 LOCAL(0) .LOCL. 10 l 46h 64 0 0.000 0.000 0.000 

在这里它的ntp.conf

 # For more information about this file, see the man pages # ntp.conf(5), ntp_acc(5), ntp_auth(5), ntp_clock(5), ntp_misc(5), ntp_mon(5). driftfile /var/lib/ntp/drift # Permit time synchronization with our time source, but do not # permit the source to query or modify the service on this system. restrict default kod nomodify notrap nopeer noquery restrict -6 default kod nomodify notrap nopeer noquery # Permit all access over the loopback interface. This could # be tightened as well, but to do so would effect some of # the administrative functions. restrict 127.0.0.1 restrict -6 ::1 # Hosts on local network are less restricted. #restrict 192.168.1.0 mask 255.255.255.0 nomodify notrap # Use public servers from the pool.ntp.org project. # Please consider joining the pool (http://www.pool.ntp.org/join.html). server 0.rhel.pool.ntp.org iburst server 1.rhel.pool.ntp.org iburst server 2.rhel.pool.ntp.org iburst server 3.rhel.pool.ntp.org iburst #broadcast 192.168.1.255 autokey # broadcast server #broadcastclient # broadcast client #broadcast 224.0.1.1 autokey # multicast server #multicastclient 224.0.1.1 # multicast client #manycastserver 239.255.254.254 # manycast server #manycastclient 239.255.254.254 autokey # manycast client # Enable public key cryptography. #crypto includefile /etc/ntp/crypto/pw # Key file containing the keys and key identifiers used when operating # with symmetric key cryptography. keys /etc/ntp/keys # Specify the key identifiers which are trusted. #trustedkey 4 8 42 # Specify the key identifier to use with the ntpdc utility. #requestkey 8 # Specify the key identifier to use with the ntpq utility. #controlkey 8 # Enable writing of statistics records. statistics clockstats cryptostats loopstats peerstats sysstats rawstats ### Added by IPA Installer ### server 127.127.1.0 fudge 127.127.1.0 stratum 10 

这是三个客户的输出:

  remote refid st t when poll reach delay offset jitter ============================================================================== *server1 172.16.29.21 3 u 1 64 1 1.090 -0.138 0.036 remote refid st t when poll reach delay offset jitter ============================================================================== *server1 172.16.29.21 3 u 1035 1024 377 1.117 -1.943 0.530 remote refid st t when poll reach delay offset jitter ============================================================================== *server1 172.16.29.21 3 u 32 64 1 0.902 1.788 0.140 

取决于您的环境中的关键时间保留情况,您可能不希望server1成为单一故障点。 如果您长时间不得不离线进行维护或修理,其同行将停止同步。 从那里开始下坡了。

为什么不把server1,server2,server3,server4全部同步到4或5个Internet对等体。 那么,你的内部networking可以参考这些系统?

传统观点认为,3是法定人数所需要的,但是您必须能够容忍至less一个被判定为虚假者或下线的人。

请参见; 5.3.3。 上游时间服务器数量

另外,你提到你现在的configuration有些奇怪和问题。 这将有助于查看相关主机的ntpq -p的输出。

虽然2台服务器没有用,但是“ 最佳实践”RFC草案build议最低为4。 NTP的相交algorithm不仅仅取决于服务器数量的法定数量 ,还取决于他们返回的时间质量 – 而且你无法预测这一点。 所以越多越好。 有多达10个上游NTP服务器没有问题 。

正如Aaron提到的,你提出的服务器1-4应该都指向上游的NTP服务器,而你的内部系统应该指向它们中的全部4个。 服务器1-4也可以彼此对等(以对称模式),但这不是严格要求的。

理解为什么你不应该在体系结构中的任何一点通过一台服务器来pipe理NTP:NTP需要多个服务器来保证准确性 ,而不仅仅是冗余(请参阅NTP文档中的algorithm描述 ,这就是为什么)。 (无耻的插件:我已经写了更多关于这个地方 ,包括对build筑的build议 。)