[CISCO] Force Time Update via NTP Server
Solved
lml-mike
Posted messages
449
Registration date
Status
Contributor
Last intervention
-
yaya1983 -
yaya1983 -
Hello,
I have migrated the logs from my Cisco routers to a centralized server on my network. For this, I used the following commands:
Since then, everything is working correctly, except for a few devices that cannot synchronize with the NTP server, probably due to the large time difference between the current date and that of the routers (some show the date of 2002!).
I would like to know if anyone knows a Cisco command that would allow forcing the update of the date and time of the Cisco routers on the NTP server. My searches have yielded nothing :S
Thank you so much!
I have migrated the logs from my Cisco routers to a centralized server on my network. For this, I used the following commands:
service timestamps debug datetime msec localtime show-timezone service timestamps log datetime msec localtime show-timezone clock timezone CET 1 clock summer-time CET recurring last Sun Mar 2:00 last Sun Oct 2:00 logging <ip> ntp server <ip>
Since then, everything is working correctly, except for a few devices that cannot synchronize with the NTP server, probably due to the large time difference between the current date and that of the routers (some show the date of 2002!).
I would like to know if anyone knows a Cisco command that would allow forcing the update of the date and time of the Cisco routers on the NTP server. My searches have yielded nothing :S
Thank you so much!
Configuration: 800 Series Routers
8 answers
-
NTP synchronization, when the time offset is significant, is slow. To speed up the time update of your device on the NTP server, you can use the command clock set (command mode). This allows you to manually set the time and thus reduce the time offset. Afterwards, the NTP synchronization will happen more quickly.
The command ntp update-calendar allows you to update the hardware clock (specific to the device) according to the software clock (the one learned from NTP). Thus, in case of a device reboot, the time from the hardware clock will match that learned during the last NTP exchange. The time offset will therefore be small (unless the device has been powered off for some time) and the NTP synchronization will occur rapidly. -
-
...
is there anyone who knows the command then? Maybe at least a place where I could get a bit of help :)
thank you! -
hello,
clock set ....
it should work.
--
and ... There you go! -
I don’t have the command "clock set", I only have:
clock initialize
clock save
clock summer-time
clock timezone
Thank you anyway for your support :) -
No,
In fact, I wanted my routers to refer to my "ntp server <ip>" for updates and force this update if it doesn't happen automatically.
Do you have any ideas? :$</ip> -
I will do my research to find a way to manually modify the time on the channel.
Indeed, based on the information I've gathered, we cannot force something that is supposed to happen automatically; it’s a bit like asking to force the time to move forward :P
Problem considered solved :) -
What I just did was to reconfigure the NTP server and then reconfigure it:
R2#conf t
R2(config)#no ntp server 10.1.1.1
R2(config)#ntp logging [I recommend this logs the NTP events]
R2(config)#ntp server 10.1.1.1
R2(config)#end
R2#copy running-config startup-config
In my case, it worked
If it didn't work, you could make R2 believe that it will synchronize with
another NTP server by taking another IP address from the same router
acting as the NTP server.