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

 



Forgot your password?
typodupeerror
×
Security

Feeding GPS Time to a Private NTP Server? 52

farrellj asks: "I have a customer that wants to be able to sychronise time on hundreds of servers that are spread all across the continental US and Hawaii. He was using publicly accessable NTP servers, but would rather have his own server that is not dependant on outside servers, and not have to worry about NTP based attacks. You can get a good quality and accurate time from GPS, so he looked at using a GPS reciever hooked up to a machine in his server room, but none of the GPS software out there seem to be able to just pull out the time, and then feed it to an NTP server. Has anyone tried to do this before, or know of a program that will read at GPS reciever and feed it to a NTP server process?"
This discussion has been archived. No new comments can be posted.

Feeding GPS Time to a Private NTP Server?

Comments Filter:
  • er. (Score:2, Informative)

    by OnyxRaven ( 9906 )
    I know of at least one package I've used in a completely different situation that can pull down the datetime and gps reading through the serial connection, and has a programming API. Now, this was in windows but I'm sure its available for flavors of unix as well.

    Trimble's Pathfinder. If you need some code I may be able to dig some up. A warning, it'll be in VB, but it works.
  • GPSD (Score:5, Informative)

    by agentk ( 74906 ) on Thursday August 22, 2002 @02:48AM (#4117130)
    I use Remco Treeffkorn's GPSD to read data off of GPS devices in my tracking library (libtracking-- see interreality.org)

    http://russnelson.com/gpsd/

  • Hows about this? (Score:4, Informative)

    by olrs ( 534447 ) on Thursday August 22, 2002 @03:33AM (#4117222)
    This is the result of a quick googleing. Have you looked at this type of product? http://www.lantronix.com/products/nts/ntpe1_tr1/in dex.html [lantronix.com]
  • NMEA (Score:3, Informative)

    by Bernaps ( 529294 ) on Thursday August 22, 2002 @04:07AM (#4117284)

    Buy a Serial Data GPSAnd Grep the detail from the output.

    Little Program can easily be found on google (search NMEA GPS).
    List of Progs [vancouver-webpages.com]

    Here is a simple one [vancouver-webpages.com]

    Two Standard Exist for the GPS Output NMEA. Most can provide this information via RS232

    Less Than 20 Char to read from the Port. Automatically received once per second. Parse the data with PERL/AWK/SED/JAVA/C it's very simple.

    • The NMEA feed is not in sync with the actual clock, nor is the delay consistent. It's useless for synching NTP. One needs access to the PPS line from the GPS module, which pretty much means buying the OEM module and building the support (power, ports -- they're plenty of schematics for this out on the net) or buying one of the ready made clocks.
  • by geirt ( 55254 ) on Thursday August 22, 2002 @04:09AM (#4117289)
    Use the standard NTP dæmon in RedHat, Debian and other called ntpd [udel.edu]

    Ntpd supports many GPS reference clocks [udel.edu] directly, so you don't need any special software to "pull out the time, and then feed it to an NTP server".

  • www.ntp.org (Score:4, Informative)

    by hawkfan ( 11267 ) on Thursday August 22, 2002 @04:10AM (#4117291) Homepage
    ntp.org [ntp.org]. Did you even look? There are plenty of gps recievers capable of providing a pps signal to ntpd.
  • gps+ntp in a box (Score:3, Informative)

    by tim pickering ( 6930 ) on Thursday August 22, 2002 @05:31AM (#4117449) Homepage
    http://www.endruntechnologies.com/

    they have boxes that sync off of either gps or cdma (for those places where you can't get a good view of the sky). the gps model with the stock oscillator can go several hours without satellites before it drifts too far and only needs a single satellite rather than a full multi-sat lock to sync its clock. upgraded oscillators are available for better and longer term stability. we use the gps version at our observatory to provide ~1 ms time over the network via ntp and ~10 us or better time via the PPS and kPPS outputs. we looked into hooking external gps receivers to PCs running ntpd via serial and PPS, but these praecis boxes are a much easier to configure and maintain solution to the problem and likely more robust as well.

    tim
  • You need TARDIS (Score:4, Interesting)

    by ka9dgx ( 72702 ) on Thursday August 22, 2002 @08:03AM (#4117705) Homepage Journal
    If you're in a windows environment, you can use Tardis [demon.co.uk] which supports getting time from NTP AND via GPS.

    --Mike--

    • On an unrelated note, if you're willingly in a Windows environment, then you're just a Tard.

      Moderators, please pass this post by. I'm just having a little fun before I take my medication. No harm, no foul.

      • by Anonymous Coward
        You dare insult Doctor Who and Windows in the same post?! -500 Karma... exterminate.
  • by crath ( 80215 ) on Thursday August 22, 2002 @09:05AM (#4117923) Homepage

    How to find the answer to the question the user has posed:

    1. Start your browser. Don't use anything except Internet Explorer, since the answer to this question is so easily found that the asker has demonstrated that they require all the Microsoft hand-holding they can get!
    2. Go to Google.com [google.com].
    3. Type "GPS NTP" in the search box and click on the [search] button.
    4. Read the pages pointed to in the resulting links.
    5. Post apology to slashdot, for wasting everyone's time.

    This has to be the lamest question in the history of "Ask Slashdot".

    <Whine>

    The Slashdot moderators are getting as bad as the US Patent Office. After spending many hours searching the web, I've posed much harder questions than this to "Ask Slashdot" and had them rejected.

    For example, "What experiences can people share of building small sound-proof enclosures for their firewall/server kit?" Did you know that there is almost no information posted on the web, or posted to USENET, about this topic? There don't even appear to be any commercial products in this space (except for large and expensive commercial racks) for use by computer hobbiests trying to shoehorn their habit (sorry, I meant hobby) into a home shared with other people.

    Come on moderators, spend a little time thinking about what you accept/reject!

    </Whine>

  • How about something cheaper than a GPS

    Check out this article.
    http://www.linux-mag.com/2000-12/guru_01 .html

    Here they tell you where to buy an Atomic Time PC Deskclock with serial interface. $99.00 plus s+h.

    http://www.arctime.com/

    The article provides an expect script to read the data from the clock. This is cool for UNIX servers. For Windows servers, use perl with the expect module to retrieve the time, then use the "Time" command to set the time.

    Cross platform creaminess at a fraction of the cost!

    You could also cheese out and use the windows software that comes with the clock, if you are a slacker.
  • Something like this [leitch.com]
  • www.ntp.org [ntp.org] the official NTP site. Links to code, hardware, documentation, you name it.

    Also check out NIST's [nist.gov] list of Manufacturers of Time and Frequency Receivers [nist.gov].

  • Here's a good link [udel.edu] that has information on syncing your private NTP server to GPS.

    --Turkey
  • NTP based attacks? (Score:2, Insightful)

    by pbrammer ( 526214 )
    If you are an NTP client behind an appropriate firewall, are you vulnerable to NTP based attacks? One would think not. At least not anymore than normal.

    Just use NTP and be done with it. Besides, it's much easier to implement. Hell, use one server as the public NTP client, and then have the rest of your servers poll the previous machine. You could do that a couple of times considering the machines that are all over the US...

    I still don't understand the question - at least what the issue *really* is. Besides, wouldn't the GPS solution cost a bit more?

    Phil
    • Unless authentication is arranged with the relevant stratum 1 machine/s, it is pretty vulnerable: it's UDP, so there are no sequence numbers the firewall can inspect to check that a packet is genuine.
      • Yeah, but you don't have anything listening on the client side - only when a request for info is initiated. Right?! So, with that, is the concern with the stratum machine? Because how does the Internet know that you are running an NTP client behind a firewall?

        Phil
        • If someone blasts off packets to random addresses with the source address set to those of likely sources (*.get-time.org, Microsoft's ntp, and so on) then sooner or later one will arrive at a time coincident with when an update is taking place and hence be let through the firewall. If there's an active attack on a particular machine that's all the more likely to happen.

          An attacker doesn't have to worry about each individual attack succeeding. The IIS worms, for example, seemed to work quite well even though most of their packets didn't reach a vulnerable server. I hope that the built-in NTP clients on XP and MacOSX have been thoroughly audited...

          • Yes, except those were feeding on port 80 being open. The NTP client will open a random port - get its data - and then close the port...

            The likelyhood that someone would be doing a port scan that was searching an open port at the exact time that NTP polled its server is extremely unlikely. Even so, then this still isn't any worse off than any other client software that opens a port - http requests for instance...

            Besides, the beauty of stateful firewalling and reverse-lookups would prevent your case from happening...

            Phil
  • phk (Score:3, Interesting)

    by funky womble ( 518255 ) on Thursday August 22, 2002 @10:43AM (#4118564)
    no images due to a disk crash, but this [archive.org] has interesting information about high-precision NTP from GPS on FreeBSD, including an excellent trick to reduce jitter introduced by the usual low-quality PC xtal.
  • Try this. [ntp-zeit.de]


    They have a 1U hardware unit that does a 6-channel GPS time sync, and has all kinds of crazy outputs for your ntp machine (IRIG-B, pps, ppm, etc). But better yet, you could just plug an ethernet jack into their box and it has an ntp serevr built in. Ideally you'd make this your tier-1, and put a couple of unix NTP boxen in the second tier to serve to other machines - you don't want tons of clients hitting the ntp port on the little hardware box.


    As a meta note - this is one of many similar peices of hardware available out there from many companies. It took one google search for "GPS NTP hardware", and this was like the fourth link on the page. This is not ask slashdot material, it's just a dumb question from someone who can't use a search engine.

  • Comment removed based on user account deletion
    • Good Point. Another post provided a link to http://www.endruntechnologies.com [endruntechnologies.com] they have a 1U rackmount system that gets it time from CDMA cellular network instead of GPA.

      You have a better chance of getting CDMA signals in building than GPS. Plus, since you don't need the positioning aspects it seems like overkill to use GPS. ;-)

      Balam
  • for $380, you can go to GPS Clock [gpsclock.com] and get a pollable GPS unit to get the time and PPS signal out of. Likely cheaper than most of these dedicated NTP server boxes.

    Of course, if you only need per-second precision, and you really want to go cheap, get a handheld GPS off the pegboard at Wal-Mart and use one of the software packages mentioned elsewhere, but don't expect the same level of precision as the dedicated units mentioned.

  • How lame.... (Score:3, Insightful)

    by CSG_SurferDude ( 96615 ) <wedaa@wedaaCURIE.com minus physicist> on Thursday August 22, 2002 @01:28PM (#4120003) Homepage Journal
    Note to Editors: For "ask Slashdot" posts, please at least TRY to do a "google" on the question to see if it is lame or not.

    (Modded down as irrelevant/troll/slam on the editors)
  • GPS vs WWV (Score:3, Insightful)

    by coyote-san ( 38515 ) on Thursday August 22, 2002 @01:35PM (#4120051)
    While it's true that GPS units can be used as a time standard, it's not the best solution to this problem. GPS uses satellites the power is very limited and you can't use them indoors.

    A much better solution is to use a standard shortwave receiver that can pick up the digital time signal from WWV. That signal is much stronger and can probably be picked up inside most buildings (perhaps with a simple antenna) in most of the country. That's why this is the signal used by desktop "atomic clocks." You might be able to use one of them as a time source, but I would suggest checking the NTP documentation for recommendations for hardware that supports PPS signals. There's also some websites describing DIY radio receiver hardware.

    The downside of this approach is that there's a propogation delay in the ground signal. GPS should give you the current time accurate to microseconds, while the radio delay may be in the milliseconds. (Ground waves are closer to a signal down a wire than a signal through free space, so the prop speed is well under 'c'.) This should not be an issue except for the most demanding uses.
  • I have a cheap NavMan GPS receiver for my palm III (bought when Rand Mcnally [randmcnally.com] dropped the price to $50) which reports the time about 5 minutes off!
    I'm using Compass from gpspilot.com [gpspilot.com] to view the NavMan's data. The Lat/Lon are reported correctly, as is the altitude. As such, the heading and speed calculations also come out correct. What's really odd to me is that it works at all if it doesn't know the correct time -- I thought that's the whole idea behind GPS.

    Please don't try to blame my watch for the problem -- I live and work in Boulder and set my watch to the definition of Correct Time.
    For a good time, call 303-499-7111.
  • Appliance (Score:4, Insightful)

    by dotslash ( 12419 ) on Thursday August 22, 2002 @02:38PM (#4120660) Homepage
    There are a number of purpose built systems that are designed as highly accurate NTP stratum 1 servers, with GPS input.

    These are rack-mountable 1u servers designed for service provider environments. I have deployed several such systems.

    Have a look at TrueTime" [truetime.com] for an example.

    Some of these systems are Linux/ntpd/gpsd based, but come with support and in a turn-key format with Web based GUI.
  • Here's a PDF with some info on their different instruments. The first half of the document is GPS theory, the rest is the different instruments.
    From the pictures, a couple of them look to be rack-mountable.

    Introduction to GPS timing solutions [agilent.com]
  • Gps generally does not work indoors :) Generally it dosen't even work through tree leaves, car roofs or anywhere thats not line of sight. You may wish to consider this.
  • I'm sure there is a reason why what I do is lame, but why not firewall NTP, and run an NTP server inside that does the following cronjob:

    1 0 * * * /usr/sbin/ntpdate time.nist.gov
    1 12 * * * /usr/sbin/ntpdate time.nist.gov

    It keeps my server sync-ed to no more than 0.8 seconds of drift at any given time.

We want to create puppets that pull their own strings. - Ann Marion

Working...