home *** CD-ROM | disk | FTP | other *** search
/ ftp.cse.unsw.edu.au / 2014.06.ftp.cse.unsw.edu.au.tar / ftp.cse.unsw.edu.au / pub / doc / CSE / CF / xntpd < prev   
Encoding:
Internet Message Format  |  1994-01-31  |  5.9 KB

  1. From_: jon@cs.unsw.oz.au Tue Aug 18 17:24:53 1992
  2. Return-Path: jon@cs.unsw.oz.au
  3. Received: From banjo With LocalMail ; Tue, 18 Aug 92 16:36:37 +1000 
  4. From: jon@cs.unsw.oz.au (Jon Vahlberg)
  5. To: eecf-staff@cs.unsw.oz.au
  6. Date: Tue, 18 Aug 92 14:12:44 +1000
  7. Message-Id:  <920818041244.2310@cs.unsw.oz.au>
  8. Subject: Information on xntp
  9.  
  10.  
  11. Details about xntp.
  12.  
  13. By now, everyone should know that xntp is now installed on the all machines
  14. and have a rough idea of what it does. The purpose of this note is to give a
  15. more in-depth understanding of what it does, other tools that are available
  16. with it, what they do, where they can be found and configuration files that
  17. they rely on. 
  18.  
  19. Programs available:
  20.   ntpdate,xntpd,xntpdc 
  21.  
  22. Each of these programs can be found in /usr/local/etc
  23.  
  24. Ntpdate
  25. -------
  26. Ntpdate sets the time of the machine that the program is running  on to the
  27. time of another machine. Ntpdate can be told to get the time from more than
  28. one machine, in which case it will get the time from each of these machines
  29. and by the use of a selection algorithm will determine which is the best and
  30. set the time to that time. The general command is:
  31.  
  32. ntpdate <machine-name> ...
  33.  
  34. For example:
  35.  
  36. ntpdate banjo composer conductor
  37.  
  38. To find out more about ntpdate, there is a man entry for it.
  39.  
  40. The programs ntpdate and xntp will only run when the other is not running. 
  41. Currently, we are using ntpdate to set the time of the machine at boot time
  42. and once this is done, then xntp is run.
  43.  
  44. Xntpd
  45. -----
  46. The program xntpd is a daemon that runs and keeps the time of the machine
  47. that it is running on synchronised to the machine(s) providing the time. 
  48. Xntpd is based on providing time through a a series of layers called
  49. stratum.
  50.  
  51. At the top of the layers, called stratum level 1, are those computers
  52. connected to atomic clocks that calculate the time. At the next level,
  53. stratum level 2, are the computers that are directly connected to the stratum
  54. level 1 machines. At the moment there are only three stratum 2 computers in
  55. Australia and they are at uneeda.aarnet.edu.au, sirius.ua.oz.au and
  56. augean.ua.oz.au. On the next level, stratum level 3, are those machines which
  57. are connected to stratum 2 machines through the network.  In general,
  58. machines of one stratum level provides time to machines of the same or lower
  59. stratum level. The further the stratum level is away from stratum level 1,
  60. the more inaccurate the time of the clock is. However, even so, it still is
  61. accurate enough.
  62.  
  63. Modes of Xntpd:
  64.  
  65. There are three modes that are available to xntp and which it can be in at
  66. any given point. It can be in "symmetric active" mode (via the peer
  67. statement) in which case a host is requested to provide time which you may
  68. might synchronize with and that you can provide time to that host if
  69. necessary.  The next mode is the "client" mode (via the server statement)
  70. which means that you might synchronize the time with a particular host
  71. but that you are unwilling to have that host synchronize to your time. The
  72. third mode is the broadcast mode in which case the time of the machine
  73. running xntp is broadcast to a network where machines that are listening on
  74. can synchronize to. A server running xntpd can also be acting as
  75. broadcastclient but this is a special case of the client mode and is not
  76. considered a separate mode.
  77.  
  78. Configuration Files:
  79.  
  80. Xntpd uses the default configuration file, ntp.conf found in /usr/local/etc. 
  81. This file is currently generated by a filtered file through conform. The
  82. commands found in this file indicate to xntpd what to do. An example of this
  83. is the one found on composer. 
  84.  
  85. peer    139.130.4.4    version 1
  86. peer    129.127.4.2    version 1
  87.  
  88. The peer command indicates that xntpd is in "symmetric active" mode when
  89. synchronizing with uneeda.aarnet.edu.au and augean.ua.oz.au.  Unfortunately,
  90. xntpd works only with the host's path number and not it's path name. At the
  91. moment, uneeda and augean are running an old version of NTP hence xntp needs
  92. to be told about this (as there is some discrepancy to what it returns) which
  93. is why "version 1" follows the peer entry. This is the only case in the
  94. confirguration files where xntp has to know about the version number. 
  95.  
  96. The server command which indicates to xntp to be in "client" mode is not in
  97. this example but the format of the command is the same. 
  98.  
  99. The ntp.conf file also contains the following lines:
  100.  
  101. broadcast   149.171.69.255
  102. broadcast   149.171.197.255
  103.  
  104. This indicates that xntp is to broadcast the time to be synchronized to along
  105. the networks 149,171.69.255 (flute machines) and 149.171.197.255 (cello
  106. machines). The machines along this network wanting to synchronise to this
  107. broadcast currently has only one line in their own ntp.conf file. It has the
  108. form:
  109.  
  110. broadcastclient yes
  111.  
  112. This indicates that the machine running xntpd is to synchronise to broadcast
  113. NTP.
  114.  
  115. Finally, there is one more line found in ntp.conf that should be examined. 
  116. It is:
  117.  
  118. driftfile /usr/local/etc/ntp.drift
  119.  
  120. This specifies the name of the file used to record the frequency error that
  121. xntpd computed. This value is updated once every hour.
  122.  
  123. There are various other options that can be included in xntpd (which I
  124. haven't yet tried) but they are all discussed in the man page for xntpd.
  125.  
  126. Xntpdc
  127. ------
  128. Xntpdc is used to query the xntpd daemon about it's current state.  It can be
  129. run interactively or given a command to execute. To run interactively, type
  130. xntpdc -i. I mainly use it to find out the state of xntpd by typing peer. 
  131.  
  132. Timedc
  133. ------
  134. This program has no relation with xntpd, xntpdc or ntpdate but it is useful
  135. to know nonetheless. It controls the operation of timed daemon and it can be
  136. used to compared the difference between the time on the current machine and
  137. another machine. For example, if I wanted to know the difference of the time
  138. of my current machine and ,say, uneeda.aarnet.edu.au, I would type:
  139.  
  140. timedc clockdiff uneeda.aarnet.edu
  141.  
  142. It would respond with:
  143.  
  144. time on uneeda.aarnet.edu.au is 10ms behind time on composer.
  145.  
  146. The path for timedc is /usr/etc on the DEC & Silicon Graphic machines and
  147. /etc on the Apollos.
  148.