[lug] NTP with a GPS
Gary Hodges
Gary.Hodges at noaa.gov
Mon Apr 25 12:45:08 MDT 2011
I've been doing some testing, and have actually deployed at a couple
sites, a Garmin GPS 18x to keep the time set for one computer.
Everything was going OK, until the most recent case. At this site I
have the computer set up on the network, and had been keeping time set
with NTP to another machine that uses GPS. I don't know the physical
location of that machine, or anything about it actually. Due to network
rules, that was the only time server available to me. I hooked up a GPS
to my machine, figuring two is better than one, but I may have invoked
the adage "One clock is correct. With two both are wrong."
I logged on today to see how my new set up was working, and I found that
both time servers had an "x" preceding them when querying with ntpq -p.
remote refid st t when poll reach delay offset
jitter
==============================================================================
xSHM(0) .GPSe. 0 l 8 16 377 0.000 -65.986
29.232
x192.168.241.135 .GPS. 1 u 255 256 377 3.979 -11.009
18.461
My GPS is noted by GPSe. If I comment either one out in the ntp.conf
file, ntp works as expected. That is I get an "*" preceding the time
server. My assumption is that with a stratum 0 and 1 server available,
but with the difference in the offsets too great, it concludes neither
can be trusted and both are stamped with x.
I have played around with the time1 parameter in the ntp.conf file to
bring the offsets closer together, and that seems to work.
remote refid st t when poll reach delay offset
jitter
==============================================================================
*SHM(0) .GPSe. 0 l 2 16 377 0.000 -23.996
14.344
SHM(1) .GPSe. 0 l - 16 0 0.000 0.000
0.001
+192.168.241.135 .GPS. 1 u 252 256 177 4.132 -27.314
12.543
Here it has my GPS as the preferred time server, and the other is
indicated by the + as a high quality replacement candidate. Even though
I seem to have made it work, going forward I'm considering commenting
one out as there appears to be potential issues with using two time servers.
Is anyone here able to verify or refute my assumption about using two
time servers? Accuracy to within one second is more than sufficient for
my needs.
More information about the LUG
mailing list