10.4.3 配置NTP广播模式
1. 组网需求
SecPath3设置本地时钟作为NTP主时钟,层数为2,并从接口Ethernet 1/0/0向外发送广播消息包,设置SecPath4和SecPath1分别从各自的接口Ethernet 1/0/0监听广播消息。
2. 组网图
3. 配置步骤
(1) 配置SecPath 3
# 进入系统视图。
system-view
# 设置本地时钟作为NTP主时钟,层数为2。
[H3C] ntp-service refclock-master 2
# 进入接口Ethernet 1/0/0视图。
[H3C] interface ethernet 1/0/0
# 设置为广播服务器。
[H3C-Ethernet1/0/0] ntp-service broadcast-server
(2) 配置SecPath 4
# 进入系统视图。
system-view
# 进入接口Ethernet 1/0/0视图。
[H3C] interface ethernet 1/0/0
[H3C-Ethernet1/0/0] ntp-service broadcast-client
(3) 配置SecPath1
# 进入系统视图。
system-view
# 进入接口Ethernet 1/0/0视图。
[H3C] interface ethernet 1/0/0
[H3C-Ethernet1/0/0] ntp-service broadcast-client
以上配置将SecPath4和SecPath1配置为从接口Ethernet 1/0/0监听广播消息,而SecPath3从接口Ethernet 1/0/0发送广播消息包,由于SecPath1与SecPath3不在同一的网段,所以接收不到SecPath3发出的广播包,而SecPath4接收到SecPath 3发出的广播包后与其同步。同步后观测SecPath4的状态为:
[H3C] display ntp-service status
Clock status: synchronized
Clock stratum: 3
Reference clock ID: 3.0.1.3
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 3同步,层数比SecPath3大1,为3。
观察SecPath 4的sessions情况,SecPath 4与SecPath 3建立了连接。
[H3C] display ntp-service sessions
source reference stra reach poll now offset delay disper
********************************************************************
[1234]3.0.1.31 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
10.4.4 配置带认证的NTP广播模式
1. 组网需求
SecPath3设置本地时钟作为NTP主时钟,层数为3,并从接口Ethernet 1/0/0向外
发送广播消息包,设置SecPath 4从接口Ethernet 1/0/0监听广播消息。
2. 组网图
3. 配置步骤
(1) 配置SecPath 3
# 进入系统视图。
system-view
# 设置本地时钟作为NTP主时钟,层数为3。
[H3C] ntp-service refclock-master 3
# 启动认证功能。
[H3C] ntp-service authentication enable
# 设置NTP验证密钥。
[H3C] ntp-service authentication-keyid 88 authentication-mode md5 123456
# 设置本验证密钥可信。
[H3C] ntp-service reliable authentication-keyid 88
# 进入接口Ethernet 1/0/0视图。
[H3C] interface ethernet 1/0/0
# 设置本为NTP广播服务器并指定验证ID。
[H3C-Ethernet1/0/0] ntp-service broadcast-server authentication-id 88
(2) 配置SecPath4
# 进入系统视图。
system-view
# 启动认证功能。
[H3C] ntp-service authentication enable
# 设置NTP验证密钥。
[H3C] ntp-service authentication-keyid 88 authentication-mode md5 123456
# 设置本验证密钥可信。
[H3C] ntp-service reliable authentication-keyid 88
# 进入接口Ethernet 1/0/0视图。
[H3C] interface ethernet 1/0/0
# 设置防火墙为NTP广播客户端。
[H3C-Ethernet1/0/0] ntp-service broadcast-client
以上配置将SecPath4配置为从接口Ethernet 1/0/0监听广播消息,而SecPath3从接口Ethernet 1/0/0发送广播消息包,SecPath 4接收到SecPath3发出的广播包后与其同步。同步后观测SecPath 4的状态为:
display ntp-service status
Clock status: synchronized
Clock stratum: 4
Reference clock ID: 3.0.1.31
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 2003(BF422AE4.05AEA86C)
此时SecPath4已经与SecPath3同步,层数比SecPath3大1,为4。





