Cisco IOS & ntp.
Cisco's IOS supports ntp although few seem to bother with it. If logs are important to you,
they are worth time stamping accurately, also few routers and switches are actually heavily
loaded so they make good ntp peers for other computers. This helps your overall time
accuracy. However if you have a really busy router or switch, it may exhibit considerable jitter. In
this case it is probably better to just have it receive time sync info, not contribute to
This is a snippet from an ios config, the ntp clock-period is added automatically. The ntp servers are the upstream servers and as such should not receive updates from lower stratum servers. Peers are nodes operating at the same stratum level and exchange time information between themselves. Consult www.ntp.org for design info for your time hierarchy.
Should external servers become unavailable, having internal peers helps regulate time. If you have dns configured on your ios device, you can use host names rather than ipaddresses (eg. ntp server tick.mediahub.co.uk). It is possible to configure ntp in a broadcast mode, however this could allow a rogue time source (person??) to interfere with timekeeping. IOS supports setting a time-zone and daylight saving but this is obviously dependent on where you are.
2520-core-router#conf t Enter configuration commands, one per line. End with CNTL/Z. 2520-core-router(config)#clock timezone GMT 0 2520-core-router(config)#clock summer-time BST recurring 4 SUNDAY MARCH 01:00 4 SUNDAY OCTOBER 02:00 60 2520-core-router(config)# 2520-core-router(config)#ntp peer 192.168.1.1 2520-core-router(config)#ntp peer 192.168.1.41 2520-core-router(config)#ntp server 192.168.1.105 2520-core-router(config)#ntp peer 192.168.1.51 2520-core-router(config)#^Z 2520-core-router# 2520-core-router#sh run ! clock timezone GMT 0 clock summer-time BST recurring 4 Sun Mar 1:00 4 Sun Oct 2:00 ! ... ! ntp clock-period 17179584 ntp peer 192.168.1.1 ntp peer 192.168.1.41 ntp server 192.168.1.105 ntp peer 192.168.1.51 end 2520-core-router#Testing that ntp is working correctly is done with show ntp status & show ntp associations. The most important thing to look for in status is that the clock reports that it is synchronized, it will also show the stratum level and its source of time (Clock is synchronized, stratum 4, reference is 192.168.1.105).
2520-core-router#sh clock 23:12:30.514 BST Sat May 28 2005 2520-core-router#sh ntp status Clock is synchronized, stratum 4, reference is 192.168.1.105 nominal freq is 250.0000 Hz, actual freq is 250.0041 Hz, precision is 2**19 reference time is C6435E5B.A210022B (21:17:15.633 UTC Sat May 28 2005) clock offset is 86.1367 msec, root delay is 48.28 msec root dispersion is 492.71 msec, peer dispersion is 53.88 msec 2520-core-router#The associations command lists the relationship to the other known ntp sources. An * indicates the selected master which should agree with the 1st line from sh ntp status shown above, + indicates hosts which would be suitable for masters. The meaning of this is as per the unix ntpq -p command, see www.ntp.org for more details.
2520-core-router#sh ntp associations address ref clock st when poll reach delay offset disp ~192.168.1.1 192.168.1.105 16 1020 64 377 6.2 59.40 16.3 +~192.168.1.41 192.168.1.105 4 37 512 377 6.6 128.92 10.2 *~192.168.1.105 126.96.36.199 3 887 512 377 3.9 86.14 10.5 ~192.168.1.51 188.8.131.52 5 1d 1024 0 5.6 -37.30 16000. * master (synced), # master (unsynced), + selected, - candidate, ~ configured 2520-core-router#