实验14 NTP

实验任务一:NTP服务器/客户机模式和对等体模式基本配置
1.建立物理连接

2.配置NTP时钟源
[SWA]int vlan 1
[SWA-Vlan-interface1]ip ad 192.168.10.1 24

[SWB]int vlan 1
[SWB-Vlan-interface1]ip ad 192.168.10.2 24

[SWC]int vlan 1
[SWC-Vlan-interface1]ip ad 192.168.10.3 24

[SWA]ntp-service enable //
[SWA]ntp-service refclock-master 1//本地时钟作为参考时钟,层数为1

[SWA]display ntp-service status //显示NTP时钟的相关信息
Clock status: synchronized//NTP状态
Clock stratum: 1 //NTP时钟层数
System peer: LOCAL(0)
Local mode: client
Reference clock ID: LOCL//参考时钟ID
Leap indicator: 00
Clock jitter: 0.000977 s
Stability: 0.000 pps
Clock precision: 2^-10
Root delay: 0.00000 ms
Root dispersion: 12.14600 ms
Reference time: debc0cd9.a3e27378 Fri, Jun 1 2018 18:20:09.640//参考时间

配置SWB
[SWB]ntp-service enable
[SWB]ntp-service unicast-server 192.168.10.1

[SWB]display ntp-service status
Clock status: synchronized
Clock stratum: 2 //时钟层次是2
System peer: 192.168.10.1
Local mode: client
Reference clock ID: 192.168.10.1//参考时钟ID
Leap indicator: 00
Clock jitter: 0.000977 s
Stability: 0.000 pps
Clock precision: 2^-10
Root delay: 0.13733 ms
Root dispersion: 18.50891 ms
Reference time: debc0e15.715ab3ea Fri, Jun 1 2018 18:25:25.442

[SWB]display ntp-service sessions verbose
Clock source: 192.168.10.1
Session ID: 26363
Clock stratum: 1
Clock status: configured, master, sane, valid
Reference clock ID: LOCL
VPN instance: Not specified
Local mode: client, local poll interval: 6//本地是客户端模式
Peer mode: server, peer poll interval: 6//对端是服务器模式
Offset: -2.051ms, roundtrip delay: 0.1373ms, dispersion: 2.7923ms
Root roundtrip delay: 0.0000ms, root dispersion: 13.656ms
Reachabilities:3, sync distance: 0.0185
Precision: 2^-10, version: 4, source interface: Not specified
Reftime: debc0e19.a40c85f3 Fri, Jun 1 2018 18:25:29.640
Orgtime: debc0e54.712e67d1 Fri, Jun 1 2018 18:26:28.442
Rcvtime: debc0e54.6f9ab578 Fri, Jun 1 2018 18:26:28.435
Xmttime: debc0e54.6f9ab578 Fri, Jun 1 2018 18:26:28.435
Roundtrip delay samples: 1.632 0.564 0.137 0.656 1.937 2.777 0.000 0.000
Offset samples: -6.24 -0.88 -2.05 -2.30 -2.28 -2.34 0.00 0.00
Filter order: 2 1 3 0 4 5 6 7

Total sessions: 1

配置SWC
[SWC]ntp-service enable
[SWC]ntp-service unicast-peer 192.168.10.2

[SWC]display ntp-service status
Clock status: synchronized
Clock stratum: 3 //时钟层数是3
System peer: 192.168.10.2
Local mode: sym_active//主动对等体
Reference clock ID: 192.168.10.2
Leap indicator: 00
Clock jitter: 0.003052 s
Stability: 0.000 pps
Clock precision: 2^-10
Root delay: 0.65613 ms
Root dispersion: 38.13171 ms
Reference time: debc0f15.2badc04b Fri, Jun 1 2018 18:29:41.170

[SWC]display ntp-service sessions verbose
Clock source: 192.168.10.2
Session ID: 40944
Clock stratum: 2
Clock status: configured, master, sane, valid
Reference clock ID: 192.168.10.1
VPN instance: Not specified
Local mode: sym_active, local poll interval: 6
Peer mode: sym_passive, peer poll interval: 6
Offset: 1.8083ms, roundtrip delay: 0.3051ms, dispersion: 2.3803ms
Root roundtrip delay: 0.1373ms, root dispersion: 29.891ms
Reachabilities:7, sync distance: 0.0368
Precision: 2^-10, version: 4, source interface: Not specified
Reftime: debc0f21.71986c1f Fri, Jun 1 2018 18:29:53.443
Orgtime: debc0f53.2b8d30b1 Fri, Jun 1 2018 18:30:43.170
Rcvtime: debc0f53.2c144a27 Fri, Jun 1 2018 18:30:43.172
Xmttime: debc0f53.2c144a27 Fri, Jun 1 2018 18:30:43.172
Roundtrip delay samples: 0.305 0.518 1.403 0.762 0.732 0.946 0.000 0.000
Offset samples: 1.81 -4.09 -1.75 -1.76 -0.94 -0.02 0.00 0.00
Filter order: 0 1 4 3 5 2 6 7

Total sessions: 1

实验任务二:带身份验证的NTP服务器/客户机模式和对等体模式基本配置

  1. 配置SWB上NTP身份验证功能
    [SWB]ntp-service authentication enable
    [SWB]ntp-service authentication-keyid 42 authentication-mode md5 simple 123
    [SWB]ntp-service reliable authentication-keyid 42
    2.在SWB上将指定密钥与NTP服务器关联
    [SWB]ntp-service unicast-server 192.168.10.1 authentication-keyid 42
    3.在SWA上使能NTP身份验证功能。
    [SWA]ntp-service authentication enable
    [SWA]ntp-service authentication-keyid 42 authentication-mode md5 simple 123
    [SWA]ntp-service reliable authentication-keyid 42
    4.配置SWC 使能NTP身份验证功能
    [SWC]ntp-service authentication enable
    [SWC]ntp-service authentication-keyid 42 authentication-mode md5 simple 123
    [SWC]ntp-service reliable authentication-keyid 42
    [SWC]ntp-service unicast-server 192.168.10.2 authentication-keyid 42

//模拟器做不成功。
NTP验证是客户端验证服务器是否有可信密钥

posted @ 2019-07-07 23:15  Akiz  阅读(255)  评论(0编辑  收藏  举报