取消
显示结果 
搜索替代 
您的意思是: 
cancel
17552
查看次数
54
有帮助
17
回复

请教一个NTP失败的问题

xy411381121
Spotlight
Spotlight
本帖最后由 xy411381121 于 2018-8-2 16:20 编辑
机房里有两台NTP服务器(172.26.12.187与172.26.12.188)
现在想在交换机上配置NTP,同步时间,但在两台WS-C3750X-48上配置NTP,时间同步都失败了。在交换机上ping这两个IP都是通的。其他服务器都可以与这两台NTP服务器同步,但在交换机上配置就失败了。
在交换机上配置如下:
ntp server 172.26.12.188
ntp server 172.26.12.187
检查后NTP的情况如下:
WG-SW01#sho clock de
*07:46:23.253 UTC Fri Oct 15 1993
Time source is NTP
WG-SW01#
WG-SW01#
WG-SW01#sho ntp status
Clock is unsynchronized, stratum 16, no reference clock
nominal freq is 119.2092 Hz, actual freq is 119.2092 Hz, precision is 2**17
reference time is 00000000.00000000 (00:00:00.000 UTC Mon Jan 1 1900)
clock offset is 0.0000 msec, root delay is 0.00 msec
root dispersion is 0.00 msec, peer dispersion is 0.00 msec
WG-SW01#
WG-SW01#
WG-SW01#sho ntp asso det
172.26.12.188 configured, insane, invalid, stratum 15
ref ID 0.0.0.0, time DF0CE815.DC6A7DFB (02:16:53.860 UTC Thu Aug 2 2018)
our mode client, peer mode server, our poll intvl 1024, peer poll intvl 1024
root delay 0.00 msec, root disp 0.00, reach 377, sync dist 198.685
delay 0.98 msec, offset 782505554803.6571 msec, dispersion 198.20
precision 2**6, version 3
org time DF0CE9DF.C56040A5 (02:24:31.770 UTC Thu Aug 2 2018)
rcv time B068D38C.F7C407CE (07:45:16.967 UTC Fri Oct 15 1993)
xmt time B068D38C.F78388C8 (07:45:16.966 UTC Fri Oct 15 1993)
filtdelay = 0.98 1.07 1.04 0.95 1.05 0.95 1.07 0.96
filtoffset = 7825055 7825055 7825055 7825055 7825055 7825055 7825055 7825055
filterror = 0.02 15.64 31.27 46.89 62.52 78.14 93.77 109.39
172.26.12.187 configured, insane, invalid, stratum 15
ref ID 0.0.0.0, time DF0CE806.72F1A977 (02:16:38.448 UTC Thu Aug 2 2018)
our mode client, peer mode server, our poll intvl 1024, peer poll intvl 1024
root delay 0.00 msec, root disp 0.00, reach 377, sync dist 166.077
delay 1.02 msec, offset 782505554919.9265 msec, dispersion 165.18
precision 2**6, version 3
org time DF0CE9C5.E418926D (02:24:05.890 UTC Thu Aug 2 2018)
rcv time B068D372.F8BA3756 (07:44:50.971 UTC Fri Oct 15 1993)
xmt time B068D372.F87650F8 (07:44:50.970 UTC Fri Oct 15 1993)
filtdelay = 1.02 1.08 0.99 10.33 1.04 1.13 0.98 1.04
filtoffset = 7825055 7825055 7825055 7825055 7825055 7825055 7825055 7825055
filterror = 0.02 15.64 31.27 46.89 62.52 78.14 93.77 109.39
请问是哪里出了问题啊?为什么试了两台交换机,都无法同步?
17 条回复17

jingjian
Spotlight
Spotlight
xy411381121 发表于 2018-8-14 16:32
没有防火墙设备。
机房里的应用服务器,数据库服务器都可以和NTP服务器同步时钟。
NTP服务器——配线架 ...

