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/
I recently saw a wall clock with similar "atomic" time-setting capabilites here in the US. I'm betting that if they can do it for around $30, then a computer interface to such a thing must be pretty cheep too. I don't think they used GPS for it (the clock wasn't expensive enough).
t m
http://www.simplyradios.com/acatalog/rev99193.h
The question posed in a previous Ask Slashdot prompted some possible solutions that might be helpful to your particular problem.
Try this one, it's pretty inexpensive. If you account for the time you'd spend DIY this might be the better option...
There are clocks you can buy that set their time via radio waves -- http://www.howstuffworks.com/question461.htm has some info. Maybe somebody makes a PCI card or other device that allows you to do this on a computer.
rooooar
Well, the super easy way would be to get *one machine* connected to NIST, and attach a wireless card to it. Have it ping out the time every few milliseconds.
The other machines could have wireless cards too, but alter the driver such that it can't do anything but listen for this one signal, and can't actually send any data or recieve anything but the ping.
This way you get the security of non-connected machines, but the accuracy of a clock synched over the internet, and it'll set you back a couple hundred dollars at the most.
"Your superior intellect is no match for our puny weapons!"
There are devices that plug into servers and PCs that let you set time from broadcasted NIST time signals.
NIST used to have a modem dial-in time server, but I'm not sure of its whereabouts as of late.
that comes bundled with Win2K. Configure the service to start automatically (it's set for manual start by default), and use net time /setsntp to set the NTP server(s) you want to sync to.
/setsntp cmd) to use your time server.
You can select one machine to be the master server for your network -- set its NTP server to one on this list, and enable it as an NTP server (some registry setting I can't remember). Then set the other machines (via the net time
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
Given the specialized nature of your research, you must have a budget for this. Don't go cheap -- TrueTime (www.truetime.com) (and I'm sure others as well) has boxes that have a GPS antenna for $3-4K. Set up NTP on the boxes (tardis and others on windows, ntp from u of delaware for all *nix), point them at the GPS box.
Some of their boxes have modems to dial direct to a phone line NIST has set up for the purpose, to check other NTP servers to compare times (not really useful to you).
I have also seen, but lack links for, similar boxes with atomic clocks right in the case, likely in the same price range.
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
I have not researched this in years, but a while back (mid - late 80's) there were clocks with serial outputs that would sync to the US Governments "Atomic Clock" radio signal. So, the clock syncs to the radio signal then the computer syncs to the clock via the serial interface.
Andy
This method will work when you have no line of sight to the sky for GPS and no network access or modem access.
I've been thinking of doing this with an array of devices. Monitor voltmeters or something. Useful when you want extreme optical isolation!
t.
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
While GPS-based systems like those from Truetime are some of the best sources of network time, probably the least expensive alternatives are WWVB-based systems from Ultralink (assuming you're in the continental US), starting at $150.
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...
Having said that, there is one caveat: Simple GPS input will give you only about one-second accuracy. For better accuracy, you need a GPS with an auxilliary PPS (pulse-per-second) output. NTP can accept PPS inputs if the Linux kernel is compiled with that option. (My out-of-the-box Red Hat 7.1 was not.) If not you may still be able to get better accuracy by temporarily hooking up your GPS simultaneously (using NTP) with several internet time servers. Using ntpq (a utility included with NTP), you can observe the offset from internet time your GPS is giving you. It will be less than one second. NTP gives you the option of programming an offset for each time source you choose, and you can use your observed GPS offset to correct your GPS time source.
I'm not sure whether Tardis can handle PPS or not.
He is using Windows 2000 time service. This is NTP, new to Windows 2000.
But, he cannot be connected to the internet. So although his network is synchronized to HIS time server, he has no way of guaranteeing that HIS NTP server has the right time. His NTP daemon has no external atomic clock reference.
GPS will give him an external atomic clock reference via satellite radio but, as he has stated it is expensive.
A good alternative might be a shortwave radio time receiver. There are a few such devices that are set to receive WWV via shortwave. This would give hime the external reference that he needs without internet conectivity. The draw back is that the reception is not always reliable where as, GPS is supposedly always available.
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.
All you need is a computer with one NIC. Hook it up to the Internet and set the time via ntp. Unhook the computer from the Internet, connect it to your internal network and use it as the master. That way, you've kept the 'hard' firewall - still an airgap between your network and the Internet.
Hey Taco! Looks like you're using the "infinite monkeys and typewriters" scheme to generate Ask Slashdots again...