找回密码
 立即注册
搜索
查看: 34|回复: 1

配置NTP

[复制链接]

9

主题

4

回帖

105

积分

管理员

积分
105
发表于 2023-6-14 09:50:18 | 显示全部楼层 |阅读模式 来自 广东深圳
拓扑图:



R1配置:
  1. Router>en
  2. Router#conf t
  3. Enter configuration commands, one per line.  End with CNTL/Z.
  4. Router(config)#ho R1

  5. R1(config)#do clock set 10:00:00 14 jun 2023

  6. R1(config)#int g0/0
  7. R1(config-if)#ip add 172.16.1.1 255.255.255.0
  8. R1(config-if)#no sh

  9. R1(config-if)#
  10. %LINK-5-CHANGED: Interface GigabitEthernet0/0, changed state to up

  11. %LINEPROTO-5-UPDOWN: Line protocol on Interface GigabitEthernet0/0, changed state to up

  12. R1(config-if)#ex

  13. R1(config)#ntp master
  14. R1(config)#ntp authentication-key 1 md5 cisco 123
  15. R1(config)#ntp trusted-key 1
  16. R1(config)#ntp authenticate
复制代码



S1配置:

  1. Switch>en
  2. Switch#conf t
  3. Enter configuration commands, one per line.  End with CNTL/Z.
  4. Switch(config)#ho S1
  5. S1(config)#int vlan 1
  6. S1(config-if)#ip add 172.16.1.100 255.255.255.0
  7. S1(config-if)#no sh

  8. S1(config-if)#
  9. %LINK-5-CHANGED: Interface Vlan1, changed state to up

  10. %LINEPROTO-5-UPDOWN: Line protocol on Interface Vlan1, changed state to up

  11. S1(config-if)#ex

  12. S1(config)#end

  13. S1#ping 172.16.1.1

  14. Type escape sequence to abort.
  15. Sending 5, 100-byte ICMP Echos to 172.16.1.1, timeout is 2 seconds:
  16. .!!!!
  17. Success rate is 80 percent (4/5), round-trip min/avg/max = 0/0/0 ms

  18. S1#en
  19. S1#conf t
  20. Enter configuration commands, one per line.  End with CNTL/Z.
  21. S1(config)#ntp server 172.16.1.1 key 1
  22. S1(config)#ntp authentication-key 1 md5 cisco123
  23. S1(config)#ntp authenticate
  24. S1(config)#ntp trusted-key 1
复制代码

S1验证:

  1. S1#show clock
  2. *0:53:36.585 UTC Mon Mar 1 1993

  3. S1#show ntp status
  4. Clock is synchronized, stratum 4, reference is 172.16.1.1
  5. nominal freq is 250.0000 Hz, actual freq is 249.9990 Hz, precision is 2**24
  6. reference time is E80B38FA.0000036D (10:39:54.877 UTC Wed Jun 14 2023)
  7. clock offset is 0.00 msec, root delay is 0.00  msec
  8. root dispersion is 10.35 msec, peer dispersion is 0.12 msec.
  9. loopfilter state is 'CTRL' (Normal Controlled Loop), drift is - 0.000001193 s/s system poll interval is 4, last update was 1 sec ago.

  10. S1#show clock
  11. 10:39:49.935 UTC Wed Jun 14 2023
复制代码


本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有账号?立即注册

×
站长提醒
请您在发表言论时,遵守当地法律法规。

0

主题

1

回帖

23

积分

新手上路

积分
23
发表于 2023-6-14 11:41:20 | 显示全部楼层 来自 广东深圳

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

Archiver|手机版|小黑屋|爱学习

GMT+8, 2025-12-16 05:26 , Processed in 0.027113 second(s), 21 queries .

Powered by Discuz!

Copyright ©2023 红旗在飘扬 , All Rights Reserved.

快速回复 返回顶部 返回列表