xzf 发表于 2011-8-3 16:11:05

NTP 命令解释

快考ie了 做的笔记
文章源自上海亚威转载注明出处
硬件时钟
靠电池供电,当设备重启断电后,保持时间
软件时钟
在操作系统中设置,可以用来写入硬件时钟

当设备重启后,硬件时钟时钟用来初始化软件时钟

calendar 通常指硬件时钟
clock 通常说的是软件时钟
clock update-calendar 用软件时钟更新硬件时钟
Router# clock read-calendar
Sets the software clock from the hardware clock



命令

#calendar set设置硬件时钟
#clock set设置软件时钟
(conf)#clock timezone GTM +8 设置时区 东8区
ntp master 5   允许其他设备和我同步时间(我作为ntp master) (手动设置我的优先级为5)
##备: 如果我作为client 从maser 5同步了时间,则我的优先级就成为6,同时我也成为server,任何从我这同步时间的client 优先级为7,
##备:如果我从多个server同时同步时间,我优选优先级低的server 来学
ntp server 30.30.254.254 source lo0像30.30.254.254 同步时间(我作为client) 用lo0为源
(config)#ntp update-calendar硬件时钟 像软件时钟同步
(config)#clock calendar-valid开启允许其他设备同步我的硬件时钟
ntp authenticate 开启认证
ntp authentication-key 1 md5 cisco   md5认证 key1 密码cisco
ntp trusted-key 1使用key1 来认证


查看 sh np status
如果 出现 Clock is synchronized, stratum 6, reference is 3.3.3.3 就表示同步了

cec 发表于 2013-8-15 14:44:43

{:6_264:}

songhonghu 发表于 2013-10-17 09:39:39

cec 发表于 2013-8-15 14:44 static/image/common/back.gif


页: [1]
查看完整版本: NTP 命令解释