您好,欢迎进入北京泰福特电子科技有限公司官网

咨询服务热线

400-015-1230

思科高级路由NTP监控时间+NTP安全配置

发布时间:2022-04-11 15:51:45

Lab 74.Configuring NTP

实验需求:

1、了解配置路由器交换机的时间及时区命令。

2、熟悉NTP的配置过程。

3、掌握监控时间服务。

4、熟悉NTP的安全。

实验拓扑图:实验步骤及要求:

1、ping一下各路由地址看看是否畅通互通。

2、需在R2和R3路由器上设置差异化的时间来完整此次试验:

R2(config)#

R2(config)#clock timezone CHINA +8

R2(config)#exit

R2#clock set 1:00:00 1 sep 2007

R2#

R3(config)#

R3(config)#clock timezone CHINA +8

R3(config)#exit

R3#clock set 2:00:00 2 sep 2007

R3#

3、在R1上配置正确的时间,配置如下:

R1(config)#

R1(config)#clock timezone CHINA +8

R1(config)#exit

R1#clock set 11:45:00 11 sep 2007

R1#

4、查看三台路由器的时间:

R1#show clock detail

11:46:06.259 CHINA Tue Sep 11 2007

Time source is user configuration

R2#show clock detail

01:04:47.727 CHINA Sat Sep 1 2007

Time source is user configuration

R2#

R3#show clock detail

02:02:52.331 CHINA Sun Sep 2 2007

Time source is user configuration

R3#

5、配置R1路由器NTP时间服务器,配置如下:

R1(config)#

R1(config)#ntp authenticate

R1(config)#

R1(config)#ntp master

R1(config)#

R1(config)#ntp authentication-key 1 md5 cisco@server@key

R1(config)#

R1(config)#ntp peer 192.168.1.2 key 1

R1(config)#

R1(config)#ntp source serial 1/1

R1(config)#

6、配置R2路由器为NTP的中继路由器,其通过R1路由器,获得时间配置,然后将其广播给内部的其它路由器。配置如下:

R2(config)#ntp authenticate

R2(config)#

R2(config)#ntp authentication-key 1 md5 cisco@server@key

R2(config)#

R2(config)#ntp trusted-key 1

R2(config)#

R2(config)#ntp server 192.168.1.1

R2(config)#

R2(config)#ntp source fastEthernet 0/0

R2(config)#

R2(config)#ntp authentication-key 2 md5 cisco@client@key

R2(config)#

R2(config)#interface fastEthernet 0/0

R2(config-if)#ntp broadcast key 2

R2(config-if)#exit

R2(config)#

7、继续配置R3路由器为NTP的客户端。配置如下:

R3(config)#ntp authenticate

R3(config)#

R3(config)#ntp authentication-key 1 md5 cisco@client@key

R3(config)#

R3(config)#ntp trusted-key 1

R3(config)#

R3(config)#interface fastEthernet 0/0

R3(config-if)#ntp broadcast client

R3(config-if)#exit

R3(config)#exit

R3#

8、稍等一段时间,等待时间同步后,查看R1、R2与R3的时间信息,确认已同步:

R1#show clock detail

12:31:20.135 CHINA Tue Sep 11 2007

Time source is NTP

R2#show clock detail

12:31:29.061 CHINA Tue Sep 11 2007

Time source is NTP

R2#show clock detail

12:45:48.913 CHINA Tue Sep 11 2007

Time source is NTP

9、在R2上查看NTP的关联状态:

R2#show ntp associations

address ref clock st when poll reach delay offset disp

*~192.168.1.1 127.127.7.1 8 59 64 377 3.9 0.18 18.3

* master (synced), # master (unsynced), + selected, - candidate, ~ configured

R2#

10、查看R2的NTP的状态信息:

R2#show ntp status

Clock is synchronized, stratum 9, reference is 192.168.1.1

nominal freq is 250.0000 Hz, actual freq is 250.0012 Hz, precision is 2**18

reference time is CA909DAD.8651D35E (12:53:01.524 CHINA Tue Sep 11 2007)

clock offset is 0.1824 msec, root delay is 3.89 msec

root dispersion is 19.70 msec, peer dispersion is 19.50 msec

R2#

11、另外还可以使用如下命令调试NTP:

R2#debug ntp authentication

R2#debug ntp packets

12、为了保证NTP的规范使用,还建议在R2上配置ACL保护NTP的连接:

R2(config)#access-list 60 permit host 192.168.1.1

R2(config)#ntp access-group peer 60

13、就R3的端口来说,需要把临近服务器上的端口禁止NTP服务:  

R3(config)#interface fastEthernet 2/0

R3(config-if)#ntp disable

R3(config-if)#exit

14、实验完成。


  • 联系方式
  • 传 真:86-10-82782026
  • 电 话:400-015-1230
  • 地 址:北京市海淀区北清路68号院用友软件园北区17号楼三层
在线咨询

咨询电话:

400-015-1230

  • 微信扫码 关注我们

Copyright © 2002-2035 北京泰福特电子科技有限公司 版权所有 备案号:京ICP备12028220号-1
京公网安备 11010802025976号

扫一扫咨询微信客服

18519396506
Powered by RRZCMS