home *** CD-ROM | disk | FTP | other *** search
- From_: jon@cs.unsw.oz.au Tue Aug 18 17:24:53 1992
- Return-Path: jon@cs.unsw.oz.au
- Received: From banjo With LocalMail ; Tue, 18 Aug 92 16:36:37 +1000
- From: jon@cs.unsw.oz.au (Jon Vahlberg)
- To: eecf-staff@cs.unsw.oz.au
- Date: Tue, 18 Aug 92 14:12:44 +1000
- Message-Id: <920818041244.2310@cs.unsw.oz.au>
- Subject: Information on xntp
-
-
- Details about xntp.
-
- By now, everyone should know that xntp is now installed on the all machines
- and have a rough idea of what it does. The purpose of this note is to give a
- more in-depth understanding of what it does, other tools that are available
- with it, what they do, where they can be found and configuration files that
- they rely on.
-
- Programs available:
- ntpdate,xntpd,xntpdc
-
- Each of these programs can be found in /usr/local/etc
-
- Ntpdate
- -------
- Ntpdate sets the time of the machine that the program is running on to the
- time of another machine. Ntpdate can be told to get the time from more than
- one machine, in which case it will get the time from each of these machines
- and by the use of a selection algorithm will determine which is the best and
- set the time to that time. The general command is:
-
- ntpdate <machine-name> ...
-
- For example:
-
- ntpdate banjo composer conductor
-
- To find out more about ntpdate, there is a man entry for it.
-
- The programs ntpdate and xntp will only run when the other is not running.
- Currently, we are using ntpdate to set the time of the machine at boot time
- and once this is done, then xntp is run.
-
- Xntpd
- -----
- The program xntpd is a daemon that runs and keeps the time of the machine
- that it is running on synchronised to the machine(s) providing the time.
- Xntpd is based on providing time through a a series of layers called
- stratum.
-
- At the top of the layers, called stratum level 1, are those computers
- connected to atomic clocks that calculate the time. At the next level,
- stratum level 2, are the computers that are directly connected to the stratum
- level 1 machines. At the moment there are only three stratum 2 computers in
- Australia and they are at uneeda.aarnet.edu.au, sirius.ua.oz.au and
- augean.ua.oz.au. On the next level, stratum level 3, are those machines which
- are connected to stratum 2 machines through the network. In general,
- machines of one stratum level provides time to machines of the same or lower
- stratum level. The further the stratum level is away from stratum level 1,
- the more inaccurate the time of the clock is. However, even so, it still is
- accurate enough.
-
- Modes of Xntpd:
-
- There are three modes that are available to xntp and which it can be in at
- any given point. It can be in "symmetric active" mode (via the peer
- statement) in which case a host is requested to provide time which you may
- might synchronize with and that you can provide time to that host if
- necessary. The next mode is the "client" mode (via the server statement)
- which means that you might synchronize the time with a particular host
- but that you are unwilling to have that host synchronize to your time. The
- third mode is the broadcast mode in which case the time of the machine
- running xntp is broadcast to a network where machines that are listening on
- can synchronize to. A server running xntpd can also be acting as
- broadcastclient but this is a special case of the client mode and is not
- considered a separate mode.
-
- Configuration Files:
-
- Xntpd uses the default configuration file, ntp.conf found in /usr/local/etc.
- This file is currently generated by a filtered file through conform. The
- commands found in this file indicate to xntpd what to do. An example of this
- is the one found on composer.
-
- peer 139.130.4.4 version 1
- peer 129.127.4.2 version 1
-
- The peer command indicates that xntpd is in "symmetric active" mode when
- synchronizing with uneeda.aarnet.edu.au and augean.ua.oz.au. Unfortunately,
- xntpd works only with the host's path number and not it's path name. At the
- moment, uneeda and augean are running an old version of NTP hence xntp needs
- to be told about this (as there is some discrepancy to what it returns) which
- is why "version 1" follows the peer entry. This is the only case in the
- confirguration files where xntp has to know about the version number.
-
- The server command which indicates to xntp to be in "client" mode is not in
- this example but the format of the command is the same.
-
- The ntp.conf file also contains the following lines:
-
- broadcast 149.171.69.255
- broadcast 149.171.197.255
-
- This indicates that xntp is to broadcast the time to be synchronized to along
- the networks 149,171.69.255 (flute machines) and 149.171.197.255 (cello
- machines). The machines along this network wanting to synchronise to this
- broadcast currently has only one line in their own ntp.conf file. It has the
- form:
-
- broadcastclient yes
-
- This indicates that the machine running xntpd is to synchronise to broadcast
- NTP.
-
- Finally, there is one more line found in ntp.conf that should be examined.
- It is:
-
- driftfile /usr/local/etc/ntp.drift
-
- This specifies the name of the file used to record the frequency error that
- xntpd computed. This value is updated once every hour.
-
- There are various other options that can be included in xntpd (which I
- haven't yet tried) but they are all discussed in the man page for xntpd.
-
- Xntpdc
- ------
- Xntpdc is used to query the xntpd daemon about it's current state. It can be
- run interactively or given a command to execute. To run interactively, type
- xntpdc -i. I mainly use it to find out the state of xntpd by typing peer.
-
- Timedc
- ------
- This program has no relation with xntpd, xntpdc or ntpdate but it is useful
- to know nonetheless. It controls the operation of timed daemon and it can be
- used to compared the difference between the time on the current machine and
- another machine. For example, if I wanted to know the difference of the time
- of my current machine and ,say, uneeda.aarnet.edu.au, I would type:
-
- timedc clockdiff uneeda.aarnet.edu
-
- It would respond with:
-
- time on uneeda.aarnet.edu.au is 10ms behind time on composer.
-
- The path for timedc is /usr/etc on the DEC & Silicon Graphic machines and
- /etc on the Apollos.
-