cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
157869
Views
31
Helpful
13
Replies

Forcing a time refresh (ntp) on switches

jpeterson6
Level 2
Level 2

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.

1 Accepted Solution

Accepted Solutions

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

HTH

Rick

View solution in original post

13 Replies 13

Richard Burts
Hall of Fame
Hall of Fame

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

HTH

Rick

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?

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

HTH

Rick

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

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

HTH

Rick

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

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

HTH

Rick

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

So its a bit tricky but not entirely true.  If you use the command clock read-calender it will force a sync.  

This was exactly what I was looking for!!! I had an router with NTP where the IP communication failed. I could rip out the ntp server command and re-add it, but just a simple 'nudge' to try again (since it doesn't seem to have a retry timer) is all I wanted. Only thing to note is the actual command is done in privileged exec mode, and it is spelled: clock read-calendar

"clock read-calendar" command will trigger a refresh of the router's NTP information

James Tuson
Level 1
Level 1

ntp update-calendar worked for me.

Note you have to be in configure terminal mode for that command to be available.

cybrsage
Level 1
Level 1

I know this is an old thread, but wanted to add the command needed to force a sync on the Nexus switches with software above the 5.x level.  You need to use ntp sync-retry.  That forces a NTP update.

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community:

Review Cisco Networking products for a $25 gift card