SW#configure t
#设置时间区域为东8区
SW(config)#clock timezone GMT 8

#设置时间与时间服务器192.168.2.242的时间同步
SW(config)#ntp peer 192.168.2.242

SW#copy run star

SW#exit



ntp server 本设备通过远端时钟源,来更新自身的时间,单向.
ntp peer 本设备既可以接受时钟同步,也可以给远端设备提供时钟,双向


cisco2950交换机系统时间和日志时间为什么不一致呢?
交换机log的时间是设备开机后运行的时间,所以跟系统时间不一致。
思科交换机日志记录配置 在全局配置模式下敲入下面命令
service timestamps log datetime localtime