04
2020
12
09:08:02

H3C S3100V3-SI交换机设置NTP时间



推荐点击下面图片,通过本站淘宝优惠价购买:

image.png

给客户内网网络设备配置NTP服务,用的华为9303做的NTP服务器,其它设备为NTP客户端。但是华为所有设备成功同步到NTP服务器,而H3C设备均无法正常同步。
华为交换机作为服务器配置如下:
ntp-service refclock-master 2
ntp-service authentication enable
ntp-service source-interface loopback0
ntp-service authentication-keyid 1 authentication-mode md5 simple admin
ntp-service reliable authentication-keyid 1
undo ntp-service disable
华为交换机作为客户端配置如下:
ntp-service authentication enable
ntp-service authentication-keyid 1 authentication-mode md5 simple admin
ntp-service reliable authentication-keyid 1
ntp-service unicast-server 10.1.1.1
H3C无法同步设备配置如下:
ntp-service enable
ntp-service authentication enable
ntp-service authentication-keyid 1 authentication-mode md5 simple admin
ntp-service reliable authentication-keyid 1
ntp-service unicast-server 10.1.1.1
配置是没问的。
查看本地设备NTP会话的详细信息
华为服务端:
display ntp-service sessions verbose
9303>DIS NTP sessions verbose
clock source: 127.127.1.0
clock stratum: 1
clock status: configured, master, sane, valid
reference clock ID: LOCAL(0)
local mode: client, local poll: 64, current poll: 64
peer mode: server, peer poll: 64, now: 20
offset: 0.0000 ms, delay: 0.00 ms, disper: 0.97 ms
root delay: 0.00 ms, root disper: 10.00 ms
reach: 377, sync dist: 0.011, sync state: 4
precision: 2^17, version: 3, peer interface: InLoopBack0
reftime: 17:45:06.502 UTC Jul 25 2018(DF0335A2.80851A86)
orgtime: 17:45:06.502 UTC Jul 25 2018(DF0335A2.80851A86)
rcvtime: 17:45:06.502 UTC Jul 25 2018(DF0335A2.808626F6)
xmttime: 17:45:06.502 UTC Jul 25 2018(DF0335A2.80842FA5)
filter delay : 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00
filter offset: 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00
filter disper: 0.00 0.00 0.01 0.01 0.00 0.00 0.00 0.00
reference clock status: normal
h3C客户端:
display ntp-service sessions verbose
Clock source: 10.1.1.1

Session ID: 56760

Clock stratum: 16

Clock status: configured, insane, valid, unsynced

Reference clock ID: INIT

××× instance: none

Local mode: client,
local poll interval: 6

Peer mode: unspec,
peer poll interval: 10

Offset: 0.0000ms,
roundtrip delay: 0.0000ms,
dispersion: 0.0000ms

Root roundtrip delay: 0.0000ms,
root dispersion: 0.0000ms

Reachabilities:0,
sync distance: 0.0010

Precision: 2^-20,
version: 4,
source interface: Not specified

Reftime: 00000000.00000000
Thu, Feb 7 2036 14:28:16.000
Orgtime: df021d74.804177f0 Wed, Jul 25 2018 5:49:40.500
Rcvtime: 00000000.00000000 Thu, Feb 7 2036 14:28:16.000
Xmttime: 00000000.00000000 Thu, Feb 7 2036 14:28:16.000
Roundtrip delay samples: 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000
Offset samples: 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00
Filter order: 0 1 2 3 4 5 6 7

Total sessions: 1
可以看到Clock status: configured, insane, valid, unsynced
查看官方文档:(会话的状态,该字段的取值及含义为:

· configured:表示该会话是配置命令所建立的

· dynamic:表示该会话是动态生成的

· master:表示该会话对应的时间服务器是当前系统的主时间服务器

· selected:表示该会话对应时间服务器的时钟通过了时钟选择算法

· candidate:表示该会话对应时间服务器的时钟为候选时钟

· sane:表示该会话对应的时间服务器通过身份验证,该时间服务器的时钟将作为参考时钟

· insane:表示该会话对应的时间服务器未通过身份验证,或该时间服务器通过身份验证但其时钟不作为参考时钟

· valid:表示该会话对应的时间服务器是有效的(通过验证、处于同步状态、层数有效、根延时/离差未越界等)

· invalid:表示该会话对应的时间服务器是无效的

· unsynced:表示该会话对应时间服务器的时钟未同步或层数非法)
可见服务器是有效,可能是验证失败或者时钟不作为参考时钟,验证配置的密码是一样的,那就看其它的,发现版本不一致。
一个为version: 4, 一个为version: 3,。按理说高版本可以兼容低版本才对,但是找不到不能同步的其它原因。
在H3C上强制降低版本,
ntp-service unicast-server 10.1.1.1 version 3,一分钟左右,显示同步成功。OK,解决了。


本文链接:https://hqyman.cn/post/1555.html 非本站原创文章欢迎转载,原创文章需保留本站地址!

分享到:





休息一下,本站随机推荐观看栏目:


« 上一篇 下一篇 »

发表评论:

◎欢迎参与讨论,请在这里发表您的看法、交流您的观点。

您的IP地址是: