cisco 3750G-24TS-E交换机配置ntp

1、配置LINUX下时间服务器
在WINDOWS DC上使用的是sntp所以,可能会出现时间无法同步。
#yum install ntp
#cat /etc/ntp.conf
restrict 127.0.0.1
restrict -6 ::1
#允许以下网段与这个服务器同步
restrict 192.168.0.0 mask 255.255.0.0 nomodify notrap
restrict 172.16.0.0 mask 255.255.0.0 nomodify notrap
server 192.168.0.14
server s1a.time.edu.cn
server s1b.time.edu.cn
server s1c.time.edu.cn
server s1d.time.edu.cn
server s2a.time.edu.cn
server  127.127.1.0     # local clock
fudge   127.127.1.0 stratum 3
driftfile /var/lib/ntp/drift
keys /etc/ntp/keys
logfile /var/log/ntp.log
然后运行ntpstat查看是否正常。如果出现异常请确认 ps -ef|grep ntp查看是否有多个NTP在运行,KILL后在试。
2、CISCO交换机上的配置
#conf t
#ntp server 192.168.0.144 (linux服务器的IP地址)
#ntp source Vlan303
#clock timezone CST +8 (配置时区)
注:linux服务器所在的vlan,这个很重要不然会出现:Clock is unsynchronized, stratum 16, no reference clock ,我就是因为在这里配置错误搞了很久导致一直无法配置成功,后来想到NTP的源设置为服务VLAN所的IP段试了一下就成功了。
#sh ntp stat
Cisco-Switch-GS01#sh ntp stat
Clock is synchronized, stratum 5, reference is 192.168.0.144
nominal freq is 119.2092 Hz, actual freq is 119.2081 Hz, precision is 2**17
reference time is CEEBDFD3.D7C9E64D (11:32:35.842 CST Mon Jan 4 2010)
clock offset is 19.2482 msec, root delay is 2.70 msec
root dispersion is 32.24 msec, peer dispersion is 1.54 mse
Cisco-Switch-GS01#sh ntp associations detail
192.168.0.144 configured, our_master, sane, valid, stratum 4
ref ID 127.127.1.0, time CEEBDFF0.09B4CABB (11:33:04.037 CST Mon Jan 4 2010)
our mode client, peer mode server, our poll intvl 64, peer poll intvl 64
root delay 0.00 msec, root disp 11.44, reach 377, sync dist 13.962
delay 2.76 msec, offset 19.6555 msec, dispersion 1.14
precision 2**20, version 3
org time CEEBE013.DF990448 (11:33:39.873 CST Mon Jan 4 2010)
rcv time CEEBE013.DAEB635E (11:33:39.855 CST Mon Jan 4 2010)
xmt time CEEBE013.DA330A7E (11:33:39.852 CST Mon Jan 4 2010)
filtdelay =     2.76    2.70    2.35    1.85    2.91    2.00    1.14    2.73
filtoffset =   19.66   19.25   18.74   18.13   16.32   15.28   14.01   10.71
filterror =     0.02    0.99    1.97    2.94    3.92    4.90    5.87    6.85

你可能感兴趣的:(ntp,Cisco,休闲,交换机,3750G-24TS-E)