Adjust NTP to believe less reliable sources----flash=400

Environment

  • Red Hat Enterprise Linux 5
  • Red Hat Enterprise Linux 6
  • Red Hat Enterprise Linux 7

Issue

  • NTP rejects a server with the following flash code:
Raw
flash=400 peer_dist
  • There are no other available NTP servers that offer more reliable time.

Resolution

  • Adding the line tos maxdist [NUM] to the ntp configuration file ( /etc/ntp.conf by default) before any lines starting with 'restrict' or 'server' tunes the threshold for which ntp rejects servers or not.

Root Cause

  • The default value for maxdist is 1.5 seconds.
  • The threshold is determined by a few factors broadcast by the ntp servers themselves. From the official ntp debugging page:
Raw
The synchronization distance, defined as one-half the delay plus the dispersion, represents the maximum error statistic. The jitter represents the expected error statistic. The maximum error and expected error calculated from 
the peer variables represents the quality metric for the server. The maximum error and expected error calculated from the system variables represents the quality metric for the client. If the root synchronization distance for 
any server exceeds 1.5 s, called the select threshold, the server is considered invalid.
  • By increasing the size of this value, it tells ntp to trust time servers that would generally be discarded as unreliable. This will allow ntp to sync against these servers. From the man page ntp_misc:
Raw
maxdist maxdistance
   Specify the synchronization distance threshold used by the clock selec‐
   tion algorithm. The default is 1.5 s. This determines both the  minimum
   number  of  packets  to  set the system clock and the maximum roundtrip
   delay. It can be decreased to improve reliability or increased to syn‐
   chronize clocks on the Moon or planets.

NOTE: It is important to identify that by doing this you are changing the accuracy of ntp. This will allow the time to be synced against a time source that by default ntp recognizes as unreliable. In doing this, the time will sync consistently against this source meaning it will be consistent, but not necessarily accurate.

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值