debug ntp events
debug ntp packets
debug ntp sync
看一下debug的信息
Aug 15 01:27:28.246: NTP: xmit packet to 172.16.100.180:
Aug 15 01:27:28.246: leap 0, mode 3, version 3, stratum 4, ppoll 256
Aug 15 01:27:28.246: rtdel 446E (267.303), rtdsp 1D78 (115.112), refid AC1064B4 (172.16.100.180)
Aug 15 01:27:28.246: ref DF1DFF00.3EF7C72B (09:23:12.245 GMT Wed Aug 15 2018)
Aug 15 01:27:28.246: org DF1DFF00.3BC7B45F (09:23:12.233 GMT Wed Aug 15 2018)
Aug 15 01:27:28.246: rec DF1DFF00.3EF7C72B (09:23:12.245 GMT Wed Aug 15 2018)
Aug 15 01:27:28.246: xmt DF1E0000.40216612 (09:27:28.250 GMT Wed Aug 15 2018)
Aug 15 01:27:28.256: NTP: rcv packet from 172.16.100.180 to 192.168.16.253 on Vlan16:
Aug 15 01:27:28.256: leap 0, mode 4, version 3, stratum 3, ppoll 256
Aug 15 01:27:28.256: rtdel 42CE (260.956), rtdsp 1A1E (102.020), refid 34ADC1A6 (52.173.193.166)

xy411381121
Spotlight
Spotlight
arvinjing 发表于 2018-8-15 09:28
debug ntp events
debug ntp packets
debug ntp sync

下面是NTP的配置和状态:
WG-SW01#show run | i ntp
ntp server 172.26.12.188
ntp server 172.26.12.187
WG-SW01#
WG-SW01#sho clock de
*07:46:23.253 UTC Fri Oct 15 1993
Time source is NTP
WG-SW01#
WG-SW01#sho ntp status
Clock is unsynchronized, stratum 16, no reference clock
nominal freq is 119.2092 Hz, actual freq is 119.2092 Hz, precision is 2**17
reference time is 00000000.00000000 (00:00:00.000 UTC Mon Jan 1 1900)
clock offset is 0.0000 msec, root delay is 0.00 msec
root dispersion is 0.00 msec, peer dispersion is 0.00 msec
WG-SW01#
WG-SW01#sho ntp asso det
172.26.12.188 configured, insane, invalid, stratum 15
ref ID 0.0.0.0, time DF0CE815.DC6A7DFB (02:16:53.860 UTC Thu Aug 2 2018)
our mode client, peer mode server, our poll intvl 1024, peer poll intvl 1024
root delay 0.00 msec, root disp 0.00, reach 377, sync dist 198.685
delay 0.98 msec, offset 782505554803.6571 msec, dispersion 198.20
precision 2**6, version 3
org time DF0CE9DF.C56040A5 (02:24:31.770 UTC Thu Aug 2 2018)
rcv time B068D38C.F7C407CE (07:45:16.967 UTC Fri Oct 15 1993)
xmt time B068D38C.F78388C8 (07:45:16.966 UTC Fri Oct 15 1993)
filtdelay = 0.98 1.07 1.04 0.95 1.05 0.95 1.07 0.96
filtoffset = 7825055 7825055 7825055 7825055 7825055 7825055 7825055 7825055
filterror = 0.02 15.64 31.27 46.89 62.52 78.14 93.77 109.39
172.26.12.187 configured, insane, invalid, stratum 15
ref ID 0.0.0.0, time DF0CE806.72F1A977 (02:16:38.448 UTC Thu Aug 2 2018)
our mode client, peer mode server, our poll intvl 1024, peer poll intvl 1024
root delay 0.00 msec, root disp 0.00, reach 377, sync dist 166.077
delay 1.02 msec, offset 782505554919.9265 msec, dispersion 165.18
precision 2**6, version 3
org time DF0CE9C5.E418926D (02:24:05.890 UTC Thu Aug 2 2018)
rcv time B068D372.F8BA3756 (07:44:50.971 UTC Fri Oct 15 1993)
xmt time B068D372.F87650F8 (07:44:50.970 UTC Fri Oct 15 1993)
filtdelay = 1.02 1.08 0.99 10.33 1.04 1.13 0.98 1.04
filtoffset = 7825055 7825055 7825055 7825055 7825055 7825055 7825055 7825055
filterror = 0.02 15.64 31.27 46.89 62.52 78.14 93.77 109.39
使用debug ntp packets,根本就没有数据包输出

Mansur
Spotlight
Spotlight
xy411381121 发表于 2018-8-7 11:00
昨晚试了下,发现可能正是NTP服务器是windows的原因,debug ntp packets发现都没有输出显示

学习了,。。这个没接触过
快捷链接