Display the system clock
Use the show clock command in EXEC mode, enter:
show clock
OR
show clock detail
The last example will show the clock source (such as NTP) and the current summer time setting etc.
Set the system clock manually
To set the time use the following 24 hour time format:
clock set 20:30:13 July 2009
The syntax is as follows:
clock set hh:mm:ss day month year
OR
clock set hh:mm:ss month day year
Set the system clock via NTP server
The more recent versions of IOS (version 10+) support NTP version 4.
To make your router synchronize with a ClockWatch NTP server with the IP address of 192.168.1.1, use the IOS commands:
Router> enable
password: *********
Router# config t
Router(config)# ntp server 192.168.1.1
Router(config)# exit
Router# wr mem
The NTP server command forms a server association with the ClockWatch server. The Cisco router then goes through the process of validating the ClockWatch server. This may be immediate or take several minutes. You can confirm it has been synchronized by showing the NTP associations:
Router>show ntp associations
address ref clock st when poll reach delay offset disp
*~192.168.1.1 .CLKW. 1 35 64 377 23.9 -0.45 1.2
The star (*) displayed next to the configured (~) peer indicates the router is synchronized with ClockWatch. A pound sign (#) indicates that the router isn't syncing with ClockWatch even though NTP request and response packets are being exchanged. In this case, check the output of the show ntp associations detail command or enable the NTP debugs to see why the clocks aren't syncing.
One possible reason for the failure to sync is that the NTP client's clock differs by more than 4000 seconds from ClockWatch's clock. On Cisco routers, a time difference of greater than 4000 seconds is considered out of range, and prevents the router from syncing to the server. This doesn't apply when you first configure an NTP peer on a Cisco router or at a reload. In this case, the NTP client's (the Cisco router's) clock is changed to match the NTP server's clock, no matter how large the difference.
Tips:
- Check that ClockWatch Server has been synchronized to an external timeserver within the last 24 hours. This is a NTP server qualification requirement of the Cisco NTP client implementation.
- ClockWatch does not support authentication. Turn off authentication by issuing the IOS configuration command no ntp authentication. Authentication is normally turned on in IOS version 12.4 and above.
- You can manually change the client's clock (using the clock set command) to within a few minutes of the ClockWatch Server's clock to facilitate the synchronization.
- Make sure you check the time zone of the client's clock; local time is displayed, but time values in NTP messages are stored in UTC (GMT).
Source Links:
No comments:
Post a Comment