First off let me start by saying that I am not sure that these commands only work on Catalyst switches, nor and I sure that these commands only work on switches, they may work on routers as well, however I have not gotten that far in my HomeLab escapades.
What do know for a fact is that Cisco loves documentation, very, very verbose documentation, which honestly I cant say that I always have time or energy for. Cisco documentation is like drinking from a fire hose. Seriously I do not need to learn everything about this switch in one sitting.
Anyway – lets talk about Time, Date, and NTP.
To figure out what time your device thinks it is, use the command below.
12:58:28.929 CDT Wed Aug 21 2013
To set the clock use the command below, subsitute the correct time dingbat
s-3560-1.localdomain#clock set 12:58:28 21 Aug 2013
In conf t mode you can configure an ntp server to sync with, see below.
s-3560-1.localdomain(config)#ntp server 192.168.0.10
You can also configure your device as an ntp peer, but we are not going to go into that here.
To verify that you are now syncing with 192.168.0.10, use the command below.
s-3560-1.localdomain#show ntp associations
address ref clock st when poll reach delay offset disp
~192.168.0.10 188.8.131.52 2 56 64 3 2.735 330586. 3937.9
* sys.peer, # selected, + candidate, – outlyer, x falseticker, ~ configured
To see a more detailed status for ntp use the command below.
s-3560-1.localdomain#show ntp status
Clock is unsynchronized, stratum 16, no reference clock
nominal freq is 119.2092 Hz, actual freq is 119.2085 Hz, precision is 2**17
reference time is D5BF7032.1462968F (12:58:26.079 CDT Wed Aug 21 2013)
clock offset is 0.0000 msec, root delay is 0.00 msec
root dispersion is 3.37 msec, peer dispersion is 0.00 msec
loopfilter state is 'CTRL' (Normal Controlled Loop), drift is 0.000006336 s/s
system poll interval is 64, last update was 227 sec ago.