Network Time Syncronization via GPS?
TrAvELAr asks: "I run a rather large network for a research company and I have been tasked with a project to ensure that the time is accurate on all of our studies. Right now, I am using the time service built into Windows 2000 to sync all of our workstations with one of our servers. My problem lies in the fact that I can't prove that the time on my server is accurate. Because of the nature of our research, our network is not allowed to access the internet, thus ruling out synchronization to NIST and other time servers. I've been toying around with the idea of syncing it via GPS. I've done some research on the net and found a couple of places that offer packages for this at a fairly high price. I believe that this is something that I could do myself if I could find the right interface software. Has anyone out there had any experience with this type of project? I would appreciate any feedback/suggestions from anyone out there who has implemented/maintained a similar system."
Windows net time
Real synching of clocks can be done with NTP, the network time protocol. And yes, it can sync one computer's time to GPS...
Read the FAQ for more information... and the newsgroup comp.protocols.time.ntp is read by many helpful people! .
Here is one from NIST, detailing differnt ways (you could always use a modem, the cheap route):http://www.boulder.nist.gov/timefreq/genera l/pdf/834.pdf
And here is a German company that makes a ISA card:http://www.quancom.de/quancom/quancom01.nsf/
Uh-huh. No.
SIG: HUP
We run a secure datacentre and provide a Stratum-1 time source using a Lantronix Network Time Server (CoBox-NTP-E1) [about $1,500.]. It is a network-attached device with an IP that broadcasts the time to a second level time server. It has an attached cable that goes to a GPS antenna that receives the signal. The only problem with these devices is that the antenna obviously has to be _outside_ of the computer room to get a good signal, which can be a problem with some people who have already sealed up their Lampertz bunkers!
Anyways, it works great, no signal drift, and, as a previous poster mentioned, NTP is a MUST to ensure that the signals on all the Windows domains, firewalls, switches and anything else looking at the Stratum-2 server don't drift in their own merry direction with periodic "violent" recorrections to the correct time.
There are 3 excellent white papers from SUN detailing how NTP works, which is much more complex than you might initially think. See:
http://www.sun.com/blueprints/0701/NTP.pdf
http://www.sun.com/blueprints/0801/NTPpt2.pdf
http://www.sun.com/blueprints/0901/NTPpt3.pdf
for good info on how to do this properly. Lots of fun!
-wjc.
"I figure you're here 'cause you need some whacko who's willing to stick his finger in the fan. So who are we helping?
Others have suggested buying a "time appliance" that will give you a local stratum-1 NTP timeserver.
It sounds like you are looking for something that can be done cheaper...
You MAY be able to use an ordinary handheld GPS receiver as a Timeserver. Many handhelds come with a NMEA (National Maritime Electronics Association) interface that allows you to interface with your computer or the navigational systems on a boat or aircraft.
I believe you can get the protocol specs at www.nmea.org, if not google for it. Once you have the specs, it shouldn't be that difficult to write a program to set the clock on your timeserver in C or Perl!
Conformity is the jailer of freedom and enemy of growth. -JFK
I use the Lantronix CoBox E1.
It's relatively inexpensive (~$1500 w/GPS antenna and cable last time I checked) and seems to work well.
The best way to set this particular box up is to have ntp running on a regular server, and have that server get it's updates from this box while other clients get their update from the server. This unit doesn't seem to scale well to provide a time source for a lot of clients.
If you're really paranoid, you could simultaneously set up a system to check NIST signals for time and then let GPS and NIST duke it out in your ntp server.
"But actually trying to use m4 as a general-purpose langage would be deeply perverse" --ESR
I've never owned one of these things, but a company called Exit Consulting claim to make a GPS clock accurate to a millionth of a second. Suprisingly enough the URL for their product is http://www.gpsclock.com/ :> The price is about $380usd for a unit (some assembly required), and they provide everything you need to get this running as a Stratum 1 NTP server.
:wq
How much accuracy do you need?
Every GPS on the market with a serial port outputs NMEA format messages (well, almost all, check before you buy). Those messages contain the current time in nice easy-to-read ANSI text.
Here's an example:
$GPGGA,162245.00,4842.6942,N,11342.9476,W,1,05,
The second field there is the time HHMMSS.SS. Here's a link to the NMEA protocol:
http://www.starlinkdgps.com/manuals/invictaprot
If you need more accuracy than that, you could get a GPS with a 1PPS output - the Motorola Oncore series comes to mind. Prices are pretty cheap, though not as cheap as your average consumer model. Tie the 1PPS output to a serial port's DTR line and write a small driver to read the value. Latency of that driver is the prime determinate of your accuracy at that point.
1. 2.
You might not be able to have internet access, but what about a standard voice line?
NIST has an Acutomated Computer Time Service (ACTS) that you can call with a 300-9600 baud modem. (The full data is only available at 1200B or higher.)
If a modem is also out, you may be still be able to use this by setting up a special-purpose system that has a modem, but all network services are disabled except NTP. Delete the binaries for all other network services, seal it in a plywood box, and it will be hard to distinguish from one of the GPS or wireless time servers.
As a worst case scenario, once a week call 303 449 7111 (NIST phone service for WWV), set your watch, then walk into the computer room to set the time server's time.
For every complex problem there is an answer that is clear, simple, and wrong. -- H L Mencken
Hello. If you are a do-it-yourselfer, I wrote the programs that you can find at:
http://www.floatingdoghead.net/source
The TractorBeam program with my mod to serial.c for the 2.2.19 kernel is posted there. This is free hackware under the GPL. It works in conjunction with the affordable Delorme EarthMate GPS receiver.
I have not worked on this code for over a year, so I'm a little rusty on it. I never tested what happens when DST kicks in, but as I remember, all computations are done in regards to UTC, so it may be a non-issue. I keep my firewall set to UTC as a matter of course. This program (and the associated kernel module) keep the clock swings within a couple of mS. You may need to apply a delta correction if you are concerned with absolute synchronization. When I wrote this, I was more concerned with eliminating drift as much as possible, and not in attaining absolute time sync.
Cheers.
2 years ago I wrote a small C program to synchronize a Windows PC to a Trimble GPS: easy. A RS232 library, a quick look at the Trimble communication protocol and it was done in under 4 hours.
Last week I've been synching my SGIs using ntp (Network Time Protocol) and I saw in the documentation that it can also synch to a GPS. Didn't look at the details though, but probably through the serial port. And ntp is free.
Non-Linux Penguins ?
I use a program called "Tardis 2000" from H. C. Mingham-Smith, Ltd. in Berkshire, England. It's shareware, so you can use it now; for the honest, it only costs $20. It will interface with a standard NMEA GPS (which most are), so you can solve your problem for the cost of the software and a $200 commodity consumer GPS with a serial cable. (I'd suggest you get one with an external antenna option.) Heck, it'll even run as an NT/2000 service, so you don't get clutter in your system tray.
(According to it, my clock drift is 4.703 seconds per day, based on time signals from tick.usno.navy.mil -- do you need thousandths-of-a-second accuracy? I sure don't! I think it shows the general precision of a computer's clock, though.)
The GPS time units I suspect you've looked at are paired with, I believe, a disciplined frequency standard. IIRC, it's nothing much more than an oven-regulated quartz crystal and a huge price tag. Yes, they are extraordinarily accurate and precise, but the clock drift that'll occur between your workstations' time synchronizations will completely negate the ridiculous accuracy of such a device. Don't waste your money, if you need "precise time, accurate to ±1 second," then you're set for about $220 to $250.
Besides, I love the name -- it's so perfectly appropriate.
"...America's great minds of today, teaching America's great minds of tomorrow. Poor bastards." -- A Beautiful Min
Uh-huh. No. -- autocracy
you are a complete idiot. -- AC
Moron -- AC
Excellent rebuttals, folks. Whoever said the art of conversation was dead?
"Your superior intellect is no match for our puny weapons!"
Back in the mid-80s, HeathKit used to sell a clock kit that would sync to the RF time broadcasts from the atomic clock in Ft. Collins. A little googling around yielded this link and this link and also this link (those last two look like they could be different fronts for 1 company). It's a "cooler" design than the old HeathKit one, which was blocky and looked like a typical "kit" deal, and I'd probably call to make sure it just sends a burst of ascii data down the serial port if you feel like rolling your own software, but it seems to come with Dos, Win3.1, 95/98, and NT software, as well as docs on the exchange protocol the clock uses. At $100, it's probably one of the cheaper solutions out there, and assuming you have a free serial port (which it sounds like if you're planning to use GPS), probably a fairly painless operation.
:-)
Now that I think about it, I might get one of these for myself, and stop relying on NTP.
"The urge to save humanity is almost always a false front for the urge to rule." --H.L. Mencken
If you can't hook it to a wire network that you could firewall and secure 10 ways to Sunday, why are you willing to listen to public broadcasts to get your time? Seriously, just build a box with two NICs, and use your firewalling software of choice to allow the 'external' NIC to only get a timestamp, and block everything incoming, and the 'internal' nic to only answer requests for NTP.
Vintage computer games and RPG books available. Email me if you're interested.
You can get time from GPS with a $150 Earthmate GPS receiver (semi-happy owner: it's inexpensive, but not a Garmin). However, there are two problems.
First, you need to get the receiver in a place where it can see a big portion of the sky. A window in a building may be enough to get the time and keep it synced, but that's about it. The roof is a better place.
Second, if you get one of the real expensive GPS receivers, you get better precision and an antenna you can put on the roof, but you're paying through the nose (compared to $150).
hope this helps.
However, I'm told that cheap GPS units often have feeble processors with pretty lousy software that gives low priority to some things that really ought to be important. I seem to recall mention on the navigation mailing list that some units have errors of as much as 4 seconds on their LCD time displays.
I guess that the moral is you should be careful what you buy. If I were going to go the GPS route, I'd hook my shiny new Garmin up to the serial port of a machine running NTP to a level-1 or level-2 server. Then I'd whip up a little test program that compared the NMEA time to the NTP-synced time. If it was accurate over a period of several days, then I'd trust the setup. If not, I'd return the damned thing and try another.
I belive you can get a PCI card that tunes to the attomic clock.
seems like it would be cheaper not to mention easyer. no cables to run or hook up and less software to configure.
doing it via gps would be a cool hack though.
Check out http://www.analogx.com/contents/download/network/a ts.htm, the program can get it's time from you, the NIST servers (i.e. use a laptop to get the time from the internet and then use it's corrected time to set the time on your primary server.) or from your GPS solution.
I consider this article from Dave Mills must reading.
Also, if you go to google and search all articles in comp.protocols.time.ntp from 2001/12/31 to 2002/01/05 you'll notice a lot of threads about the GPS bug that bit many.
Imagine your entire network going ape shit setting their clocks to some insane value and what that would have on, for example, audit records on your databases...
Like the man said, NTP can sync to GPS. No need to go out on the Internet to do that. The internal network can then sync to the internal, GPS-connected NTP master.
- A.P.
"Remember when the U.S. had a drug problem, and then we declared a War On Drugs, and now you can't buy drugs anymore?"
Look into NTP. Its low level protocol is not about setting the time but finding out how far wrong the local clock is by using other clocks that aren't quite right either. Most versions of NTP know how to speed up or slow down the local clock to help bring it into the correct time. This only works for machines that are always on and in a enviroment with a stable temperature. Other time protocols are based on the concept that one clock is always right and there is a cascade of error.
.5 seconds a day. A typical pc will drift about two minutes in a month.
All current versions of cisco IOS do NTP. If you have serveral routers, tell them all to do NTP. I tell all my boxes that their ntp server is their default router to make life easy. The problem is they will need a time source and you said you can't connect the net. If you have a big cisco router, you may be able to hook a GPS clock up to it. You could hook up another server that gets its time from GPS or WWV or dialing into the US navy or temporary connection to the net and using ntpdate. The routers will help smooth out the time jumps and the other server will keep the time within a second.
The serial NMEA sequences out of most GPS recivers are not very good and tend to cause NTP to drift. Motorola used to make a GPS reciver just for time but they no longer make it. If your looking at just using any GPS, the $160 Garmin GPS 17 can be mounted on a pole outside and has RS-232 out. If your more into raw electronic modules, their GPS 25 has a 1hz signal out.
I've got two solaris servers at work that I use ntpdate to force a time update using cron. One drifts 2 seconds a day and the other
Remember lighting likes antennas. GPS antennas tend to work better in out of the way places than WWV antennas. A GPS antenna will work with just a 45 degree cone view of the sky.