10.4.1 配置NTP服务器
1. 组网需求
SecPath1设置本地时钟作为NTP主时钟,层数为2,SecPath2以SecPath1作为时间服务器,将其设为server模式,自己为client模式。
2. 组网图
3. 配置步骤
(1) 配置SecPath1
# 进入系统视图。
<H3C> system-view # 设置本地时钟作为NTP主时钟,层数为2。
[H3C] ntp-service refclock-master 2
(2) 配置SecPath2
# 进入系统视图。
<H3C> system-view
# 设置SecPath1为时间服务器。
[H3C] ntp-service unicast-server 1.0.1.11
以上配置将SecPath2向SecPath1进行时间同步,同步前观察SecPath2的状态为:
[H3C] display ntp-service status
Clock status: unsynchronized
Clock stratum: 16
Reference clock ID: none
Nominal frequency: 99.8562 Hz
Actual frequency: 99.8562 Hz
Clock precision: 2^7
Clock offset: 0.0000 ms
Root delay : 0.00 ms
Root dispersion: 0.00 ms
Peer dispersion: 0.00 ms
Reference time: 00:00:00.000 UTC Jan 1 1900 (00000000.00000000)
同步后观测SecPath2的状态为:
[H3C] display ntp-service status
Clock status: synchronized
Clock stratum: 3
Reference clock ID: 1.0.1.11
Nominal frequency: 250.0000 Hz
Actual frequency: 249.9992 Hz
Clock precision: 2^19
Clock offset: 198.7425 ms
Root delay : 27.47 ms
Root dispersion: 208.39 ms
Peer dispersion: 9.63 ms
Reference time: 17:03:32.022 UTC Sep 6 2001 (BF422AE4.05AEA86C)
此时SecPath2已经与SecPath1同步,层数比SecPath1大1,为3。 观察SecPath2的sessions情况,SecPath2与SecPath1建立了连接。
[H3C] display ntp-service sessions
source reference stra reach poll now offset delay disper
********************************************************************
[12345]1.0.1.11 LOCL(0) 2 377 64 1 199.53 26.1 9.7
Total associations : 1
note: 1 source(master),2 source(peer),3 selected,4 candidate,5 configured





