Initial import from FreeBSD RELENG_4:
[dragonfly.git] / contrib / ntp / html / quick.htm
1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">
2 <html>
3 <head>
4 <meta name="generator" content="HTML Tidy, see www.w3.org">
5 <title>Quick Start</title>
6 </head>
7 <body>
8 <h3>Quick Start</h3>
9
10 <img align="left" src="pic/panda.gif" alt="gif">FAX test image for
11 SATNET (1979). 
12
13 <p>The baby panda was scanned at University College London and used
14 as a FAX test image for a demonstration of the DARPA Atlantic
15 SATNET Program and the first transatlantic Internet connection in
16 1978. The computing system used for that demonstration was called
17 the <a href=
18 "http://www.eecis.udel.edu/~mills/database/papers/fuzz.ps">
19 Fuzzball</a> . As it happened, this was also the first Internet
20 multimedia presentation and the first to use NTP in regular
21 operation. The image was widely copied and used for testing purpose
22 throughout much of the 1980s.<br clear="left">
23 </p>
24
25 <hr>
26 <p>For the rank amateur the sheer volume of the documentation
27 collection must be intimidating. However, it doesn't take much to
28 fly the <tt>ntpd</tt> daemon with a simple configuration where a
29 workstation needs to synchronize to some server elsewhere in the
30 Internet. The first thing that needs to be done is to build the
31 distribution for the particular workstation and install in the
32 usual place. The <a href="build.htm">Building and Installing the
33 Distribution</a> page describes how to do this.</p>
34
35 <p>While it is possible that certain configurations do not need a
36 configuration file, most do require one. Strictly speaking, the
37 file need only contain one line specifying a remote server, for
38 instance</p>
39
40 <p><tt>server foo.bar.com</tt></p>
41
42 <p>Choosing an appropriate remote server is somewhat of a black
43 art, but a suboptimal choice is seldom a problem. Links to public
44 time servers operated by National Institutes of Science and
45 Technology (NIST), US Naval Observatory (USNO), Canadian Metrology
46 Centre (CMC) and many others are given in the home page of this
47 document collection. The lists are sorted by country and, in the
48 case of the US, by state. Usually, the best choice is the nearest
49 in geographical terms, but the terms of engagement specified in
50 each list entry should be carefully respected.</p>
51
52 <p>During operation <tt>ntpd</tt> measures and corrects for
53 incidental clock frequency error and writes the current value to a
54 file if enabled. If the <tt>ntpd</tt> is stopped and restarted, it
55 initializes the frequency from this file. In this way the
56 potentially lengthy interval to relearn the frequency error is
57 avoided. Thus, for most applications an additional line should be
58 added to the file of the form</p>
59
60 <p><tt>driftfile /etc/ntp.drift</tt></p>
61
62 <p>That's all there is to it, unless some problem in network
63 connectivity or local operating system configuration occurs. The
64 most common problem is some firewall between the workstation and
65 server. System administrators should understand NTP uses UDP port
66 123 as both the source and destination port and that NTP does not
67 involve any operating system interaction other than to set the
68 system clock. While almost all modern Unix systems have included
69 NTP and UDP port 123 defined in the services file, this should be
70 checked if <tt>ntpd</tt> fails to come up at all.</p>
71
72 <p>The best way to confirm NTP is working is using the <a href=
73 "ntpq.htm"><tt>ntpq</tt></a> utility, although the <a href=
74 "ntpdc.htm"><tt>ntpdc</tt></a> utility may be useful in extreme
75 cases. See the documentation pages for further information. In the
76 most extreme cases the <tt>-d</tt> option on the <tt>ntpd</tt>
77 command line results in a blow-by-blow trace of the daemon
78 operations. While the trace output can be cryptic, to say the
79 least, it gives a general idea of what the program is doing and, in
80 particular, details the arriving and departing packets and detected
81 errors, if present.</p>
82
83 <p>Sometimes the <tt>ntpd</tt>. behavior may seem to violate the
84 Principle of Least Astonishment, but there are good reasons for
85 this. See the <a href="ntpd.htm">Network Time Protocol (NTP)
86 daemon</a> page for revealing insights. See this page and its
87 dependencies for additional configuration and control options. The
88 <a href="notes.htm">Notes on Configuring NTP and Setting up a NTP
89 Subnet</a> page contains an extended discussion of these
90 options.</p>
91
92 <hr>
93 <a href="index.htm"><img align="left" src="pic/home.gif" alt=
94 "gif"></a> 
95
96 <address><a href="mailto:mills@udel.edu">David L. Mills
97 &lt;mills@udel.edu&gt;</a></address>
98 </body>
99 </html>
100