system clock与system calendar分别
Manually
Setting the Software Clock
Month 必须是字母,不能是数字
Set
the Calendar from the Clock or NTP
Set
the system clock from the system calendar
Setting
the Router as a Network Time Source
当用ROUTER做NTP master,而他又不与其他外部TIME SOURCE同步时,就表示他采用的时钟是ROUTER自己的 system calendar,这就要求他必须要authoritative
clock
timezone
中国时区:beijing时间是GMT+8区
GMT时区设置:GMT为格林尼治标准时间,用户可以根据自己所在时区设置GMT时区
NTP同步,可以采用三种方法:
ntp
server是单向同步
ntp
server时,router是client mode 对端必须是ntp
master
ntp
broadcast
ntp
broadcast 的server端,必须还有正常的NTP配置(NTP SERVER/NTP PEER)
ntp
source
ntp source loopback 0
It
can be syncronize only if there is path between routers.
NTP同步经验
试验通过,ntp
server ...不管是对端lo0还是接口地址,都会同步
试验通过,ntp
server ... 与对端的ntp source interface没有任何关系
ntp
authentication 三步(别忘了trust-key)
ntp认证三大配置缺一不可,不能因为ntp server ... key 1 就不配ntp trust-key 1
prefer
(config)#ntp
server 3.3.3.3 ?
prefer Prefer
this peer when possible 配多个ntp
server时,取最优先的
system clock |
system calendar |
system clock是基于软件的 |
system calendar是基于硬件的calendar不受开关机和重起的影响 通常他只被设一次 |
clock set hh:mm:ss date month year |
clock update-calendar |
Set the Calendar from the Clock |
ntp update-calendar |
Set the Calendar from NTP 用NTP周期性更新system calendar |
clock read-calendar |
这语句使clock重读system calendar 通常是系统重起的时候,system clock读system calendar 进行clock inital. |
clock calendar-valid |
make the system calendar be authoritative Enables the router to act as a valid time source to which network peers can synchronize |
ntp master |
clock calendar-valid通常和ntp master一起使用 |
clock timezone |
|
GMT时区设置:GMT为格林尼治标准时间,用户可以根据自己所在时区设置GMT时区
clock timezone GMT 8 |
北京时间 |
- ntp server 10.1.1.1 [version ...] [key ...] [source ...(interface)] [prefer]
- ntp peer 10.1.1.1 [normal-sync][version ...] [key ...] [source ...(interface)] [prefer]
- ntp broadcast/ntp broadcast client
ntp server 10.1.1.1 |
ntp master |
int eth 0 ! ntp server 10.9.0.1 prefer |
int eth 0 |
ntp master ntp source loopback 0 |
-
ntp 同步绝对不要等超过三分钟,超过肯定有问题
-
ntp同步不要怀疑ntp server地址,能ping通即可
-
ntp source interface ...,配不配都与同步无关
ntp client |
ntp |
ntp server 7.7.3.3 source lo0 key 1 ntp authenticate ntp authentication-key 1 md5 cisco ntp trust-key 1 |
ntp master 2 ntp source lo0 ntp authenticate ntp authentication-key 1 md5 cisco ntp trust-key 1 |