03-22-2007 11:11 AM - edited 03-05-2019 03:03 PM
Hello all,
I am tinkering with ntp services and ran into a bit of a roadblock when it comes to verification that everything is running.
Is there a command in the IOS (12.8) that forces the switch to contact the ntp server it's pointing to in order to update the time? I know there is a windows command to do it so I'm kind of crossing my fingers here.
Thanks in advance.
Solved! Go to Solution.
03-23-2007 09:43 AM
Jeff
It is good to know that if you configure the switches to learn time from the linux box that it does work. A router or switch that is configured to process NTP will not associate or sync to a device that is runnging SNTP.
If you are concerned about the processing load of NTP you might consider setting up a hierarchial organization: have 2 or 3 switches sync to the primary NTP server, and divide the other switches up so that one group learns time from the first switch, another group learn time from the second switch, and so on.
HTH
Rick
03-22-2007 11:27 AM
Jeff
I am not aware of any command in IOS that will force the device to contact the NTP server. If you want to verify that your device is communicating with the NTP server you might try the show ntp association and compare the value of when and of poll (when should be less than poll). Or you could try show ntp association detail and look at the qualities describing the server.
If you really need to verify that it is working and the show commands are not enough, then the closest thing that I can think of would be to remove the configured ntp server, verify that there is no association, reconfigure the ntp server, and wait for the association to form again.
HTH
Rick
03-22-2007 12:35 PM
Rick,
Thanks. I tried that command and as a result it's displaying the configured ntp server, but the reference clock shows 0.0.0.0.
I also tried 'show ntp stat' and it's saying the clock is unsynchronized, no reference clock.
Any insight on how to configure/update a reference clock?
03-22-2007 12:42 PM
Jeff
You do not configure the reference clock. You learn it from the NTP server when you communicate successfully with it. If the reference clock is 0.0.0.0 and if ntp status says unsynchronized then these are signs that your ntp configuration is not working.
Probably one of the most common issues in failure of NTP is a problem with IP connectivity. Can you verify that you have good connectivity to the NTP server (and that it has good connectivity to you). A second common issue with NTP (especially when the NTP server is external to your network) is that an access list or a firewall rule is not allowing the NTP to get through.
HTH
Rick
03-23-2007 08:24 AM
Hey Rick,
Thanks for the pointers. I did some tinkering and I managed to have the reference ID show up on the show ntp stat command. However it still is not associating. When I type show ntp associations it lists the configured ntp server but it is not listing it as 'Master' (with the asterisk), it only lists it as 'Configured'.
I know this is still a problem with the actual NTP server, but I was wondering if you've run into this before (or anyone else reading this). This is on a Windows 2k workstation (not server). Also I have tested IP connectivity but it works, the server and switches are all on the same subnet. There are no problems with the ACL's either for the same reason.
I've also done some packet capturing with Ethereal. The ntp server is now sending the correct time information in the packets, as well as the reference ID as I mentioned.. but it's still not updating the time on the switch. I'm pretty baffled at this problem.
Any input is appreciated, thanks!
-Jeff
03-23-2007 09:05 AM
Jeff
The information about the NTP server is potentially helpful. Are you saying that the NTP server is a W2K workstation? Are you running anything on the workstation to generate NTP? I believe that Windows natively runs SNTP and not NTP.
HTH
Rick
03-23-2007 09:23 AM
Yes it's a workstation and not a server. So are you saying that if it's SNTP and not NTP then it won't synchronize with the switches?
Also keep in mind that this isn't our actual primary ntp server that I'm working with. It's the Ciscoworks server - I just want to get the updates from this one so the primary ntp server isn't swarmed with 200 switches for ntp updates. I went into one of the switches and changed the ntp server to the primary and it synchronized immediately.. primary server is a linux box, so if you're saying SNTP doesn't work with the switches then that would certainly make sense.
Jeff
03-23-2007 09:43 AM
Jeff
It is good to know that if you configure the switches to learn time from the linux box that it does work. A router or switch that is configured to process NTP will not associate or sync to a device that is runnging SNTP.
If you are concerned about the processing load of NTP you might consider setting up a hierarchial organization: have 2 or 3 switches sync to the primary NTP server, and divide the other switches up so that one group learns time from the first switch, another group learn time from the second switch, and so on.
HTH
Rick
03-23-2007 09:49 AM
Rick,
You are awesome, thanks. I'm going to have to decide what I want to do from here - I may end up installing NTP on this box if I decide that I want to keep the switches pointing to this server. It's great to know that the cause of the problem was the SNTP itself.
Thanks again!
Jeff
11-10-2016 10:09 AM
So its a bit tricky but not entirely true. If you use the command clock read-calender it will force a sync.
02-21-2018 01:10 PM
07-12-2021 02:56 AM
"clock read-calendar" command will trigger a refresh of the router's NTP information
09-20-2018 08:17 PM
ntp update-calendar worked for me.
Note you have to be in configure terminal mode for that command to be available.
11-03-2023 10:38 AM
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide