00-S12500_NTP典型配置举例
本章节下载: 00-S12500_NTP典型配置举例 (248.38 KB)
目 录
本文档介绍了NTP工作模式配置举例。
NTP(Network Time Protocol,网络时间协议)是由RFC 5905定义的时间同步协议,用来在分布式时间服务器和客户端之间进行时间同步。使用NTP的目的是对网络内所有具有时钟的设备进行时钟同步,使网络内所有设备的时钟保持一致,从而使设备能够提供基于统一时间的多种应用。
SNTP(Simple NTP,简单NTP)采用与NTP相同的报文格式及交互过程,但简化了NTP的时间同步过程,以牺牲时间精度为代价实现了时间的快速同步,并减少了占用的系统资源。
NTP的工作模式可以分为:客户端/服务器模式、对等体模式、广播模式、组播模式;而SNTP只支持客户端/服务器模式。
表1 NTP模式介绍
模式 |
应用场合 |
客户端/服务器模式 |
该模式通常用于下级的设备从上级的时间服务器获取时间同步 |
对等体模式 |
该模式通常用于同级的设备间互相同步,以便在同级的设备间形成备份。如果某台设备与所有上级时间服务器的通信出现故障,则该设备仍然可以从同级的时间服务器获得时间同步 |
广播模式 |
广播服务器广播发送时间同步报文,可以同时同步同一个子网中多个广播客户端的时间。使用同一个时间服务器为同一个子网中的大量设备提供时间同步时,可以使用广播模式,以简化网络配置 由于只有广播服务器单方向发送报文,广播模式的时间准确度不如客户端/服务器模式和对等体模式 |
组播模式 |
组播模式对广播模式进行了扩展,组播服务器可以同时为同一子网、不同子网的多个组播客户端提供时间同步 组播模式的时间准确度不如客户端/服务器模式和对等体模式 |
本文档中的配置均是在实验室环境下进行的配置和验证,配置前设备的所有参数均采用出厂时的缺省配置。如果您已经对设备进行了配置,为了保证配置效果,请确认现有配置和以下举例中的配置不冲突。
本文假设您已了解NTP特性。
· 设备上不能同时配置NTP和SNTP功能;
· 建议只在一个MDC上配置NTP或SNTP时间同步。如果在同一台设备的多个MDC上都配置了NTP或SNTP时间同步,则可能会导致系统时间频繁修改、系统时间与MDC指定的时间服务器的时间不同步等问题。
如图1所示,使用NTP客户端/服务器模式实现Switch B与Switch A的时钟同步:
· 在Switch A上设置本地时钟作为参考时钟,层数为2;
· 配置Switch B工作在客户端模式,指定Switch A为NTP服务器。
图1 NTP客户端/服务器模式组网图
本举例是在S12500-CMW710-R7129版本上进行配置和验证的。
· 服务器端只有当其时钟被同步后,才能作为时间服务器去同步其他设备。当服务器端的时钟层数大于或等于客户端的时钟层数时,客户端将不会向其同步;
· 客户端能够与NTP服务器的时间同步,NTP服务器无法与客户端的时间同步。
(1) 按照图1配置各接口的IP地址,具体配置过程略。
# 开启NTP服务。
<SwitchA> system-view
[SwitchA] ntp-service enable
# 设置本地时钟作为参考时钟,层数为2。
[SwitchA] ntp-service refclock-master 2
# 开启NTP服务。
<SwitchB> system-view
[SwitchB] ntp-service enable
# 设置Switch A为Switch B的NTP服务器。
[SwitchB] ntp-service unicast-server 1.0.1.11
# 在SwitchB上查看NTP服务状态。
<SwitchB> display ntp-service status
Clock status: synchronized
Clock stratum: 3
System peer: 1.0.1.11
Local mode: client
Reference clock ID: 1.0.1.11
Leap indicator: 00
Clock jitter: 0.000015 s
Stability: 0.000 pps
Clock precision: 2^-16
Root delay: 0.93079 ms
Root dispersion: 7949.87488 ms
Reference time: d3d3a1a7.57bcbf32 Mon, Aug 13 2012 15:54:15.342
此时,Switch B已经与Switch A同步,Switch B的时钟层数比Switch A的层数大1,为3。
· Switch A
#
ntp-service enable
#
ntp-service refclock-master 2
#
· Switch B
#
ntp-service enable
#
ntp-service unicast-server 1.0.1.11
#
如图2所示,使用客户端/服务器模式与对等体模式相结合的方式实现网络中设备的时钟保持一致,当Switch A出现故障时,Switch C仍然能与Switch B进行时间同步:
· 在Switch A上设置本地时钟作为参考时钟,时钟层数为2;
· 配置Switch B工作在客户端模式,指定Switch A为NTP服务器;
· 配置Switch C工作在对等体模式,将Switch B设为对等体。即Switch C为主动对等体,Switch B为被动对等体。
图2 配置NTP对等模式组网图
本举例是在S12500-CMW710-R7129版本上进行配置和验证的。
· 在对等体模式中,被动对等体上需要执行ntp-service enable命令来使能NTP,否则被动对等体不会处理来自主动对等体的NTP报文;
· 通常,主、被动对等体中至少有一个处于同步状态,否则他们都将无法同步;
· 主动对等体和被动对等体的时间可以互相同步;如果双方的时钟都处于同步状态,则层数大的时钟与层数小的时钟的时间同步。
(1) 按照图2配置各接口的IP地址,具体配置过程略。
(2) Switch A的配置
# 开启NTP服务。
<SwitchA> system-view
[SwitchA] ntp-service enable
# 设置本地时钟作为参考时钟,层数为2。
[SwitchA] ntp-service refclock-master 2
(3) Switch B的配置
# 开启NTP服务。
<SwitchB> system-view
[SwitchB] ntp-service enable
# 设置Switch A为Switch B的NTP服务器。
[SwitchB] ntp-service unicast-server 3.0.1.31
(4) Switch C的配置(Switch B向Switch A同步后)
# 开启NTP服务。
<SwitchC> system-view
[SwitchC] ntp-service enable
# 为Switch C指定被动对等体Switch B。
[SwitchC] ntp-service unicast-peer 3.0.1.32
# Switch B向Switch A同步后,查看Switch B的状态。
[SwitchB] display ntp-service status
Clock status: synchronized
Clock stratum: 3
System peer: 3.0.1.33
Local mode: sym_passive
Reference clock ID: 3.0.1.33
Leap indicator: 00
Clock jitter: 0.000015 s
Stability: 0.000 pps
Clock precision: 2^-16
Root delay: 0.51880 ms
Root dispersion: 15885.80322 ms
Reference time: d3d3ac88.fa1db5e9 Mon, Aug 13 2012 16:40:40.977
此时,Switch B已经与Switch A同步,层数比Switch A的层数大1,为3。
# Switch C向Switch B同步后,查看Switch C的状态。
[SwitchC] display ntp-service status
Clock status: synchronized
Clock stratum: 4
Reference clock ID: 3.0.1.33
Nominal frequency: 64.0000 Hz
Actual frequency: 64.0000 Hz
Clock precision: 2^7
Clock offset: -21.1982 ms
Root delay: 15.00 ms
Root dispersion: 775.15 ms
Peer dispersion: 34.29 ms
Reference time: 15:22:47.083 UTC Sep 19 2005 (C6D95647.153F7CED)
此时,Switch C已经与Switch B同步,层数比Switch B的层数大1,为4。
· Switch A
#
ntp-service enable
#
ntp-service refclock-master 2
#
· Switch B
#
ntp-service enable
#
ntp-service unicast-server 3.0.1.31
#
· Switch C
#
ntp-service enable
#
ntp-service unicast-peer 3.0.1.32
#
如图3所示,使用广播模式实现Switch C作为同一网段中多个设备的时间服务器:
· 选取Switch C作为时间服务器,配置Switch C本地时钟作为参考时钟,时钟层数为2;
· 配置Switch C工作在广播服务器模式,从VLAN接口2向外发送广播报文;
· 配置Switch A和Switch B工作在广播客户端模式,分别从各自的VLAN接口2监听NTP广播报文。
图3 配置NTP广播模式
本举例是在S12500-CMW710-R7129版本上进行配置和验证的。
· 广播服务器需要通过与其他设备同步或配置本地时钟作为参考时钟等方式,使得自己的时钟处于同步状态,否则广播客户端不会将自己的时间与广播服务器的时间同步;
· 广播客户端能够与广播服务器的时间同步,广播服务器无法与广播客户端的时间同步。
(1) 按照图3配置各接口的IP地址,具体配置过程略。
(2) Switch C的配置
# 开启NTP服务。
<SwitchC> system-view
[SwitchC] ntp-service enable
# 设置本地时钟作为参考时钟,层数为2。
[SwitchC] ntp-service refclock-master 2
# 设置Switch C为广播服务器,从VLAN接口2发送广播报文。
[SwitchC]vlan 2
[SwitchC-vlan2]quit
[SwitchC] interface vlan-interface 2
[SwitchC-Vlan-interface2] undo shutdown
[SwitchC-Vlan-interface2] ntp-service broadcast-server
(3) Switch A的配置
# 开启NTP服务。
<SwitchA> system-view
[SwitchA] ntp-service enable
# 设置Switch A为广播客户端,从VLAN接口2监听广播报文。
[SwitchA]vlan 2
[SwitchA-vlan2]quit
[SwitchA] interface vlan-interface 2
[SwitchA-Vlan-interface2] undo shutdown
[SwitchA-Vlan-interface2] ntp-service broadcast-client
(4) Switch B的配置
# 开启NTP服务。
<SwitchB> system-view
[SwitchB] ntp-service enable
# 设置Switch B为广播客户端,从VLAN接口2监听广播报文。
[SwitchB]vlan 2
[SwitchB-vlan2]quit
[SwitchB] interface vlan-interface 2
[SwitchB-Vlan-interface2] undo shutdown
[SwitchB-Vlan-interface2] ntp-service broadcast-client
# Switch A和Switch B接收到Switch C发出的广播报文后,与其同步。以Switch A为例,同步后查看Switch A的状态。
[SwitchA-Vlan-interface2] display ntp-service status
Clock status: synchronized
Clock stratum: 3
System peer: 3.0.1.31
Local mode: sym_passive
Reference clock ID: 3.0.1.31
Leap indicator: 00
Clock jitter: 0.000214 s
Stability: 0.000 pps
Clock precision: 2^-16
Root delay: 0.50354 ms
Root dispersion: 3950.56152 ms
Reference time: d3d3b9cb.fa186ac0 Mon, Aug 13 2012 17:37:15.976
此时,Switch A已经与Switch C同步,层数比Switch C的层数大1,为3。
· Switch C
#
ntp-service enable
#
ntp-service refclock-master 2
#
vlan 2
#
interface Vlan-interface2
ip address 3.0.1.31 255.255.255.0
ntp-service broadcast-server
#
· Switch A
#
ntp-service enable
#
vlan 2
#
interface Vlan-interface2
ip address 3.0.1.30 255.255.255.0
ntp-service broadcast-client
#
· Switch B
#
ntp-service enable
#
vlan 2
#
interface Vlan-interface2
ip address 3.0.1.32 255.255.255.0
ntp-service broadcast-client
#
如图4所示,选用组播模式实现Switch C作为不同网段中多个设备的时间服务器:
· 选取Switch C作为时间服务器,设置Switch C本地时钟作为参考时钟,时钟层数为2;
· 配置Switch C工作在组播服务器模式,从VLAN接口2向外发送组播报文;
· 配置Switch A和Switch D工作在组播客户端模式,Switch A从VLAN接口3监听组播报文,Switch D从VLAN接口2监听组播报文。
图4 配置NTP组播模式
本举例是在S12500-CMW710-R7129版本上进行配置和验证的。
· 组播服务器需要通过与其他设备同步或配置本地时钟作为参考时钟等方式,使得自己的时钟处于同步状态,否则组播客户端不会将自己的时间与组播服务器的时间同步;
· 组播客户端能够与组播服务器的时间同步,组播服务器无法与组播客户端的时间同步。
(1) 按照图4配置各接口的IP地址,具体配置过程略。
(2) Switch C的配置
# 开启NTP服务。
<SwitchC> system-view
[SwitchC] ntp-service enable
# 设置本地时钟作为参考时钟,层数为2。
[SwitchC] ntp-service refclock-master 2
# 设置Switch C为组播服务器,从VLAN接口2发送组播报文。
[SwitchC]vlan 2
[SwitchC-vlan2]quit
[SwitchC] interface vlan-interface 2
[SwitchC-Vlan-interface2] undo shutdown
[SwitchC-Vlan-interface2] ntp-service multicast-server
(3) Switch D的配置
# 开启NTP服务。
<SwitchD> system-view
[SwitchD] ntp-service enable
# 设置Switch D为组播客户端,从VLAN接口2监听组播报文。
[SwitchD]vlan 2
[SwitchD-vlan2]quit
[SwitchD] interface vlan-interface 2
[SwitchD-Vlan-interface2] undo shutdown
[SwitchD-Vlan-interface2] ntp-service multicast-client
(4) Switch B的配置
# 开启NTP服务。
<SwitchB> system-view
[SwitchB] ntp-service enable
# 配置组播功能。
[SwitchB] multicast routing-enable
[SwitchB]vlan 2
[SwitchB-vlan2]quit
[SwitchB] interface vlan-interface 2
[SwitchB-Vlan-interface2] undo shutdown
[SwitchB-Vlan-interface2] pim dm
[SwitchB-Vlan-interface2] quit
[SwitchB] vlan 3
[SwitchB-vlan3] port GigabitEthernet 3/0/1
[SwitchB-vlan3] quit
[SwitchB] interface vlan-interface 3
[SwitchB-Vlan-interface3] undo shutdown
[SwitchB-Vlan-interface3] igmp enable
[SwitchB-Vlan-interface3] igmp static-group 224.0.1.1
[SwitchB-Vlan-interface3] quit
[SwitchB] interface GigabitEthernet 3/0/1
[SwitchB-GigabitEthernet3/0/1] undo shutdown
[SwitchB-GigabitEthernet3/0/1] igmp-snooping static-group 224.0.1.1 vlan 3
(5) Switch A的配置
# 开启NTP服务。
<SwitchA> system-view
[SwitchA] ntp-service enable
# 设置Switch A为组播客户端,从VLAN接口3监听组播报文。
[SwitchA]vlan 3
[SwitchA-vlan3]quit
[SwitchA] interface vlan-interface 3
[SwitchA-Vlan-interface3] undo shutdown
[SwitchA-Vlan-interface3] ntp-service multicast-client
# 同步后查看Switch D的状态。
[SwitchD-Vlan-interface2] display ntp-service status
Clock status: synchronized
Clock stratum: 3
System peer: 3.0.1.31
Local mode: sym_passive
Reference clock ID: 3.0.1.31
Leap indicator: 00
Clock jitter: 0.000305 s
Stability: 0.000 pps
Clock precision: 2^-16
Root delay: 0.96130 ms
Root dispersion: 16.52527 ms
Reference time: d3d3bcde.fa197f8e Mon, Aug 13 2012 17:50:22.976
此时,Switch D已经与Switch C同步,层数比Switch C的层数大1,为3。
# 同步后查看Switch A的状态。
[SwitchA-Vlan-interface3] display ntp-service status
Clock status: synchronized
Clock stratum: 3
System peer: 3.0.1.31
Local mode: bclient
Reference clock ID: 3.0.1.31
Leap indicator: 00
Clock jitter: 0.000015 s
Stability: 0.000 pps
Clock precision: 2^-16
Root delay: 0.90027 ms
Root dispersion: 12.84790 ms
Reference time: d3d4b196.e4f2a7c6 Tue, Aug 14 2012 11:14:30.894
此时,Switch A已经与Switch C同步,层数比Switch C的层数大1,为3。
· Switch C
#
ntp-service enable
#
ntp-service refclock-master 2
#
vlan 2
#
interface Vlan-interface2
ip address 3.0.1.31 255.255.255.0
ntp-service multicast-server
#
· Switch D
#
ntp-service enable
#
vlan 2
#
interface Vlan-interface2
ip address 3.0.1.32 255.255.255.0
ntp-service multicast-client
#
· Switch B
#
ntp-service enable
#
multicast routing-enable
#
vlan 2
#
vlan 3
#
interface Vlan-interface2
ip address 3.0.1.30 255.255.255.0
pim dm
#
interface Vlan-interface3
ip address 1.0.1.10 255.255.255.0
igmp enable
igmp static-group 224.0.1.1
#
interface GigabitEthernet3/0/1
port link-mode bridge
port access vlan 3
igmp-snooping static-group 224.0.1.1 vlan 3
#
· Switch A
#
ntp-service enable
#
vlan 3
#
interface Vlan-interface3
ip address 1.0.1.11 255.255.255.0
ntp-service multicast-client
如图5所示,使用带验证功能的NTP广播模式实现NTP客户端不会与非法的广播NTP服务器进行时间同步,以保证时间同步的安全性:
· 在Switch C上设置本地时钟作为参考时钟,层数为3;
· Switch C工作在广播服务器模式,从VLAN接口2向外广播发送NTP报文;
· Switch A和Switch B工作在广播客户端模式,从VLAN接口2监听NTP广播报文;
· 在Switch A、Switch B和Switch C上配置NTP验证功能。
图5 配置带身份验证的NTP广播模式组网图
本举例是在S12500-CMW710-R7129版本上进行配置和验证的。
· 广播客户端和广播服务器上都必须使能NTP验证功能、配置验证密钥、将验证密钥设为可信密钥,并在广播服务器上指定与该服务器关联的密钥;
· 广播服务器和广播客户端上配置的密钥ID和密钥值必须保持一致,否则会导致NTP验证失败。
(1) 按照图5配置各接口的IP地址,具体配置过程略。
(2) 配置Switch A
# 开启NTP服务。
<SwitchA> system-view
[SwitchA] ntp-service enable
# 使能NTP验证功能,创建ID为88的NTP验证密钥,密钥值为123456,以明文形式输入,并将密钥88指定为可信密钥。
[SwitchA] ntp-service authentication enable
[SwitchA] ntp-service authentication-keyid 88 authentication-mode md5 simple 123456
[SwitchA] ntp-service reliable authentication-keyid 88
# 设置Switch A为NTP广播客户端,从VLAN接口2监听广播报文。
[SwitchA] vlan 2
[SwitchA-vlan2]quit
[SwitchA] interface vlan-interface 2
[SwitchA-Vlan-interface2] undo shutdown
[SwitchA-Vlan-interface2] ntp-service broadcast-client
(3) 配置Switch B
# 开启NTP服务。
<SwitchB> system-view
[SwitchB] ntp-service enable
# 使能NTP验证功能,创建ID为88的NTP验证密钥,密钥值为123456,以明文形式输入,并将密钥88指定为可信密钥。
[SwitchB] ntp-service authentication enable
[SwitchB] ntp-service authentication-keyid 88 authentication-mode md5 simple 123456
[SwitchB] ntp-service reliable authentication-keyid 88
# 设置Switch B为NTP广播客户端,从VLAN接口2监听广播报文。
[SwitchB] vlan 2
[SwitchB-vlan2]quit
[SwitchB] interface vlan-interface 2
[SwitchB-Vlan-interface2] undo shutdown
[SwitchB-Vlan-interface2] ntp-service broadcast-client
(4) 配置Switch C
# 开启NTP服务。
<SwitchC> system-view
[SwitchC] ntp-service enable
# 设置本地时钟作为参考时钟,层数为3。
[SwitchC] ntp-service refclock-master 3
# 设置Switch C为NTP广播服务器,从VLAN接口2向外发送广播报文。
[SwitchC] vlan 2
[SwitchC-vlan2]quit
[SwitchC] interface vlan-interface 2
[SwitchC-Vlan-interface2] undo shutdown
[SwitchC-Vlan-interface2] ntp-service broadcast-server
[SwitchC-Vlan-interface2] quit
# 在Switch C上使能NTP验证功能,创建ID为88的NTP验证密钥,密钥值为123456,以明文形式输入,并将密钥88指定为可信密钥。
[SwitchC] ntp-service authentication enable
[SwitchC] ntp-service authentication-keyid 88 authentication-mode md5 simple 123456
[SwitchC] ntp-service reliable authentication-keyid 88
# 设置Switch C为NTP广播服务器并指定关联的密钥编号为88。
[SwitchC] interface vlan-interface 2
[SwitchC-Vlan-interface2] ntp-service broadcast-server authentication-keyid 88
# 在Switch C上使能NTP验证功能后,Switch A和Switch B可以与Switch C的时间同步。以Switch B为例,查看NTP服务的状态信息。
[SwitchB-Vlan-interface2] display ntp-service status
Clock status: synchronized
Clock stratum: 4
System peer: 3.0.1.31
Local mode: client
Reference clock ID: 3.0.1.31
Leap indicator: 00
Clock jitter: 0.006683 s
Stability: 0.000 pps
Clock precision: 2^-10
Root delay: 0.00127 ms
Root dispersion: 2.89877 ms
Reference time: d0d287a7.3119666f Sat, Jan 8 2011 6:50:15.191
此时, Switch B已经与Switch C同步,层数比Switch C的层数大1,为4。
# 查看Switch B的NTP服务的所有IPv4会话信息,可以看到Switch B与Switch C建立了连接。
[SwitchB-Vlan-interface2] display ntp-service sessions
source reference stra reach poll now offset delay disper
********************************************************************************
[1245]3.0.1.31 127.127.1.0 3 3 64 68 -0.0 0.0000 0.0
Notes: 1 source(master),2 source(peer),3 selected,4 candidate,5 configured.
Total sessions : 1
· Switch A
#
ntp-service enable
ntp-service authentication enable
ntp-service authentication-keyid 88 authentication-mode md5 cipher $c$3$fZ51vG6
nEZoybjDKlM6huQYwq5g227NIYw==
ntp-service reliable authentication-keyid 88
#
#
vlan 2
#
interface Vlan-interface2
ntp-service broadcast-client
#
· Switch B
#
ntp-service enable
ntp-service authentication enable
ntp-service authentication-keyid 88 authentication-mode md5 cipher $c$3$fZ51vG6
nEZoybjDKlM6huQYwq5g227NIYw==
ntp-service reliable authentication-keyid 88
#
#
vlan 2
#
interface Vlan-interface2
ntp-service broadcast-client
#
· Switch C
#
ntp-service enable
ntp-service refclock-master 3
#
vlan 2
#
interface Vlan-interface2
ntp-service broadcast-server
#
ntp-service authentication enable
ntp-service authentication-keyid 88 authentication-mode md5 cipher $c$3$fZ51vG6
nEZoybjDKlM6huQYwq5g227NIYw==
ntp-service reliable authentication-keyid 88
ntp-service broadcast-server authentication-keyid 88
#
如图6所示,使用SNTP客户端/服务器模式实现Switch B与Switch A的时间同步:
· 在Switch A上设置本地时钟作为参考时钟,层数为2;
· Switch B工作在SNTP客户端模式,指定Switch A为NTP服务器;
· Switch B要求对NTP服务器进行验证,以保证时间同步的安全性。
图6 SNTP配置组网图
本举例是在S12500-CMW710-R7129版本上进行配置和验证的。
要使SNTP验证功能正常工作,在配置SNTP验证功能时应注意以下原则:
· 在NTP服务器和SNTP客户端上都需要使能验证功能;
· NTP服务器和SNTP客户端上必须配置相同的验证密钥(包括密钥ID和密钥值),并将密钥设为可信密钥;
· 在客户端需要将指定密钥与对应的NTP服务器关联。
(1) 按照图6配置各接口的IP地址,具体配置过程略。
(2) 配置Switch A
# 开启NTP服务。
<SwitchA> system-view
[SwitchA] ntp-service enable
# 设置本地时钟作为参考时钟,层数为2。
[SwitchA] ntp-service refclock-master 2
# 在Switch A上启动NTP验证功能。
[SwitchA] ntp-service authentication enable
# 创建编号为10的NTP验证密钥,密钥值为aNiceKey,以明文形式输入。
[SwitchA] ntp-service authentication-keyid 10 authentication-mode md5 simple aNiceKey
# 设置编号为10的密钥为可信密钥。
[SwitchA] ntp-service reliable authentication-keyid 10
(3) 配置Switch B
# 开启SNTP服务。
<SwitchB> system-view
[SwitchB] sntp enable
# 在Switch B上启动SNTP验证功能。
[SwitchB] sntp authentication enable
# 创建编号为10的SNTP验证密钥,密钥值为aNiceKey,以明文形式输入。
[SwitchB] sntp authentication-keyid 10 authentication-mode md5 simple aNiceKey
# 设置编号为10的密钥为可信密钥。
[SwitchB] sntp reliable authentication-keyid 10
# 设置Switch A为Switch B的NTP服务器,并将该服务器与编号为10的密钥关联。
[SwitchB] sntp unicast-server 1.0.1.11 authentication-keyid 10
# 查看Switch B的SNTP会话信息,可以看到Switch B与Switch A建立了会话,并且处于已同步状态。
[SwitchB] display sntp sessions
SNTP server Stratum Version Last receive time
1.0.1.11 2 4 Tue, May 17 2011 9:11:20.833 (Synced)
· Switch A
#
ntp-service enable
ntp-service authentication enable
ntp-service authentication-keyid 10 authentication-mode md5 cipher $c$3$cl9hOWY
Vdulw8Wql/zmIH4mwn8OcbXO1v5l9
ntp-service reliable authentication-keyid 10
ntp-service refclock-master 2
#
· Switch B
#
sntp enable
sntp authentication enable
sntp authentication-keyid 10 authentication-mode md5 cipher $c$3$FjioZoTZyZSGTN
3OI5Lv3yTIYGVi4FzK4T92
sntp reliable authentication-keyid 10
sntp unicast-server 1.0.0.11 authentication-keyid 10
#
· 《H3C S12500系列路由交换机 网络管理和监控配置指导》中的“NTP”
· 《H3C S12500系列路由交换机 网络管理和监控命令参考》中的“NTP”
不同款型规格的资料略有差异, 详细信息请向具体销售和400咨询。H3C保留在没有任何通知或提示的情况下对资料内容进行修改的权利!