1. 组网需求
SecPath3设置本地时钟作为NTP主时钟,层数为2,SecPath4以SecPath3作为时间服务器,将其设为server模式,自己为client模式。同时,SecPath5将SecPath4设为对等体。
2. 组网图
3. 配置步骤
(1) 配置SecPath 3
# 进入系统视图。
<H3C> system-view
# 设置本地时钟作为NTP主时钟,层数为2。
[H3C] ntp-service refclock-master 2
(2) 配置SecPath 4
# 进入系统视图。
<H3C> system-view
# 设置SecPath3为时间服务器,同步后层数为3。
[H3C] ntp-service unicast-server 3.0.1.31
(3) 配置SecPath5(SecPath4已经向SecPath3同步后)
# 进入系统视图。
<H3C> system-view
# 设置本地时钟作为NTP主时钟,层数为1。
[H3C] ntp-service refclock-master 1
# 本地同步后,设置SecPath4为对等体。
[H3C] ntp-service unicast-peer 3.0.1.32
以上配置将SecPath4和SecPath5配置为对等体,SecPath5处于主动对等体模式,SecPath4处于被动对等体模式,由于SecPath5的层数为1,而SecPath4的层数为3,所以SecPath4向SecPath5同步。
同步后观测SecPath4的状态为:
[H3C] display ntp-service status
Clock status: synchronized
Clock stratum: 2
Reference clock ID: 3.0.1.33
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)
此时SecPath 4已经与SecPath 5同步,层数比SecPath 5大1,为2。观察SecPath 4的sessions情况,SecPath 4与SecPath 5建立了连接。
[H3C] display ntp-service sessions
source reference stra reach poll now offset delay disper
**************************************************************************
[25]3.0.1.31 127.127.1.0 2 31 64 55 466670.4 1.0 0.9
[1234]3.0.1.33 127.127.1.0 1 7 64 59 -2771.6 -0.1 0.5
Total associations : 2
note: 1 source(master),2 source(peer),3 selected,4 candidate,5 configured
配置NTP服务器 http://www.elvhome.com/html/2013-3-3/20133317263962731.html





