NTP 时间同步协议配置

本文主要介绍了NTP时间同步协议的配置方法,包括在不同设备如Cisco路由器和Linux系统上的设置步骤,以及在遇到问题时的排查和解决策略。

时间同步对于大的网络中是必须的。用来排错时看日志用的。

R1 ---------   R2---------- R3(Server)

R1:BT无线网络破解教程 
clock timezone CHINA 8// 时区
interface Serial1/1
ip address 172.16.1.1 255.255.0.0
ntp broadcast client     配置本地路由器为NTP客户端,接受NTP的时间广播信息来配置本地时间
router rip
network 172.16.0.0
ntp server 192.168.1.3 // 指定服务器IP

R2:
clock timezone CHINA 8// 时区
interface Serial1/1
ip address 172.16.1.2 255.255.0.0
interface Serial1/3BT4
ip address 192.168.1.2 255.255.255.0
ntp broadcast client     配置本地路由器为NTP客户端,接受NTP的时间广播信息来配置本地时间
router rip
network 172.16.0.0
network 192.168.1.0
ntp authentication-key 1 md5 cisco
ntp authenticate
ntp server 192.168.1.3

R3:
interface Serial1/3
ip address 192.168.1.3 255.255.255.0
router rip
network 192.168.1.0
clock timezone CHINA 8// 时区思科学习视频资料下载中心
ntp authentication-key 1 md5 cisco
ntp authenticate
ntp source Serial1/2      配置NTP与NTP通信的源地址
ntp master                配置自身为权威的NTP服务器


实验结果:
R1#sh clock

00:07:51.242 UTC Mon Mar 1 1993

R2#sh clock 
*00:03:09.359 UTC Mon Mar 1 1993


在R3上设置:

R3#clock set 13:34:50 sep 27 2008


过几分钟(NTP协议收敛很慢,大的网络可能要等上半个---一个小时)

R1#sh clock 思科路由器配置
13:44:54.692 UTC Sat Sep 27 2008

R2#sh clock 
13:44:46.638 UTC Sat Sep 27 2008


R1#sh ntp status 
Clock is synchronized, stratum 9, reference is 192.168.1.3
nominal freq is 250.0000 Hz, actual freq is 249.9999 Hz, precision is 2**18
reference time is CC88B769.D3212DD4 (13:45:13.824 UTC Sat Sep 27 2008)
clock offset is -40.5541 msec, root delay is 15.95 msec
root dispersion is 1967.65 msec, peer dispersion is 1927.06 msec

R2#sh ntp status 思科路由器
Clock is synchronized, stratum 9, reference is 192.168.1.3
nominal freq is 250.0000 Hz, actual freq is 249.9989 Hz, precision is 2**18
reference time is CC88C252.CDB8FCFF (14:31:46.803 UTC Sat Sep 27 2008)
clock offset is -48.3540 msec, root delay is 15.93 msec
root dispersion is 77.47 msec, peer dispersion is 29.08 msec

相应的查看与调试命令:思科路由器交换机模拟软件
show clock detail
show ntp associations
show ntp status
debug ntp packets 
debug ntp authentications
可在客户端没用的接口关闭NTP服务。ntp disable

linux 论坛   思科论坛    Cisco
  张sir CCIE R&S v4.0  课程视频总集
  Cisco N7K 的硬件架构 Cisco R&S N4 版本解密视频分享  CCIE Security 2009 IOS防火墙合集
  http://bbs.net527.cn/forum-26-1.html
  http://www.net527.cn/a/luyoujiaohuan/index.html 
 http://www.net527.com 
阅读(735) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~
评论热议
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值