无
现场在交换机上配置NTP协议,同步服务器的时钟,没有同步成功
1、检查客户端的NTP配置如下
clock protocol ntp mdc 1 //使能NTP时钟协议
ntp-service enable
ntp-service refclock-master 2 //配置客户端时钟层级
ntp-service unicast-server 10.41.89.83 //配置服务器
2、查看NTP的会话信息和状态
[CS06-CCTV-KZZX]dis ntp-service sessions
source reference stra reach poll now offset delay disper ******************************************************************************** [245]10.41.89.83 71.80.83.0 2 255 64 57 214748 1.2359 19.180
[12345]LOCAL(0) LOCL 1 255 64 57 0.0000 0.0000 0.9307
Notes: 1 source(master), 2 source(peer), 3 selected, 4 candidate, 5 configured.
Total sessions: 2 //两个会话
[CS06-CCTV-KZZX]dis ntp-service status
Clock status: synchronized //配置生效
Clock stratum: 2 //时钟层级2
System peer: LOCAL(0)
Local mode: client
Reference clock ID: 127.127.1.0
Leap indicator: 00
Clock jitter: 0.000000 s
Stability: 0.000 pps
Clock precision: 2^-17
Root delay: 0.00000 ms
Root dispersion: 10.95581 ms
Reference time: e53c7228.021981ed Mon, Nov 15 2021 13:44:08.008
System poll interval: 64 s
3、查看debugg信息
<CS06-CCTV-KZZX>*Nov 15 13:44:41:758 2021 CS06-CCTV-KZZX NTP/7/PACKET_RECV: -MDC=1;
packet from 10.41.0.30 to 10.41.0.254 on Vlan-interface1000
leap: 0, version: 4, mode: 3, vrfindex: 0 客户端发的包字段是mode3
stratum: 3, poll: 6, precision: 2^-18 客户端时钟层级为3
rdel: 2.747, rdsp: 17.731, refid: 10.41.0.254
reftime: e53c7206.c28eb879 Mon, Nov 15 2021 13:43:34.759
orgtime: e53c7206.c2201df5 Mon, Nov 15 2021 13:43:34.758
rectime: e53c7206.c28eb879 Mon, Nov 15 2021 13:43:34.759
xmttime: e53c7249.c1a8d176 Mon, Nov 15 2021 13:44:41.756
inptime: e53c7249.c1fb6c26 Mon, Nov 15 2021 13:44:41.757
*Nov 15 13:44:41:759 2021 CS06-CCTV-KZZX NTP/7/ACL: -MDC=1; Access restrict: 0x00000008.
*Nov 15 13:44:41:759 2021 CS06-CCTV-KZZX NTP/7/AUTH: -MDC=1; Received a packet at 351688, from 10.41.0.30, mode 3, key ID 00000000, length 48, authentication result 0
*Nov 15 13:44:41:760 2021 CS06-CCTV-KZZX NTP/7/PACKET_SEND: -MDC=1;
packet to 10.41.0.30, length: 48
leap: 0, version: 4, mode: 4, vrfindex: 0 服务器返回时的字段mode4
stratum: 2, poll: 6, precision: 2^-17 服务器时钟层级为2 服务器的时钟层级低于客户端时钟层级,导致时间同步失败
rdel: 0.000, rdsp: 11.429, refid: 127.127.1.0 rdsp为偏离值不能大于16,大于16会认为报文非法;refid不能全0,全0会认为有环路
reftime: e53c7228.021981ed Mon, Nov 15 2021 13:44:08.008 系统时钟最后一次被设定或更新的时间
orgtime: e53c7249.c1a8d176 Mon, Nov 15 2021 13:44:41.756 NTP请求报文离开发送端时发送端的本地时间
rectime: e53c7249.c1fb6c26 Mon, Nov 15 2021 13:44:41.757 NTP请求报文到达接收端时接收端的本地时间
xmttime: e53c7249.c25c302e Mon, Nov 15 2021 13:44:41.759 应答报文离开应答者时应答者的本地时间
解决方法:
一般ntp客户端的层级要低于Ntp服务器
1、删除ntp-service refclock-master 2配置。
大多数时候ntp客户端都无需配置层级——时间同步时会根据上游服务器层级自动生成自己的层级(服务器层级+1作为自己的层级)
2、配置更低的层级(值越大,层级越低)
该案例暂时没有网友评论
✖
案例意见反馈
亲~登录后才可以操作哦!
确定你的邮箱还未认证,请认证邮箱或绑定手机后进行当前操作