Want to read Slashdot from your mobile device? Point it at m.slashdot.org and keep reading!

 



Forgot your password?
typodupeerror
×
Upgrades

Network Time Syncronization via GPS? 63

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."
This discussion has been archived. No new comments can be posted.

Network Time Syncronization via GPS?

Comments Filter:
  • Use ntp. Period. (Score:3, Informative)

    by cnvogel ( 3905 ) <chris AT hedonism DOT cx> on Friday February 15, 2002 @01:55PM (#3014230) Homepage


    Windows net time /set is not synching the time, it's just setting one machine's idea of time to some more-or-less accurate value... without making sure that the time on these machines will no drift apart later....



    Real synching of clocks can be done with NTP [ntp.org], the network time protocol. And yes, it can sync one computer's time to GPS...



    Read the FAQ [udel.edu] for more information... and the newsgroup comp.protocols.time.ntp [google.com] is read by many helpful people! .



    • This would do nothing but sync his clocks together. He wants to validate his time is accurate. His best bet would be to use NIST shortwave or a modem to validate his time.
    • > Real synching of clocks can be done with NTP
      > [ntp.org], the network time protocol. And yes, it
      > can sync one computer's time to GPS...

      ntp is good, and the ntp.org [ntp.org] site is good, too. also good is that NT has an NTP client as part of the NT Server Resource Kit. Microsoft has an article about this on TechNet [microsoft.com].

      This in combination with some external software to drive your internal NTP server should keep all of your nodes on the correct time.

    • I believe he's not talking about net time /set.

      Rather, he is talking about the windows time service, which is Microsoft's implementation of SNTP. This is part of win2k and winxp.

      It works well enough for most uses although for something like what's trying to do, I would use ntpd on the master Windows box since it is much, much more flexible and configurabel and just use windows time service to keep the rest synchronized to that.
      • Chang wrote: Rather, he is talking about the windows time service, which is Microsoft's implementation of SNTP. This is part of win2k and winxp.

        Win2k does NTP... Oh, I did not know that, I thought that was a new feature of Windows-for-toddlers (XP) :-)

        Nevertheless... there is (/was not long a go) a thread on comp.protocols.time.ntp talking about why WiXP's sntp seems to be severly broken! ([click] [google.com])

    • RTFM. In 2000 the net time command is actually expanded to also work as an ntp client.

      They are bad, bud not *that* bad...
    • Windows 2000 has a built in Time Sync service that uses NTP.

      He is likely not talking about 'net time /set'
  • by jsimon12 ( 207119 ) on Friday February 15, 2002 @01:57PM (#3014239) Homepage
    You don't need to sync via GPS, just sync via NIST shortwave signals. I have been using this service in some form or fashion for years.

    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 [nist.gov]


    And here is a German company that makes a ISA card:http://www.quancom.de/quancom/quancom01.nsf/h ome_prod_eng.htm?OpenFrameSet&Frame=unten&Src=http ://www.quancom.de/qprod01/eng/pb/clock77_isa.htm [quancom.de]

    • The easiest way is to get a basic TV+teletext card and use the teletext time signal. This certainly works in the UK -- does the US have teletext? The Linux program alevt has date setting capability -- not very complicated!! The teletext time signal is extremely accurate and can be yours for the price of an Hauppauge TV tuner (40 pounds?) [ebuyer.com]
      I also have a Garmin Etrex GPS linked up to my car machine: it is very easy to parse the NMEA sentences with the correct time. Make sure that the receiver can get reception: my gps is fine near the window. Take a look at Peter Bennett's site [vancouver-webpages.com] for NMEA information.
  • 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).

    http://www.simplyradios.com/acatalog/rev99193.ht m

  • Try this [endruntechnologies.com] 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 [howstuffworks.com] has some info. Maybe somebody makes a PCI card or other device that allows you to do this on a computer.
  • 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.
  • 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.
  • Hi,
    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.

  • 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!
  • 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.
  • Lantronix CoBox E1 (Score:3, Informative)

    by smoon ( 16873 ) on Friday February 15, 2002 @03:00PM (#3014560) Homepage
    I use the Lantronix CoBox E1 [lantronix.com].

    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.
    • "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."

      From the sounds of it, that would actually make your system time less accurate. NIST will tell you themselves that there's generally +/- 0.5 second error when you try to poll their servers over the internet. They actually reccomend that you use their dial-in modem line for die-hard time synch since the lag over the phone lines is both smaller and more predictable.

      GPS time, on the other hand, is about as accurate as technology allows without having a bank of cesium clocks in the building with you. If GPS weren't gobs better than a good mechanical chronometer, it'd be worthless to the military and probably wouldn't have even been launched. Wars have been won or lost, empires risen or fallen all because one side had more accurate timepieces. Hell, the USNO's and NIST's clocks are probably just as important if not more important to national defense than our nuclear arsenal.

      Now, do you really think that the time given by GPS can somehow be made more accurate by polling some ground station hundreds of miles away across a network of patchwork links where terms like "latency" and "signal lag" are more of a guessing game than a science?
  • A cheaper solution? (Score:2, Informative)

    by biafra ( 4283 )
    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.
  • Cheap GPS solution (Score:2, Informative)

    by orn ( 34773 )

    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,2 .4 ,2180.1,M,17.3,M,,*4E^M
    The second field there is the time HHMMSS.SS. Here's a link to the NMEA protocol:

    http://www.starlinkdgps.com/manuals/invictaproto co l.pdf

    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.
  • You might not be able to have internet access, but what about a standard voice line?

    NIST has an Acutomated Computer Time Service (ACTS) [nist.gov] 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.
  • by Anonymous Coward
    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.
    • The Earthmate is one of the lowest performing receivers out there. You need to put batteries in it. It's output is propritory, not NMEA standard. Pick a real GPS that can be powered remotely. Don't pick a solution that needs the batteries changed every 12 hours. If it breaks, it can't be replaced with any NMEA complient receiver without a software rewrite or hunting a brand specific receiver.
  • 2 of many options... (Score:2, Informative)

    by dargaud ( 518470 )

    2 years ago I wrote a small C program to synchronize a Windows PC to a Trimble [trimble.com] 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) [udel.edu] 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.


  • I use a program called "Tardis 2000" [demon.co.uk] from H. C. Mingham-Smith, Ltd. [demon.co.uk] 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.

  • 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
  • Use one of those cheap clocks that auto-set by using the timecodes embedded in some radio frequency. They make a lot of travel alarm clocks with this. Then get a cheap usb camera or something and some OCR (optical character recognition) software tuned for just numbers. Focus the camera on the clock, make sure it fills the whole frame and every hour/day check the time and correct.

    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.

  • by emag ( 4640 ) <`slashdot' `at' `gurski.org'> on Friday February 15, 2002 @05:37PM (#3015299) Homepage
    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 [hamstation.com] and this link [atomicsync.com] and also this link [radiocontrolledclock.com] (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. :-)
  • While GPS-based systems like those from Truetime [truetime.com] are some of the best sources of network time, probably the least expensive alternatives are WWVB-based systems from Ultralink [ulio.com] (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.
    • Re:So... (Score:3, Insightful)

      by psychosis ( 2579 )
      Not necessarily doable - depending on where the poster works, he/she may be legally restricted from connecting to the internet. For instance, there are several different networks that process classified information within the USG. Each is separate, and CANNOT (except for a few air-gapped, human-connected-for-short-time-period links) be bridged.
      If something is connected to the Internet, it is a major vulnerability. Period. What would happen if a 'sploit for NTP was out and someone used it against the bridge machine? Your entire network of vulnerable information is now potentially compromised...
      Paranoid approach? Sure. Vital to provide every possible safeguard against loss/compromise of sensitive information? Absolutely...
      • Oh, I agree completely, and I know that some networks are physically segregated. In fact, I don't think that a network should be connected to the Internet unless it needs to be. But this doesn't sound like that; it just sounds like somebody higher in the food chain made an Executive Decision.
        • Well, then, think of it as keeping his job. Even if it were an arbitrary Executive Decision, that doesn't mean they won't can him for it.

          After all, "higher in the food chain" means they eat him if he's too slow.

          • Yes, of course. Many apologies for offering him alternatives, and perhaps ways to phrase them to make non-techies understand the slight contradiction in disconnecting your network from a public network, then plugging in a public network reciever. :-)
            • So far as I know, the GPS network is uni-directional, so plugging in a GPS unit in no way opens the possibility of data leaving their research network. Attaching to the Internet is a very different kettle of fish, firewall or not.

              Mostly what I'm saying, though, is that if The Powers That Be decree that the interface cannot be pink, then I don't care how good the Barbie GPS receiver might be -- it'll either have to be painted or another way found. It's a constraint upon the solution.

    • 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.
      I knew a guy who tried this at his company... he doesn't work there anymore. As in 'summary dismissal for cause'.

      I don't suppose you've seen the root hole in NTPd?

      I don't suppose you believe that was the only root hole to exist in that package, and all possible future holes in the NTP protocol and implementations have since been fixed?

      • All I'm saying is that somebody who really really wants to can fuck with a radio broadcast.
        • All I'm saying is that somebody who really really wants to can fuck with a radio broadcast.
          We've considered this, and done what we can to minimize the risks. While the WWIV transmission would be relatively easy to mess with (powerful directional transmitter aimed at my receiving antenna).

          A GPS installation with the receiving antenna shielded from terrestial transmitters but with a clear view of the sky would be much more difficult to successfully attack without physical access directly to the antenna. You might be able to block my reception of the time code, but not spoof the wrong time with any degree of success.

          While I'm not aware of any non-military receivers taking advatange of the feature, DoD receivers have anti-spoofing protection specifically designed to safe-guard against interference, jamming and falsified signals.

          In our case, we have two GPS receivers, one in the central US, one on the west coast, they communicate with each other using authenticated NTP on a private WAN.

          • Sounds good, then. As a related note, I know that the DoD used to 'fuzzify' the location signals during peacetime for civvie receivers; do they do similar things with the timestamp?
            • They specificly played with the timing, but it isn't too relevent for getting an accurate (quarter second) time. Besidss which they have supressed that function (Selective Availability) and cannot unilaterally turn it on without a change of law. (They don't need it anyway, they have a localized version of SA that can be used over any small area they choose.) Pretty much means North America is fine.
  • 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.
    • You price comparison does not jive. Look up a NMEA compliant Magellan GPS 315. The cheap Earthmate solution is the same price as a better NMEA standard GPS solution. Both solutions will require the purchase of optional external power/data cables to connect external power. The suggested retail price is $149.95. They are less on sale. (I got mine for $115.00) See http://www.gearreview.com/magellan315.asp
      The magellan does not need to be outdoors for a good time signal. 3 + sats in view are not nessary for a time signal. I get a signal when I am within 5 feet of the window in my office.
  • If you don't care about milliseconds, a cheap GPS with NMEA outputs can be a good solution.

    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.

  • PCI Cards (Score:2, Informative)

    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.
  • For real Time Sync. (Score:2, Informative)

    by dfreed ( 40276 )
    Check out the atomic time sync program over at analogx.com, You just have to make sure that one computer has correct time and all the others can get their time from it using this (free) program.

    Check out http://www.analogx.com/contents/download/network/a ts.htm [analogx.com], 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.

  • A horrible thing happened this past New Years. Many Trutime GPS clocks freaked out and set their clocks ahead 1024 weeks. Yeah, I was among those that were bitten. My news server decided that my entire news spool was over 20 years old and expired the entire spool for example.

    I consider this article from Dave Mills [google.com] must reading.

    Also, if you go to google and search [google.com] 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...

  • 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.

    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 [garmin.com] 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 .5 seconds a day. A typical pc will drift about two minutes in a month.

    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.

"Gravitation cannot be held responsible for people falling in love." -- Albert Einstein

Working...