home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #31 / NN_1992_31.iso / spool / comp / protocol / time / ntp / 1128 < prev    next >
Encoding:
Internet Message Format  |  1992-12-23  |  2.2 KB

  1. Path: sparky!uunet!psgrain!ee.und.ac.za!tplinfm
  2. From: barrett@daisy.ee.und.ac.za (Alan P Barrett)
  3. Newsgroups: comp.protocols.time.ntp
  4. Subject: xntp3 and local clock
  5. Date: 23 Dec 1992 10:07:19 +0200
  6. Organization: Dept. Elec. Eng., Univ. Natal, Durban, S. Africa
  7. Lines: 33
  8. Distribution: inet
  9. Message-ID: <1h96nnINN28h@daisy.ee.und.ac.za>
  10. References: <1992Dec18.175438.16954@Arco.COM> <BzH0IM.2Bx@ra.nrl.navy.mil> <1992Dec23.015924.19111@shearson.com>
  11. NNTP-Posting-Host: daisy.ee.und.ac.za
  12.  
  13. In article <1992Dec23.015924.19111@shearson.com>,
  14. pmetzger@snark.shearson.com (Perry E. Metzger) writes:
  15. > Unfortunately, xntp3 has a bug that prevents the local clock as time
  16. > source option from working, and no one out there seems to have a fix.
  17.  
  18. It works for me, after some small modifications (which I have reported
  19. to Dave Mills).  Take the following explanation with a grain of salt,
  20. because I am really not an expert on NTP.  It would be nice if somebody
  21. who knows what he is talking about could confirm or refute this.
  22.  
  23. The problem is that the test for (peer->synch <= NTP_MAXDISTANCE) in
  24. ntp_proto.c fails.
  25.  
  26. For local clocks, in which the peer->delay and peer->rootdelay are zero,
  27. peer->synch ends up being approximately equal to (peer->rootdispersion
  28. + peer->dispersion).  It's only approximately equal because of the
  29. difference between sys_clock and sys_lastselect.
  30.  
  31. In both xntp2 and xntp3, the local clock's dispersion is 1 second and
  32. the rootdispersion is 5 seconds, making the synch distance approximately
  33. 6 seconds.  In xntp2, NTP_MAXDISTANCE was 16 seconds, so the local
  34. clock worked.  In xntp3, NTP_MAXDISTANCE is 1 seconds, so it doesn't work.
  35.  
  36. To make synchronisation from the local clock work again in xntp3,
  37. one could either increase NTP_MAXDISTANCE (in ntp.h) or decrease the
  38. LCLDISPERSION and LCLROOTDISPERSION in refclock_local.c.  I have done
  39. both: I increased NTP_MAXDISTANCE back to the 16 seconds that was used in
  40. xntp2, and I added a couple of fudge factors to control the LCLDISPERSION
  41. and LCLROOTDISPERSION at run time instead of at compile time.
  42.  
  43. --apb
  44. Alan Barrett, Dept. of Electronic Eng., Univ. of Natal, Durban, South Africa
  45. RFC822: barrett@ee.und.ac.za                    Bang: m2xenix!undeed!barrett
  46.