Problem with Linux Machine's Request for Time from an XP Machine

Discussion in 'Linux Networking' started by W. Watson, Jan 9, 2005.

  1. W. Watson

    W. Watson Guest

    I started a thread titled "Setting Up NTP for Time Sync" that seems to be getting a
    few too many branches for myself and others to cope with. I'm going to discontinue
    it, and continue here with what I think is the most important point to consider. See
    below (The Problem).

    For any newcomers wandering into this territory, I'm only interested in the problem
    presented here. I'll try to be brief and as accurate as I can. I've included in the
    mail list those people who have at one time or another participated in the other
    thread. Thanks to all those people on that list for their continuing interest.

    Basic Environment
    Two machines are on my local network: solarblast, an XP Pro machine with SP2 (svc pck
    2), and astropc with Linux RH9. Both machines can attach to the internet with a
    modem. The Linux modem is only there to conduct tests regarding the problem I present
    here. I want to have redhat-linux-date request from solarblast (XP) the time it has.
    I believe this is time kept by NTP (see comment just above ==== below). The XP is set
    from the internet once a day.

    An Attempt To Get Time
    The command tool, redhat-linux-date, allows me to supply the IP address of solarblast
    (192.168.0.3) or a list of names, clock.redhat.com, clock1.redhat.com, etc to access
    NTP servers. The ultimate question is why can't I synch off of the XP Pro machine
    from linux? Here's what I have discovered by operating on astropc( Linux).

    From the Linux machine, I can fire up redhat-config-date. I can specify a location
    for the ntp server. One of them, which I added to the list, is 192.168.0.3, which is
    my XP machine. Another, provided by RH, is clock1.redhat.com.

    I deliberately set the clock off by 15 seconds in Linux. If I specify 192.xxxx, I do
    not get any correction. I then dial into my ISP from the Linux machine. I now use the
    tool again, but specify the clock1 entry. It resets the clock to the correct time. I
    again set the clock off by 10 seconds or so, and do the same with 192.xxxxx.
    Nothing. Repeated attempts with lesser time offsets produce no change in this test.
    Either XP isn't set up to deal with NTP or the request never makes it to XP.

    The Problem
    The question remains, why doesn't this work? Some insight to the answer is on the old
    thread, but I'm carrying this forth here. I do not expect to post there any longer. I
    will point people here though.

    At the moment of this post, it's quite possible that NTP doesn't really serve from
    the XP. I'm looking into this.

    ==========================================
    Here are some other items I know about this. (Undoubtedly I've omitted something, but
    here's what I can easily recall.) If necessary, I may post a separate thread which is
    meant to update the current status of the solution. It'll be called something like:
    STATUS: NTP and XP. Stay tunes.

    A. Pinging/Transfers
    I can ping either computer from its mate using their IP addresses.
    The net view (cmd line op) command shows both computers with their \\ names
    astropc2004
    solarblast (this is XP)

    I can connect to the internet with either machine and download. I haven't quite
    figured out how to use Samba yet. If I boot up on the alternate OS, Win2k, on the
    Linux box, I can easily transfer data between W2k and XP and vice versa.

    B. XP cmd window command results

    I found via Help a command called net time.
    (***
    Net timeSynchronizes the computer's clock with that of another computer or domain.
    Used without parameters, net time displays the time for another computer or domain.
    ....
    /querysntp
    Displays the name of the Network Time Protocol (NTP) server currently configured for
    the local computer or the one specified in ComputerName.
    ***)

    Executing net time /querysntp produces the result:
    The current sntp value is time.windows.com, 0x1

    C. Firewalls
    (***Another bit of help from XP:
    Your personal or network firewall prevents clock synchronization. Most corporate and
    organizational firewalls will block time synchronization, as do some personal
    firewalls. Home users should read the firewall documentation for information about
    unblocking network time protocol (NTP). You should be able to synchronize your clock
    if you switch to Windows Firewall.

    I updated with SP2 recently, which has the new MS firewall. I had to remove McAfee in
    the process, so use MS at the moment. A few days ago, I just disabled it for about 10
    minutes, but got the same results as above. No time set from XP. Otherwise, I really
    do not know how (yet) to just open a hole to NTP on XP when the firewall is up.
    ***)

    D. Registry
    There's a web page on the internet that suggests a fair number of changes should be
    made to the registry to get NTP running. I've ignored this for two reasons, but
    expect to do something about it today. First, when I found out about, it urges one to
    back up their registry. It took me awhile to figure this out, and be comfortable with
    the idea. I now can do it. Second, the print out of the page was so small, I didn't
    have a lot of faith I could really read it while trying to perform the steps. I
    finally figured out how to magnify the print out. See
    <http://support.microsoft.com/default.aspx?scid=kb;en-us;314054>. Possibly a related
    item is <http://support.microsoft.com/default.aspx?scid=kb;en-us;307897&sd=tech>.
    Haven't read it yet, but plan to real soon. Oh, yes, there's one other idosyncracy of
    the page. If I try to expand the print size, the right margin gets truncated. This
    makes it a bit dicey in trying to interpret long lines. Cute.

    E. Linux & Application
    I'm using RHL 9.0 and I'm aware of the fact it is out of date. It will have to do for
    the purposes of my NTP problem. RHL 9 is required for the application I'm using. The
    application is a video camera that collects images of fireballs (meteors). See
    <http://home.earthlink.net/~mtnv95959a/meteor_beginnings.html> for
    application details. For the sake of this problem, the sole focus of the effort is to
    understand how XP is going to provide the time to Linux, and not the other way
    around. Just bear with me on this.

    The IP addresses of the two machines I'm working with are 192.168.0.3 (XP) and
    192.168.0.1 (Linux)

    F. Linux ntpdate

    In attempting to use ntpudate -d x, where I've used my local machines names and
    anything else that comes to mind, I get:

    "no servers can be used. exiting."

    What this means is unresolved.



    --
    Wayne T. Watson (Watson Adventures, Prop., Nevada City, CA)
    (121.015 Deg. W, 39.262 Deg. N) GMT-8 hr std. time)
    Obz Site: 39° 15' 7" N, 121° 2' 32" W, 2700 feet

    Web Page: <home.earthlink.net/~mtnviews>
     
    W. Watson, Jan 9, 2005
    #1
    1. Advertisements

  2. W. Watson

    Bill Unruh Guest

    a) AFAIK XP does not have the possibility of slewing the time, to
    compensate for rate errors in on board clock. Thus this procedure will
    mean that the clock time on the XP progressively gets out of sync, and
    then is brought back into sync once a day. Linux machines DO have the
    ability to slew, which means that they tend to maintain their accuracy
    throught the day, with only minor (millisecond) corrections when they
    b) NTP is not how the time is kept, it is how the time is transfered
    from one machine to the next. It is a protocol which trys to make
    machine B which is trying to synchronize to machine A as accurate as
    possible, which means compensating for time delays due to the programs
    themselves but more particularly due to the time it takes signals to
    propagate down the net between the two machines. There is a complex
    algorithm to do this. XP tends to abandon all of this which means that
    the time is only accurate to about +- 1 sec, instead of +- 1 msec.

    You will have to decide which you want.
    Because it is not running an ntp server. NTP servers do NOT come
    standard on Windows machines. You must get the software and install them
    and set them up. This is trivial to do on Linux. It is apparently much
    harder on XP.

    Quite probably unless you set up NTP server software on the XP machine.
    So the XP machine does have an npt client. But a client is not a server.
    Probably irrelevant.
    Unless you have a firewall set up for your internal network.
    No idea. I do not do
    Windows.
    ntp is 10 years old. This is not a problem.
    What this means is that there are not servers ntpdate can use.

    However, I would advise you to use chrony, rather than xntp on your
    Redhat machine. chrony is precisely designed for cases where network
    access is sporadic. It also allows you to use your real time clock when
    your linux machine boots up, and corrects for its various problems.


    So again:
    Solutions
    a) get ntp server software for your XP machine. Install it. Make sure it
    is full ntp software, not simply SNTP which is a simplified protocol.
    b) Make your XP machine into a router for your linux machines. Then
    whenever your XP is connected to the net, so are the linux machines and
    they can get the time directly from ntp servers on the net.
    c) Keep the modem on the linux machines and have them call out once a
    day, and run chrony putting the net ntp servers online whenever your
    linux machines are connected.
    d) Buy a GPS receiver for your linux machines, install ntp and use it
    to keep the machines accurate to microseconds per day.
    PS, when you email other people, why do you give an invalid email
    address? You are emailing us, but refuse to let us email you.
     
    Bill Unruh, Jan 9, 2005
    #2
    1. Advertisements

  3. I assume that should be ntpdate.
    What this means is that it couldn't find a server it could use.

    I just tried running ntpdate against a vanilla XP machine. I got this:

    $ ntpdate -q 192.168.1.111
    Looking for host 192.168.1.111 and service 123
    host found : xxxxxxxx
    server 192.168.1.111, stratum 16, offset 4.274011, delay 0.04193
    9 Jan 14:49:03 ntpdate[31218]: no server suitable for synchronization
    found

    A look at the traffic (ethereal should be your friend) shows that the XP
    machine doesn't think its clock is synchronized with anything.

    This for what it's worth. I have no idea why XP thinks it is running an
    NTP server. It's connected to a network that has broadcast NTP, so it's
    not come configured to do anything sensible. Attempts to use ntpq to
    see what might be going on were rebuffed. Maybe the folks over on
    comp.protocols.time.ntp know. I *strongly* suggest searching archives
    and reading documentation before you post anything.
     
    Allen McIntosh, Jan 9, 2005
    #3
  4. W. Watson

    W. Watson Guest

    No problem, but I haven't actually refused anyone. Anyone who wanted it, I gave it to
    them. I'd prefer people that have posted here with help know my address. I still post
    anonymously.

    -xyz. Just remove the -xyz. One never knows who's lurking
    out there. :) I doubt they inspect msgs for addresses, but they certainly harvest
    from newsgroups.

    It's pretty clear after you and others have looked at the tcpdump that whatever NTP
    on XP is there it just isn't listening, so I'm heading for the registry edit approach
    to putting NP on my XP machine. I'll report back on this.

    Well, you've presented a new ripple above. GPS. I do happen to have a GPS unit. It's
    about six years old and made by Garmin. I inquired about its use on a GPS group, but
    prospects seemed a bit dim to use it. If you or others have suggestions, fire away.

    --
    Wayne T. Watson (Watson Adventures, Prop., Nevada City, CA)
    (121.015 Deg. W, 39.262 Deg. N) GMT-8 hr std. time)
    Obz Site: 39° 15' 7" N, 121° 2' 32" W, 2700 feet

    Web Page: <home.earthlink.net/~mtnviews>
     
    W. Watson, Jan 9, 2005
    #4
  5. W. Watson

    Tauno Voipio Guest

    Does it have a NMEA output?
     
    Tauno Voipio, Jan 9, 2005
    #5
  6. W. Watson

    Tauno Voipio Guest

    Have a look at
    <http://www.digitalmapping.sk.ca/Networks/NTP/Default.asp>.

    It could help you to start with the GPS. IMHO, it's the way to
    go: GPS and NTP on the Linux machine = stratum 0 server.

    You could even sync the XP to it.
     
    Tauno Voipio, Jan 9, 2005
    #6
  7. W. Watson

    W. Watson Guest

    Thank you for your input. I'll check against my system. I've been hearing favorable
    things about ethereal. I think my focus now is the (authorative time set) and XP
    modification of the registry document for NTP mentioned above.

    --
    Wayne T. Watson (Watson Adventures, Prop., Nevada City, CA)
    (121.015 Deg. W, 39.262 Deg. N) GMT-8 hr std. time)
    Obz Site: 39° 15' 7" N, 121° 2' 32" W, 2700 feet

    Web Page: <home.earthlink.net/~mtnviews>
     
    W. Watson, Jan 9, 2005
    #7
  8. W. Watson

    W. Watson Guest

    Yes.

    --
    Wayne T. Watson (Watson Adventures, Prop., Nevada City, CA)
    (121.015 Deg. W, 39.262 Deg. N) GMT-8 hr std. time)
    Obz Site: 39° 15' 7" N, 121° 2' 32" W, 2700 feet

    Web Page: <home.earthlink.net/~mtnviews>
     
    W. Watson, Jan 9, 2005
    #8
  9. W. Watson

    W. Watson Guest

    I'll check it out. My GPS unit seldom gets used, so it's a candidate when I'm not
    roaming around the country side.

    I'm still going for the registry change to accomodate NTP today. I want to at least
    get on the record for go/no go on that.

    --
    Wayne T. Watson (Watson Adventures, Prop., Nevada City, CA)
    (121.015 Deg. W, 39.262 Deg. N) GMT-8 hr std. time)
    Obz Site: 39° 15' 7" N, 121° 2' 32" W, 2700 feet

    Web Page: <home.earthlink.net/~mtnviews>
     
    W. Watson, Jan 9, 2005
    #9
  10. PPS?
     
    Allen McIntosh, Jan 9, 2005
    #10
  11. W. Watson

    W. Watson Guest

    According to the manual, it has drives three devices:
    NMEA 0180, 0182, 0183 vers 1.5 and 2.0.
    Yes, it says three. I see nothing about PPS.

    The PC plug is a nine pin female plug.

    --
    Wayne T. Watson (Watson Adventures, Prop., Nevada City, CA)
    (121.015 Deg. W, 39.262 Deg. N) GMT-8 hr std. time)
    Obz Site: 39° 15' 7" N, 121° 2' 32" W, 2700 feet

    Web Page: <home.earthlink.net/~mtnviews>
     
    W. Watson, Jan 10, 2005
    #11
  12. Do you have any documentation on what's on each pin?
     
    Allen McIntosh, Jan 10, 2005
    #12
  13. Tell us the Garmin model number, Garmin has decent online documentation.


    Randy
     
    Randy McLaughlin, Jan 10, 2005
    #13
  14. W. Watson

    W. Watson Guest

    No. It's probably obtainable from Garmin. I'll check it out.

    --
    Wayne T. Watson (Watson Adventures, Prop., Nevada City, CA)
    (121.015 Deg. W, 39.262 Deg. N) GMT-8 hr std. time)
    Obz Site: 39° 15' 7" N, 121° 2' 32" W, 2700 feet

    Web Page: <home.earthlink.net/~mtnviews>
     
    W. Watson, Jan 10, 2005
    #14
  15. W. Watson

    W. Watson Guest

    Only three are connected: 2 is receive data, 3 is transmit data, and
    5 is ground. More?

    --
    Wayne T. Watson (Watson Adventures, Prop., Nevada City, CA)
    (121.015 Deg. W, 39.262 Deg. N) GMT-8 hr std. time)
    Obz Site: 39° 15' 7" N, 121° 2' 32" W, 2700 feet

    Web Page: <home.earthlink.net/~mtnviews>
     
    W. Watson, Jan 10, 2005
    #15
  16. W. Watson

    W. Watson Guest

    I found it from someone and just posted it, but if there's more to it, I'll get the
    model #. I'm looking at it right now and it says nothing but Garmin GPS 12XL, 12
    channels.

    --
    Wayne T. Watson (Watson Adventures, Prop., Nevada City, CA)
    (121.015 Deg. W, 39.262 Deg. N) GMT-8 hr std. time)
    Obz Site: 39° 15' 7" N, 121° 2' 32" W, 2700 feet

    Web Page: <home.earthlink.net/~mtnviews>
     
    W. Watson, Jan 10, 2005
    #16
  17. OK. You should still look over Garmin's documentation very carefully,
    but it looks like you don't have a PPS signal. (As someone else
    mentioned, the model number would help.) I've seen postings to the
    effect that you may experience too much jitter this way, but maybe it's
    worth a shot.
     
    Allen McIntosh, Jan 10, 2005
    #17
  18. Your model can output either NMEA or its own Garmin format.

    Randy
     
    Randy McLaughlin, Jan 10, 2005
    #18
  19. W. Watson

    prg Guest

    After reading up on your 2 month travail -- googling by author revealed
    alot you had not shared here before ;-) -- I looked at Garmin's site.

    You will need the "sales" name for the unit, not its model # -- go
    figure. Anyway, it's here:

    http://www.garmin.com/support/download.jsp

    All the ones I tried offered up User's Guides, spec sheets, etc.

    As you mentioned, you still need to get XP's ntp working. I'll send
    along the docs I've read tomorrow -- I suspected all along that besides
    the registry edits you would have to play with the new firewall (WF --
    Windows Firewall, catchy, huh?) and it has changed a _lot_. In fact,
    one of MS's better efforts in a while. At least the docs are pretty
    clear.

    I'll also send along the link for the Critical Update for their new WF
    -- affects dial-up routing table entries that effectively let _anyone_
    through WF when the link is active ;(
    till tomorrow (or is it today already?),
    prg
    email above disabled
     
    prg, Jan 10, 2005
    #19
  20. W. Watson

    prg Guest

    I thought so too till reading carefully today (and confirming on
    cousin's XP box). It can and _does_ slew the clock but _only_ if it is
    0+ to 3 minutes _fast_. Otherwise, it just steps the clock. But w32tm
    command _can_ be used to to slew the clock _and_ discipline the
    frequency "by hand". Strange ...

    [snip]
    Simply not so since W2K. They just require registry edits to enable
    the "server" role -- even the SNTP protocol doesn't really distinguish
    clients from servers. It's the same software, just sometimes it asks
    for the time and sometimes it gives out the time. And with SP2
    (earlier?) XP implements NTP, not just the old W2K SNTP.
    Especially if you're squimish about editinig the registry. Nothing
    like maintaining 2500 Win3.1 to Win98 machines inadequately locked
    down(able) to get you over _that_ hurdle ;-)
    [snip]

    regards,
    prg
    email above disabled
     
    prg, Jan 10, 2005
    #20
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.