首页 > 其他 > 详细

NTP服务器的部署

时间:2019-04-10 23:32:44      阅读:227      评论:0      收藏:0      [点我收藏+]

安装方式:

yum install ntp -y

 

文件位置: /etc/ntp.conf

 

restrict  ntp服务的防火墙

server  ntp服务需要同步时间的上层ntp服务器

 

错误排查:

[root@localhost ~]# ntpdate -d 192.168.100.100
10 Apr 23:03:12 ntpdate[1155]: ntpdate 4.2.6p5@1.2349-o Fri Apr 13 12:52:28 UTC 2018 (1)
Looking for host 192.168.100.100 and service ntp
host found : 192.168.100.100
transmit(192.168.100.100)
transmit(192.168.100.100)
transmit(192.168.100.100)
transmit(192.168.100.100)
transmit(192.168.100.100)
192.168.100.100: Server dropped: no data
server 192.168.100.100, port 123
stratum 0, precision 0, leap 00, trust 000
refid [192.168.100.100], delay 0.00000, dispersion 64.00000
transmitted 4, in filter 4
reference time:    00000000.00000000  Mon, Jan  1 1900  8:05:43.000
originate timestamp: 00000000.00000000  Mon, Jan  1 1900  8:05:43.000
transmit timestamp:  e0588436.d5e0ea36  Wed, Apr 10 2019 23:03:18.835
filter delay:  0.00000  0.00000  0.00000  0.00000 
         0.00000  0.00000  0.00000  0.00000 
filter offset: 0.000000 0.000000 0.000000 0.000000
         0.000000 0.000000 0.000000 0.000000
delay 0.00000, dispersion 64.00000
offset 0.000000

10 Apr 23:03:20 ntpdate[1155]: no server suitable for synchronization found

  出现no date,说明是防火墙或者firewall或者restrict 做了限制

 

[root@localhost ~]# ntpdate -d 192.168.100.100
11 Apr 06:46:45 ntpdate[1217]: ntpdate 4.2.6p5@1.2349-o Fri Apr 13 12:52:28 UTC 2018 (1)
Looking for host 192.168.100.100 and service ntp
host found : 192.168.100.100
transmit(192.168.100.100)
receive(192.168.100.100)
transmit(192.168.100.100)
receive(192.168.100.100)
transmit(192.168.100.100)
receive(192.168.100.100)
transmit(192.168.100.100)
receive(192.168.100.100)
192.168.100.100: Server dropped: strata too high
server 192.168.100.100, port 123
stratum 16, precision -24, leap 11, trust 000
refid [192.168.100.100], delay 0.02606, dispersion 0.00003
transmitted 4, in filter 4
reference time:    00000000.00000000  Mon, Jan  1 1900  8:05:43.000
originate timestamp: e058807e.05119c87  Wed, Apr 10 2019 22:47:26.019
transmit timestamp:  e058f0db.acb31585  Thu, Apr 11 2019  6:46:51.674
filter delay:  0.02606  0.02643  0.02658  0.02640 
         0.00000  0.00000  0.00000  0.00000 
filter offset: -28765.6 -28765.6 -28765.6 -28765.6
         0.000000 0.000000 0.000000 0.000000
delay 0.02606, dispersion 0.00003
offset -28765.655310

11 Apr 06:46:51 ntpdate[1217]: no server suitable for synchronization found

  

出现 strata too high ,则可能是ntp服务版本高于4.2导致
ntpq -c version 可以查看ntp服务版本
解决办法:在/etc/ntp.conf加入
server 127.127.1.0 fudge
127.127.1.0 stratum 8

NTP服务器的部署

原文:https://www.cnblogs.com/l610479744/p/10686920.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!