Configuring NTP on Cisco equpment?

Skillz'n Magic

Weaksauce
Joined
Mar 6, 2008
Messages
114
I'm having trouble getting our switches to synchronize their time with the routers. The routers will sync OK with our central time server but the switches won't sync with the routers. I want to setup a hierarchical system, so syncing the switches directly with the time server isn't an option.

On the switches I've tried the following commands (bogus IP address, and obviously only one command at a time):
ntp 192.168.1.1
ntp peer 192.168.1.1
ntp server 192.168.1.1

They don't sych and when I do a sh ntp status I get the following:

Clock is unsynchronized, stratum 16, no reference clock


I'm sure I'm doing something wrong. Any ideas?
 
From http://www.oreilly.com/catalog/hardcisco/chapter/ch10.html

"Synchronized router as a timeserver

Once a router is synchronized with another time source, either as a client or a peer, that router will automatically provide time synchronization for other systems. This allows you to use one or more routers as the primary time synchronization sources for your LAN. To do this:

1. Pick one, two, or three routers and have them synchronize to separate external time sources.

2. Configure your internal servers and systems to use these routers for their time synchronization.

TIP: Some low-end routers, such as the 1600 and 1700 series, don't support the full NTP protocol. They support only a stripped-down version called SNTP. SNTP is a client-only version of NTP and can be configured with the sntp server command. "
 
Code:
configure terminal

ntp server 10.3.1.20
ntp source Vlan13
clock timezone EST -5
clock summer-time EDT recurring

end

What type of device is your source NTP server? I have had problems syncing a Cisco device to a Windows machine. Replace the relevant items in the code above as needed.
 
I saw that article but I didn't notice the last point about the Router only supporting SNTP.

I have 3560 switches trying to update from 1760 routers. I bet that's why it's not working... I'll have to check that out.
 
My routers are updating from a Windows NTP server, and they work, but most are using SNTP. Can I update an NTP enabled switch from an SNTP enabled router?
 
In the past in situations where we had a VMware virtual infrastructure in place, I just create a 1 CPU/256mb virtual machine and used NTPD in Linux to provide the reliable time source. NTPD will work properly with both NTP and SNTP.
 
OK, well, since I'm new to NTP on Cisco devices here's what I've configured so far:

On the router at one of our remote locations I have it set to point back to our corporate time servers. The router is a 1760:
Code:
Router1#sh run | inc sntp
sntp server 192.168.1.250
sntp server 192.168.1.254

Here is the status of that router:

Code:
Router1#sh sntp
SNTP server     Stratum   Version    Last Receive
192.168.1.250       2         1        00:00:47
192.168.1.254       2         1        00:00:50    Synced
Everything looks good, it synced with one of our servers. Yay!


At that same location here is what I have the c3560 switch configured to (10.0.0.1 is that location's router in this example):
Code:
Switch1#sh run | inc ntp
ntp clock-period 36029309
ntp peer 10.0.0.1

Here is the NTP status:
Code:
Switch1#sh ntp status
Clock is unsynchronized, stratum 16, no reference clock
 
Can you check if your 1700 will do NTP? I have a 1710 doing NTP (based on its own hard-set clock), and a 2621 grabbing time from it, and another 2600 grabbing time from the first 2621)

R0#sh ver | inc IOS
IOS (tm) C1700 Software (C1700-SY-M), Version 12.1(27b), RELEASE SOFTWARE (fc1)
R0#sh run | inc ntp
ntp master 3
R0#sh ntp as

address ref clock st when poll reach delay offset disp
*~127.127.7.1 127.127.7.1 2 29 64 377 0.0 0.00 0.0
* master (synced), # master (unsynced), + selected, - candidate, ~ configured
R0#show nt sta
Clock is synchronized, stratum 3, reference is 127.127.7.1
nominal freq is 250.0000 Hz, actual freq is 250.0000 Hz, precision is 2**16
reference time is CBE02075.0101D529 (16:40:21.003 UTC Thu May 22 2008)
clock offset is 0.0000 msec, root delay is 0.00 msec
root dispersion is 0.02 msec, peer dispersion is 0.02 msec

Note that it takes a good 5 minutes to get it to update the clock.. it appears the NTP poller is in no hurry.
 
Back
Top