xref: /freebsd/contrib/ntp/ntpd/ntp.conf.html (revision 2d4e511ca269f1908d27f4e5779c53475527391d)
1052d159aSCy Schubert<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
2052d159aSCy Schubert<html>
3052d159aSCy Schubert<!-- Created by GNU Texinfo 6.5, http://www.gnu.org/software/texinfo/ -->
42b15cb3dSCy Schubert<head>
5052d159aSCy Schubert<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
6052d159aSCy Schubert<title>NTP Configuration File User&rsquo;s Manual</title>
7052d159aSCy Schubert
8052d159aSCy Schubert<meta name="description" content="NTP Configuration File User&rsquo;s Manual">
9052d159aSCy Schubert<meta name="keywords" content="NTP Configuration File User&rsquo;s Manual">
10052d159aSCy Schubert<meta name="resource-type" content="document">
11052d159aSCy Schubert<meta name="distribution" content="global">
12052d159aSCy Schubert<meta name="Generator" content="makeinfo">
13052d159aSCy Schubert<link href="#Top" rel="start" title="Top">
14052d159aSCy Schubert<link href="dir.html#Top" rel="up" title="(dir)">
15052d159aSCy Schubert<style type="text/css">
16052d159aSCy Schubert<!--
17052d159aSCy Schuberta.summary-letter {text-decoration: none}
18052d159aSCy Schubertblockquote.indentedblock {margin-right: 0em}
19052d159aSCy Schubertblockquote.smallindentedblock {margin-right: 0em; font-size: smaller}
20052d159aSCy Schubertblockquote.smallquotation {font-size: smaller}
21052d159aSCy Schubertdiv.display {margin-left: 3.2em}
22052d159aSCy Schubertdiv.example {margin-left: 3.2em}
23052d159aSCy Schubertdiv.lisp {margin-left: 3.2em}
24052d159aSCy Schubertdiv.smalldisplay {margin-left: 3.2em}
25052d159aSCy Schubertdiv.smallexample {margin-left: 3.2em}
26052d159aSCy Schubertdiv.smalllisp {margin-left: 3.2em}
27052d159aSCy Schubertkbd {font-style: oblique}
282b15cb3dSCy Schubertpre.display {font-family: inherit}
292b15cb3dSCy Schubertpre.format {font-family: inherit}
30052d159aSCy Schubertpre.menu-comment {font-family: serif}
31052d159aSCy Schubertpre.menu-preformatted {font-family: serif}
322b15cb3dSCy Schubertpre.smalldisplay {font-family: inherit; font-size: smaller}
332b15cb3dSCy Schubertpre.smallexample {font-size: smaller}
34052d159aSCy Schubertpre.smallformat {font-family: inherit; font-size: smaller}
352b15cb3dSCy Schubertpre.smalllisp {font-size: smaller}
36052d159aSCy Schubertspan.nolinebreak {white-space: nowrap}
37052d159aSCy Schubertspan.roman {font-family: initial; font-weight: normal}
38052d159aSCy Schubertspan.sansserif {font-family: sans-serif; font-weight: normal}
39052d159aSCy Schubertul.no-bullet {list-style: none}
40052d159aSCy Schubert-->
41052d159aSCy Schubert</style>
42052d159aSCy Schubert
43052d159aSCy Schubert
442b15cb3dSCy Schubert</head>
45052d159aSCy Schubert
46052d159aSCy Schubert<body lang="en">
47052d159aSCy Schubert<h1 class="settitle" align="center">NTP Configuration File User&rsquo;s Manual</h1>
48052d159aSCy Schubert
49052d159aSCy Schubert
50052d159aSCy Schubert
51052d159aSCy Schubert
52052d159aSCy Schubert
53052d159aSCy Schubert<a name="Top"></a>
54052d159aSCy Schubert<div class="header">
55052d159aSCy Schubert<p>
56052d159aSCy SchubertNext: <a href="#ntp_002econf-Description" accesskey="n" rel="next">ntp.conf Description</a>, Previous: <a href="dir.html#Top" accesskey="p" rel="prev">(dir)</a>, Up: <a href="dir.html#Top" accesskey="u" rel="up">(dir)</a> &nbsp; </p>
572b15cb3dSCy Schubert</div>
58052d159aSCy Schubert<a name="NTP_0027s-Configuration-File-User-Manual"></a>
59052d159aSCy Schubert<h1 class="top">NTP&rsquo;s Configuration File User Manual</h1>
602b15cb3dSCy Schubert
61052d159aSCy Schubert<p>This document describes the configuration file for the NTP Project&rsquo;s
622b15cb3dSCy Schubert<code>ntpd</code> program.
63052d159aSCy Schubert</p>
64*2d4e511cSCy Schubert<p>This document applies to version 4.2.8p14 of <code>ntp.conf</code>.
65052d159aSCy Schubert</p>
66052d159aSCy Schubert<a name="SEC_Overview"></a>
67052d159aSCy Schubert<h2 class="shortcontents-heading">Short Table of Contents</h2>
682b15cb3dSCy Schubert
692b15cb3dSCy Schubert<div class="shortcontents">
70052d159aSCy Schubert<ul class="no-bullet">
71052d159aSCy Schubert<li><a name="stoc-Description" href="#toc-Description">1 Description</a></li>
722b15cb3dSCy Schubert</ul>
732b15cb3dSCy Schubert</div>
742b15cb3dSCy Schubert
752b15cb3dSCy Schubert
76052d159aSCy Schubert<table class="menu" border="0" cellspacing="0">
77052d159aSCy Schubert<tr><td align="left" valign="top">&bull; <a href="#ntp_002econf-Description" accesskey="1">ntp.conf Description</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
78052d159aSCy Schubert</td></tr>
79052d159aSCy Schubert<tr><td align="left" valign="top">&bull; <a href="#ntp_002econf-Notes" accesskey="2">ntp.conf Notes</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
80052d159aSCy Schubert</td></tr>
81052d159aSCy Schubert</table>
82052d159aSCy Schubert
83052d159aSCy Schubert<hr>
84052d159aSCy Schubert<a name="ntp_002econf-Description"></a>
85052d159aSCy Schubert<div class="header">
86052d159aSCy Schubert<p>
87052d159aSCy SchubertPrevious: <a href="#Top" accesskey="p" rel="prev">Top</a>, Up: <a href="#Top" accesskey="u" rel="up">Top</a> &nbsp; </p>
882b15cb3dSCy Schubert</div>
89052d159aSCy Schubert<a name="Description"></a>
90052d159aSCy Schubert<h2 class="chapter">1 Description</h2>
912b15cb3dSCy Schubert
922b15cb3dSCy Schubert<p>The behavior of  <code>ntpd</code> can be changed by a configuration file,
932b15cb3dSCy Schubertby default <code>ntp.conf</code>.
94052d159aSCy Schubert</p>
95052d159aSCy Schubert<table class="menu" border="0" cellspacing="0">
96052d159aSCy Schubert<tr><td align="left" valign="top">&bull; <a href="#ntp_002econf-Notes" accesskey="1">ntp.conf Notes</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
97052d159aSCy Schubert</td></tr>
98052d159aSCy Schubert</table>
992b15cb3dSCy Schubert
100052d159aSCy Schubert<hr>
1012b15cb3dSCy Schubert<a name="ntp_002econf-Notes"></a>
102052d159aSCy Schubert<div class="header">
103052d159aSCy Schubert<p>
104052d159aSCy SchubertPrevious: <a href="#ntp_002econf-Bugs" accesskey="p" rel="prev">ntp.conf Bugs</a>, Up: <a href="#ntp_002econf-Description" accesskey="u" rel="up">ntp.conf Description</a> &nbsp; </p>
1052b15cb3dSCy Schubert</div>
106052d159aSCy Schubert<a name="Notes-about-ntp_002econf"></a>
107052d159aSCy Schubert<h3 class="section">1.1 Notes about ntp.conf</h3>
108052d159aSCy Schubert<a name="index-ntp_002econf"></a>
109052d159aSCy Schubert<a name="index-Network-Time-Protocol-_0028NTP_0029-daemon-configuration-file-format"></a>
1102b15cb3dSCy Schubert
1112b15cb3dSCy Schubert
1122b15cb3dSCy Schubert
1132b15cb3dSCy Schubert<p>The
1142b15cb3dSCy Schubert<code>ntp.conf</code>
1152b15cb3dSCy Schubertconfiguration file is read at initial startup by the
1162b15cb3dSCy Schubert<code>ntpd(1ntpdmdoc)</code>
1172b15cb3dSCy Schubertdaemon in order to specify the synchronization sources,
1182b15cb3dSCy Schubertmodes and other related information.
1192b15cb3dSCy SchubertUsually, it is installed in the
120052d159aSCy Schubert<samp>/etc</samp>
1212b15cb3dSCy Schubertdirectory,
1222b15cb3dSCy Schubertbut could be installed elsewhere
123052d159aSCy Schubert(see the daemon&rsquo;s
1242b15cb3dSCy Schubert<code>-c</code>
1252b15cb3dSCy Schubertcommand line option).
126052d159aSCy Schubert</p>
1272b15cb3dSCy Schubert<p>The file format is similar to other
128052d159aSCy Schubert<small>UNIX</small>
1292b15cb3dSCy Schubertconfiguration files.
1302b15cb3dSCy SchubertComments begin with a
131052d159aSCy Schubert&lsquo;#&rsquo;
1322b15cb3dSCy Schubertcharacter and extend to the end of the line;
1332b15cb3dSCy Schubertblank lines are ignored.
1342b15cb3dSCy SchubertConfiguration commands consist of an initial keyword
1352b15cb3dSCy Schubertfollowed by a list of arguments,
1362b15cb3dSCy Schubertsome of which may be optional, separated by whitespace.
1372b15cb3dSCy SchubertCommands may not be continued over multiple lines.
1382b15cb3dSCy SchubertArguments may be host names,
1392b15cb3dSCy Schuberthost addresses written in numeric, dotted-quad form,
1402b15cb3dSCy Schubertintegers, floating point numbers (when specifying times in seconds)
1412b15cb3dSCy Schubertand text strings.
142052d159aSCy Schubert</p>
1432b15cb3dSCy Schubert<p>The rest of this page describes the configuration and control options.
1442b15cb3dSCy SchubertThe
145052d159aSCy Schubert&quot;Notes on Configuring NTP and Setting up an NTP Subnet&quot;
1462b15cb3dSCy Schubertpage
1472b15cb3dSCy Schubert(available as part of the HTML documentation
1482b15cb3dSCy Schubertprovided in
149052d159aSCy Schubert<samp>/usr/share/doc/ntp</samp>)
1502b15cb3dSCy Schubertcontains an extended discussion of these options.
1512b15cb3dSCy SchubertIn addition to the discussion of general
152052d159aSCy Schubert&lsquo;Configuration Options&rsquo;,
1532b15cb3dSCy Schubertthere are sections describing the following supported functionality
1542b15cb3dSCy Schubertand the options used to control it:
155052d159aSCy Schubert</p><ul>
1562b15cb3dSCy Schubert<li> <a href="#Authentication-Support">Authentication Support</a>
157052d159aSCy Schubert</li><li> <a href="#Monitoring-Support">Monitoring Support</a>
158052d159aSCy Schubert</li><li> <a href="#Access-Control-Support">Access Control Support</a>
159052d159aSCy Schubert</li><li> <a href="#Automatic-NTP-Configuration-Options">Automatic NTP Configuration Options</a>
160052d159aSCy Schubert</li><li> <a href="#Reference-Clock-Support">Reference Clock Support</a>
161052d159aSCy Schubert</li><li> <a href="#Miscellaneous-Options">Miscellaneous Options</a>
162052d159aSCy Schubert</li></ul>
1632b15cb3dSCy Schubert
1642b15cb3dSCy Schubert<p>Following these is a section describing
1652b15cb3dSCy Schubert<a href="#Miscellaneous-Options">Miscellaneous Options</a>.
1662b15cb3dSCy SchubertWhile there is a rich set of options available,
1672b15cb3dSCy Schubertthe only required option is one or more
1682b15cb3dSCy Schubert<code>pool</code>,
1692b15cb3dSCy Schubert<code>server</code>,
1702b15cb3dSCy Schubert<code>peer</code>,
1712b15cb3dSCy Schubert<code>broadcast</code>
1722b15cb3dSCy Schubertor
1732b15cb3dSCy Schubert<code>manycastclient</code>
1742b15cb3dSCy Schubertcommands.
175052d159aSCy Schubert</p><table class="menu" border="0" cellspacing="0">
176052d159aSCy Schubert<tr><td align="left" valign="top">&bull; <a href="#Configuration-Support" accesskey="1">Configuration Support</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
177052d159aSCy Schubert</td></tr>
178052d159aSCy Schubert<tr><td align="left" valign="top">&bull; <a href="#Authentication-Support" accesskey="2">Authentication Support</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
179052d159aSCy Schubert</td></tr>
180052d159aSCy Schubert<tr><td align="left" valign="top">&bull; <a href="#Monitoring-Support" accesskey="3">Monitoring Support</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
181052d159aSCy Schubert</td></tr>
182052d159aSCy Schubert<tr><td align="left" valign="top">&bull; <a href="#Access-Control-Support" accesskey="4">Access Control Support</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
183052d159aSCy Schubert</td></tr>
184052d159aSCy Schubert<tr><td align="left" valign="top">&bull; <a href="#Automatic-NTP-Configuration-Options" accesskey="5">Automatic NTP Configuration Options</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
185052d159aSCy Schubert</td></tr>
186052d159aSCy Schubert<tr><td align="left" valign="top">&bull; <a href="#Reference-Clock-Support" accesskey="6">Reference Clock Support</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
187052d159aSCy Schubert</td></tr>
188052d159aSCy Schubert<tr><td align="left" valign="top">&bull; <a href="#Miscellaneous-Options" accesskey="7">Miscellaneous Options</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
189052d159aSCy Schubert</td></tr>
190052d159aSCy Schubert<tr><td align="left" valign="top">&bull; <a href="#ntp_002econf-Files" accesskey="8">ntp.conf Files</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
191052d159aSCy Schubert</td></tr>
192052d159aSCy Schubert<tr><td align="left" valign="top">&bull; <a href="#ntp_002econf-See-Also" accesskey="9">ntp.conf See Also</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
193052d159aSCy Schubert</td></tr>
194052d159aSCy Schubert<tr><td align="left" valign="top">&bull; <a href="#ntp_002econf-Bugs">ntp.conf Bugs</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
195052d159aSCy Schubert</td></tr>
196052d159aSCy Schubert<tr><td align="left" valign="top">&bull; :</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
197052d159aSCy Schubert</td></tr>
198052d159aSCy Schubert</table>
199052d159aSCy Schubert
200052d159aSCy Schubert<hr>
2012b15cb3dSCy Schubert<a name="Configuration-Support"></a>
202052d159aSCy Schubert<div class="header">
203052d159aSCy Schubert<p>
204052d159aSCy SchubertNext: <a href="#Authentication-Support" accesskey="n" rel="next">Authentication Support</a>, Up: <a href="#ntp_002econf-Notes" accesskey="u" rel="up">ntp.conf Notes</a> &nbsp; </p>
2052b15cb3dSCy Schubert</div>
206052d159aSCy Schubert<a name="Configuration-Support-1"></a>
207052d159aSCy Schubert<h4 class="subsection">1.1.1 Configuration Support</h4>
2082b15cb3dSCy Schubert<p>Following is a description of the configuration commands in
2092b15cb3dSCy SchubertNTPv4.
2102b15cb3dSCy SchubertThese commands have the same basic functions as in NTPv3 and
2112b15cb3dSCy Schubertin some cases new functions and new arguments.
2122b15cb3dSCy SchubertThere are two
2132b15cb3dSCy Schubertclasses of commands, configuration commands that configure a
2142b15cb3dSCy Schubertpersistent association with a remote server or peer or reference
2152b15cb3dSCy Schubertclock, and auxiliary commands that specify environmental variables
2162b15cb3dSCy Schubertthat control various related operations.
217052d159aSCy Schubert</p><a name="Configuration-Commands"></a>
218052d159aSCy Schubert<h4 class="subsubsection">1.1.1.1 Configuration Commands</h4>
2192b15cb3dSCy Schubert<p>The various modes are determined by the command keyword and the
2202b15cb3dSCy Schuberttype of the required IP address.
2212b15cb3dSCy SchubertAddresses are classed by type as
2222b15cb3dSCy Schubert(s) a remote server or peer (IPv4 class A, B and C), (b) the
2232b15cb3dSCy Schubertbroadcast address of a local interface, (m) a multicast address (IPv4
2242b15cb3dSCy Schubertclass D), or (r) a reference clock address (127.127.x.x).
2252b15cb3dSCy SchubertNote that
2262b15cb3dSCy Schubertonly those options applicable to each command are listed below.
2272b15cb3dSCy SchubertUse
2282b15cb3dSCy Schubertof options not listed may not be caught as an error, but may result
2292b15cb3dSCy Schubertin some weird and even destructive behavior.
230052d159aSCy Schubert</p>
2312b15cb3dSCy Schubert<p>If the Basic Socket Interface Extensions for IPv6 (RFC-2553)
2322b15cb3dSCy Schubertis detected, support for the IPv6 address family is generated
2332b15cb3dSCy Schubertin addition to the default support of the IPv4 address family.
234e27abb66SXin LIIn a few cases, including the
235e27abb66SXin LI<code>reslist</code>
236e27abb66SXin LIbillboard generated
237e27abb66SXin LIby
238e27abb66SXin LI<code>ntpq(1ntpqmdoc)</code>
239e27abb66SXin LIor
240e27abb66SXin LI<code>ntpdc(1ntpdcmdoc)</code>,
241e27abb66SXin LIIPv6 addresses are automatically generated.
2422b15cb3dSCy SchubertIPv6 addresses can be identified by the presence of colons
243052d159aSCy Schubert&ldquo;:&rdquo;
2442b15cb3dSCy Schubertin the address field.
2452b15cb3dSCy SchubertIPv6 addresses can be used almost everywhere where
2462b15cb3dSCy SchubertIPv4 addresses can be used,
2472b15cb3dSCy Schubertwith the exception of reference clock addresses,
2482b15cb3dSCy Schubertwhich are always IPv4.
249052d159aSCy Schubert</p>
2502b15cb3dSCy Schubert<p>Note that in contexts where a host name is expected, a
2512b15cb3dSCy Schubert<code>-4</code>
2522b15cb3dSCy Schubertqualifier preceding
2532b15cb3dSCy Schubertthe host name forces DNS resolution to the IPv4 namespace,
2542b15cb3dSCy Schubertwhile a
2552b15cb3dSCy Schubert<code>-6</code>
2562b15cb3dSCy Schubertqualifier forces DNS resolution to the IPv6 namespace.
2572b15cb3dSCy SchubertSee IPv6 references for the
2582b15cb3dSCy Schubertequivalent classes for that address family.
259052d159aSCy Schubert</p><dl compact="compact">
260*2d4e511cSCy Schubert<dt><code>pool</code> <kbd>address</kbd> <code>[<code>burst</code>]</code> <code>[<code>iburst</code>]</code> <code>[<code>version</code> <kbd>version</kbd>]</code> <code>[<code>prefer</code>]</code> <code>[<code>minpoll</code> <kbd>minpoll</kbd>]</code> <code>[<code>maxpoll</code> <kbd>maxpoll</kbd>]</code> <code>[<code>xmtnonce</code>]</code></dt>
261*2d4e511cSCy Schubert<dt><code>server</code> <kbd>address</kbd> <code>[<code>key</code> <kbd>key</kbd> <kbd>|</kbd> <code>autokey</code>]</code> <code>[<code>burst</code>]</code> <code>[<code>iburst</code>]</code> <code>[<code>version</code> <kbd>version</kbd>]</code> <code>[<code>prefer</code>]</code> <code>[<code>minpoll</code> <kbd>minpoll</kbd>]</code> <code>[<code>maxpoll</code> <kbd>maxpoll</kbd>]</code> <code>[<code>true</code>]</code> <code>[<code>xmtnonce</code>]</code></dt>
262052d159aSCy Schubert<dt><code>peer</code> <kbd>address</kbd> <code>[<code>key</code> <kbd>key</kbd> <kbd>|</kbd> <code>autokey</code>]</code> <code>[<code>version</code> <kbd>version</kbd>]</code> <code>[<code>prefer</code>]</code> <code>[<code>minpoll</code> <kbd>minpoll</kbd>]</code> <code>[<code>maxpoll</code> <kbd>maxpoll</kbd>]</code> <code>[<code>true</code>]</code> <code>[<code>xleave</code>]</code></dt>
263052d159aSCy Schubert<dt><code>broadcast</code> <kbd>address</kbd> <code>[<code>key</code> <kbd>key</kbd> <kbd>|</kbd> <code>autokey</code>]</code> <code>[<code>version</code> <kbd>version</kbd>]</code> <code>[<code>prefer</code>]</code> <code>[<code>minpoll</code> <kbd>minpoll</kbd>]</code> <code>[<code>ttl</code> <kbd>ttl</kbd>]</code> <code>[<code>xleave</code>]</code></dt>
264052d159aSCy Schubert<dt><code>manycastclient</code> <kbd>address</kbd> <code>[<code>key</code> <kbd>key</kbd> <kbd>|</kbd> <code>autokey</code>]</code> <code>[<code>version</code> <kbd>version</kbd>]</code> <code>[<code>prefer</code>]</code> <code>[<code>minpoll</code> <kbd>minpoll</kbd>]</code> <code>[<code>maxpoll</code> <kbd>maxpoll</kbd>]</code> <code>[<code>ttl</code> <kbd>ttl</kbd>]</code></dt>
265052d159aSCy Schubert</dl>
2662b15cb3dSCy Schubert
2672b15cb3dSCy Schubert<p>These five commands specify the time server name or address to
2682b15cb3dSCy Schubertbe used and the mode in which to operate.
2692b15cb3dSCy SchubertThe
2702b15cb3dSCy Schubert<kbd>address</kbd>
2712b15cb3dSCy Schubertcan be
2722b15cb3dSCy Schuberteither a DNS name or an IP address in dotted-quad notation.
2732b15cb3dSCy SchubertAdditional information on association behavior can be found in the
274052d159aSCy Schubert&quot;Association Management&quot;
2752b15cb3dSCy Schubertpage
2762b15cb3dSCy Schubert(available as part of the HTML documentation
2772b15cb3dSCy Schubertprovided in
278052d159aSCy Schubert<samp>/usr/share/doc/ntp</samp>).
279052d159aSCy Schubert</p><dl compact="compact">
280052d159aSCy Schubert<dt><code>pool</code></dt>
281052d159aSCy Schubert<dd><p>For type s addresses, this command mobilizes a persistent
2822b15cb3dSCy Schubertclient mode association with a number of remote servers.
2832b15cb3dSCy SchubertIn this mode the local clock can synchronized to the
2842b15cb3dSCy Schubertremote server, but the remote server can never be synchronized to
2852b15cb3dSCy Schubertthe local clock.
286052d159aSCy Schubert</p></dd>
287052d159aSCy Schubert<dt><code>server</code></dt>
288052d159aSCy Schubert<dd><p>For type s and r addresses, this command mobilizes a persistent
2892b15cb3dSCy Schubertclient mode association with the specified remote server or local
2902b15cb3dSCy Schubertradio clock.
2912b15cb3dSCy SchubertIn this mode the local clock can synchronized to the
2922b15cb3dSCy Schubertremote server, but the remote server can never be synchronized to
2932b15cb3dSCy Schubertthe local clock.
2942b15cb3dSCy SchubertThis command should
2952b15cb3dSCy Schubert<em>not</em>
2962b15cb3dSCy Schubertbe used for type
2972b15cb3dSCy Schubertb or m addresses.
298052d159aSCy Schubert</p></dd>
299052d159aSCy Schubert<dt><code>peer</code></dt>
300052d159aSCy Schubert<dd><p>For type s addresses (only), this command mobilizes a
3012b15cb3dSCy Schubertpersistent symmetric-active mode association with the specified
3022b15cb3dSCy Schubertremote peer.
3032b15cb3dSCy SchubertIn this mode the local clock can be synchronized to
3042b15cb3dSCy Schubertthe remote peer or the remote peer can be synchronized to the local
3052b15cb3dSCy Schubertclock.
3062b15cb3dSCy SchubertThis is useful in a network of servers where, depending on
3072b15cb3dSCy Schubertvarious failure scenarios, either the local or remote peer may be
3082b15cb3dSCy Schubertthe better source of time.
3092b15cb3dSCy SchubertThis command should NOT be used for type
3102b15cb3dSCy Schubertb, m or r addresses.
311052d159aSCy Schubert</p></dd>
312052d159aSCy Schubert<dt><code>broadcast</code></dt>
313052d159aSCy Schubert<dd><p>For type b and m addresses (only), this
3142b15cb3dSCy Schubertcommand mobilizes a persistent broadcast mode association.
3152b15cb3dSCy SchubertMultiple
3162b15cb3dSCy Schubertcommands can be used to specify multiple local broadcast interfaces
3172b15cb3dSCy Schubert(subnets) and/or multiple multicast groups.
3182b15cb3dSCy SchubertNote that local
3192b15cb3dSCy Schubertbroadcast messages go only to the interface associated with the
3202b15cb3dSCy Schubertsubnet specified, but multicast messages go to all interfaces.
3212b15cb3dSCy SchubertIn broadcast mode the local server sends periodic broadcast
3222b15cb3dSCy Schubertmessages to a client population at the
3232b15cb3dSCy Schubert<kbd>address</kbd>
3242b15cb3dSCy Schubertspecified, which is usually the broadcast address on (one of) the
3252b15cb3dSCy Schubertlocal network(s) or a multicast address assigned to NTP.
3262b15cb3dSCy SchubertThe IANA
3272b15cb3dSCy Schuberthas assigned the multicast group address IPv4 224.0.1.1 and
3282b15cb3dSCy SchubertIPv6 ff05::101 (site local) exclusively to
3292b15cb3dSCy SchubertNTP, but other nonconflicting addresses can be used to contain the
3302b15cb3dSCy Schubertmessages within administrative boundaries.
3312b15cb3dSCy SchubertOrdinarily, this
3322b15cb3dSCy Schubertspecification applies only to the local server operating as a
3332b15cb3dSCy Schubertsender; for operation as a broadcast client, see the
3342b15cb3dSCy Schubert<code>broadcastclient</code>
3352b15cb3dSCy Schubertor
3362b15cb3dSCy Schubert<code>multicastclient</code>
3372b15cb3dSCy Schubertcommands
3382b15cb3dSCy Schubertbelow.
339052d159aSCy Schubert</p></dd>
340052d159aSCy Schubert<dt><code>manycastclient</code></dt>
341052d159aSCy Schubert<dd><p>For type m addresses (only), this command mobilizes a
3422b15cb3dSCy Schubertmanycast client mode association for the multicast address
3432b15cb3dSCy Schubertspecified.
3442b15cb3dSCy SchubertIn this case a specific address must be supplied which
3452b15cb3dSCy Schubertmatches the address used on the
3462b15cb3dSCy Schubert<code>manycastserver</code>
3472b15cb3dSCy Schubertcommand for
3482b15cb3dSCy Schubertthe designated manycast servers.
3492b15cb3dSCy SchubertThe NTP multicast address
3502b15cb3dSCy Schubert224.0.1.1 assigned by the IANA should NOT be used, unless specific
3512b15cb3dSCy Schubertmeans are taken to avoid spraying large areas of the Internet with
3522b15cb3dSCy Schubertthese messages and causing a possibly massive implosion of replies
3532b15cb3dSCy Schubertat the sender.
3542b15cb3dSCy SchubertThe
3552b15cb3dSCy Schubert<code>manycastserver</code>
3562b15cb3dSCy Schubertcommand specifies that the local server
3572b15cb3dSCy Schubertis to operate in client mode with the remote servers that are
3582b15cb3dSCy Schubertdiscovered as the result of broadcast/multicast messages.
3592b15cb3dSCy SchubertThe
3602b15cb3dSCy Schubertclient broadcasts a request message to the group address associated
3612b15cb3dSCy Schubertwith the specified
3622b15cb3dSCy Schubert<kbd>address</kbd>
3632b15cb3dSCy Schubertand specifically enabled
3642b15cb3dSCy Schubertservers respond to these messages.
3652b15cb3dSCy SchubertThe client selects the servers
3662b15cb3dSCy Schubertproviding the best time and continues as with the
3672b15cb3dSCy Schubert<code>server</code>
3682b15cb3dSCy Schubertcommand.
3692b15cb3dSCy SchubertThe remaining servers are discarded as if never
3702b15cb3dSCy Schubertheard.
371052d159aSCy Schubert</p></dd>
3722b15cb3dSCy Schubert</dl>
3732b15cb3dSCy Schubert
3742b15cb3dSCy Schubert<p>Options:
375052d159aSCy Schubert</p><dl compact="compact">
376052d159aSCy Schubert<dt><code>autokey</code></dt>
377052d159aSCy Schubert<dd><p>All packets sent to and received from the server or peer are to
3782b15cb3dSCy Schubertinclude authentication fields encrypted using the autokey scheme
3792b15cb3dSCy Schubertdescribed in
380052d159aSCy Schubert&lsquo;Authentication Options&rsquo;.
381052d159aSCy Schubert</p></dd>
382052d159aSCy Schubert<dt><code>burst</code></dt>
383052d159aSCy Schubert<dd><p>when the server is reachable, send a burst of eight packets
3842b15cb3dSCy Schubertinstead of the usual one.
3852b15cb3dSCy SchubertThe packet spacing is normally 2 s;
3862b15cb3dSCy Schuberthowever, the spacing between the first and second packets
3874990d495SXin LIcan be changed with the
3884990d495SXin LI<code>calldelay</code>
3894990d495SXin LIcommand to allow
3902b15cb3dSCy Schubertadditional time for a modem or ISDN call to complete.
3912b15cb3dSCy SchubertThis is designed to improve timekeeping quality
3922b15cb3dSCy Schubertwith the
3932b15cb3dSCy Schubert<code>server</code>
3942b15cb3dSCy Schubertcommand and s addresses.
395052d159aSCy Schubert</p></dd>
396052d159aSCy Schubert<dt><code>iburst</code></dt>
397052d159aSCy Schubert<dd><p>When the server is unreachable, send a burst of eight packets
3982b15cb3dSCy Schubertinstead of the usual one.
3992b15cb3dSCy SchubertThe packet spacing is normally 2 s;
4002b15cb3dSCy Schuberthowever, the spacing between the first two packets can be
4014990d495SXin LIchanged with the
4024990d495SXin LI<code>calldelay</code>
4034990d495SXin LIcommand to allow
4042b15cb3dSCy Schubertadditional time for a modem or ISDN call to complete.
4052b15cb3dSCy SchubertThis is designed to speed the initial synchronization
4062b15cb3dSCy Schubertacquisition with the
4072b15cb3dSCy Schubert<code>server</code>
4082b15cb3dSCy Schubertcommand and s addresses and when
4092b15cb3dSCy Schubert<code>ntpd(1ntpdmdoc)</code>
4102b15cb3dSCy Schubertis started with the
4112b15cb3dSCy Schubert<code>-q</code>
4122b15cb3dSCy Schubertoption.
413052d159aSCy Schubert</p></dd>
414052d159aSCy Schubert<dt><code>key</code> <kbd>key</kbd></dt>
415052d159aSCy Schubert<dd><p>All packets sent to and received from the server or peer are to
4162b15cb3dSCy Schubertinclude authentication fields encrypted using the specified
4172b15cb3dSCy Schubert<kbd>key</kbd>
4184e1ef62aSXin LIidentifier with values from 1 to 65535, inclusive.
4192b15cb3dSCy SchubertThe
4202b15cb3dSCy Schubertdefault is to include no encryption field.
421052d159aSCy Schubert</p></dd>
422052d159aSCy Schubert<dt><code>minpoll</code> <kbd>minpoll</kbd></dt>
423052d159aSCy Schubert<dt><code>maxpoll</code> <kbd>maxpoll</kbd></dt>
424052d159aSCy Schubert<dd><p>These options specify the minimum and maximum poll intervals
4252b15cb3dSCy Schubertfor NTP messages, as a power of 2 in seconds
4262b15cb3dSCy SchubertThe maximum poll
4272b15cb3dSCy Schubertinterval defaults to 10 (1,024 s), but can be increased by the
4282b15cb3dSCy Schubert<code>maxpoll</code>
4292b15cb3dSCy Schubertoption to an upper limit of 17 (36.4 h).
4302b15cb3dSCy SchubertThe
4312b15cb3dSCy Schubertminimum poll interval defaults to 6 (64 s), but can be decreased by
4322b15cb3dSCy Schubertthe
4332b15cb3dSCy Schubert<code>minpoll</code>
4342b15cb3dSCy Schubertoption to a lower limit of 4 (16 s).
435052d159aSCy Schubert</p></dd>
436052d159aSCy Schubert<dt><code>noselect</code></dt>
437052d159aSCy Schubert<dd><p>Marks the server as unused, except for display purposes.
4382b15cb3dSCy SchubertThe server is discarded by the selection algroithm.
439052d159aSCy Schubert</p></dd>
440052d159aSCy Schubert<dt><code>preempt</code></dt>
441052d159aSCy Schubert<dd><p>Says the association can be preempted.
442052d159aSCy Schubert</p></dd>
443052d159aSCy Schubert<dt><code>prefer</code></dt>
444052d159aSCy Schubert<dd><p>Marks the server as preferred.
4452b15cb3dSCy SchubertAll other things being equal,
4462b15cb3dSCy Schubertthis host will be chosen for synchronization among a set of
4472b15cb3dSCy Schubertcorrectly operating hosts.
4482b15cb3dSCy SchubertSee the
449052d159aSCy Schubert&quot;Mitigation Rules and the prefer Keyword&quot;
4502b15cb3dSCy Schubertpage
4512b15cb3dSCy Schubert(available as part of the HTML documentation
4522b15cb3dSCy Schubertprovided in
453052d159aSCy Schubert<samp>/usr/share/doc/ntp</samp>)
4542b15cb3dSCy Schubertfor further information.
455052d159aSCy Schubert</p></dd>
456052d159aSCy Schubert<dt><code>true</code></dt>
457*2d4e511cSCy Schubert<dd><p>Marks the server as a truechimer,
458*2d4e511cSCy Schubertforcing the association to always survive the selection and clustering algorithms.
459e27abb66SXin LIThis option should almost certainly
460e27abb66SXin LI<em>only</em>
461e27abb66SXin LIbe used while testing an association.
462052d159aSCy Schubert</p></dd>
463052d159aSCy Schubert<dt><code>ttl</code> <kbd>ttl</kbd></dt>
464052d159aSCy Schubert<dd><p>This option is used only with broadcast server and manycast
4652b15cb3dSCy Schubertclient modes.
4662b15cb3dSCy SchubertIt specifies the time-to-live
4672b15cb3dSCy Schubert<kbd>ttl</kbd>
4682b15cb3dSCy Schubertto
4692b15cb3dSCy Schubertuse on broadcast server and multicast server and the maximum
4702b15cb3dSCy Schubert<kbd>ttl</kbd>
4712b15cb3dSCy Schubertfor the expanding ring search with manycast
4722b15cb3dSCy Schubertclient packets.
4732b15cb3dSCy SchubertSelection of the proper value, which defaults to
4742b15cb3dSCy Schubert127, is something of a black art and should be coordinated with the
4752b15cb3dSCy Schubertnetwork administrator.
476052d159aSCy Schubert</p></dd>
477052d159aSCy Schubert<dt><code>version</code> <kbd>version</kbd></dt>
478052d159aSCy Schubert<dd><p>Specifies the version number to be used for outgoing NTP
4792b15cb3dSCy Schubertpackets.
4802b15cb3dSCy SchubertVersions 1-4 are the choices, with version 4 the
4812b15cb3dSCy Schubertdefault.
482052d159aSCy Schubert</p></dd>
483052d159aSCy Schubert<dt><code>xleave</code></dt>
484052d159aSCy Schubert<dd><p>Valid in
4854990d495SXin LI<code>peer</code>
4864990d495SXin LIand
4874990d495SXin LI<code>broadcast</code>
4884990d495SXin LImodes only, this flag enables interleave mode.
489052d159aSCy Schubert</p></dd>
490*2d4e511cSCy Schubert<dt><code>xmtnonce</code></dt>
491*2d4e511cSCy Schubert<dd><p>Valid only for
492*2d4e511cSCy Schubert<code>server</code>
493*2d4e511cSCy Schubertand
494*2d4e511cSCy Schubert<code>pool</code>
495*2d4e511cSCy Schubertmodes, this flag puts a random number in the packet&rsquo;s transmit timestamp.
496*2d4e511cSCy Schubert</p>
497*2d4e511cSCy Schubert</dd>
4982b15cb3dSCy Schubert</dl>
499052d159aSCy Schubert<a name="Auxiliary-Commands"></a>
500052d159aSCy Schubert<h4 class="subsubsection">1.1.1.2 Auxiliary Commands</h4>
501052d159aSCy Schubert<dl compact="compact">
502052d159aSCy Schubert<dt><code>broadcastclient</code></dt>
503052d159aSCy Schubert<dd><p>This command enables reception of broadcast server messages to
5042b15cb3dSCy Schubertany local interface (type b) address.
5052b15cb3dSCy SchubertUpon receiving a message for
5062b15cb3dSCy Schubertthe first time, the broadcast client measures the nominal server
5072b15cb3dSCy Schubertpropagation delay using a brief client/server exchange with the
5082b15cb3dSCy Schubertserver, then enters the broadcast client mode, in which it
5092b15cb3dSCy Schubertsynchronizes to succeeding broadcast messages.
5102b15cb3dSCy SchubertNote that, in order
5112b15cb3dSCy Schubertto avoid accidental or malicious disruption in this mode, both the
5122b15cb3dSCy Schubertserver and client should operate using symmetric-key or public-key
5132b15cb3dSCy Schubertauthentication as described in
514052d159aSCy Schubert&lsquo;Authentication Options&rsquo;.
515052d159aSCy Schubert</p></dd>
516052d159aSCy Schubert<dt><code>manycastserver</code> <kbd>address</kbd> <kbd>...</kbd></dt>
517052d159aSCy Schubert<dd><p>This command enables reception of manycast client messages to
5182b15cb3dSCy Schubertthe multicast group address(es) (type m) specified.
5192b15cb3dSCy SchubertAt least one
5202b15cb3dSCy Schubertaddress is required, but the NTP multicast address 224.0.1.1
5212b15cb3dSCy Schubertassigned by the IANA should NOT be used, unless specific means are
5222b15cb3dSCy Schuberttaken to limit the span of the reply and avoid a possibly massive
5232b15cb3dSCy Schubertimplosion at the original sender.
5242b15cb3dSCy SchubertNote that, in order to avoid
5252b15cb3dSCy Schubertaccidental or malicious disruption in this mode, both the server
5262b15cb3dSCy Schubertand client should operate using symmetric-key or public-key
5272b15cb3dSCy Schubertauthentication as described in
528052d159aSCy Schubert&lsquo;Authentication Options&rsquo;.
529052d159aSCy Schubert</p></dd>
530052d159aSCy Schubert<dt><code>multicastclient</code> <kbd>address</kbd> <kbd>...</kbd></dt>
531052d159aSCy Schubert<dd><p>This command enables reception of multicast server messages to
5322b15cb3dSCy Schubertthe multicast group address(es) (type m) specified.
5332b15cb3dSCy SchubertUpon receiving
5342b15cb3dSCy Schuberta message for the first time, the multicast client measures the
5352b15cb3dSCy Schubertnominal server propagation delay using a brief client/server
5362b15cb3dSCy Schubertexchange with the server, then enters the broadcast client mode, in
5372b15cb3dSCy Schubertwhich it synchronizes to succeeding multicast messages.
5382b15cb3dSCy SchubertNote that,
5392b15cb3dSCy Schubertin order to avoid accidental or malicious disruption in this mode,
5402b15cb3dSCy Schubertboth the server and client should operate using symmetric-key or
5412b15cb3dSCy Schubertpublic-key authentication as described in
542052d159aSCy Schubert&lsquo;Authentication Options&rsquo;.
543052d159aSCy Schubert</p></dd>
544052d159aSCy Schubert<dt><code>mdnstries</code> <kbd>number</kbd></dt>
545052d159aSCy Schubert<dd><p>If we are participating in mDNS,
5462b15cb3dSCy Schubertafter we have synched for the first time
5472b15cb3dSCy Schubertwe attempt to register with the mDNS system.
5482b15cb3dSCy SchubertIf that registration attempt fails,
5492b15cb3dSCy Schubertwe try again at one minute intervals for up to
5502b15cb3dSCy Schubert<code>mdnstries</code>
5512b15cb3dSCy Schuberttimes.
5522b15cb3dSCy SchubertAfter all,
5532b15cb3dSCy Schubert<code>ntpd</code>
5542b15cb3dSCy Schubertmay be starting before mDNS.
5552b15cb3dSCy SchubertThe default value for
5562b15cb3dSCy Schubert<code>mdnstries</code>
5572b15cb3dSCy Schubertis 5.
558052d159aSCy Schubert</p></dd>
5592b15cb3dSCy Schubert</dl>
560052d159aSCy Schubert<hr>
5612b15cb3dSCy Schubert<a name="Authentication-Support"></a>
562052d159aSCy Schubert<div class="header">
563052d159aSCy Schubert<p>
564052d159aSCy SchubertNext: <a href="#Monitoring-Support" accesskey="n" rel="next">Monitoring Support</a>, Previous: <a href="#Configuration-Support" accesskey="p" rel="prev">Configuration Support</a>, Up: <a href="#ntp_002econf-Notes" accesskey="u" rel="up">ntp.conf Notes</a> &nbsp; </p>
5652b15cb3dSCy Schubert</div>
566052d159aSCy Schubert<a name="Authentication-Support-1"></a>
567052d159aSCy Schubert<h4 class="subsection">1.1.2 Authentication Support</h4>
5682b15cb3dSCy Schubert<p>Authentication support allows the NTP client to verify that the
5692b15cb3dSCy Schubertserver is in fact known and trusted and not an intruder intending
5702b15cb3dSCy Schubertaccidentally or on purpose to masquerade as that server.
5712b15cb3dSCy SchubertThe NTPv3
5722b15cb3dSCy Schubertspecification RFC-1305 defines a scheme which provides
5732b15cb3dSCy Schubertcryptographic authentication of received NTP packets.
5742b15cb3dSCy SchubertOriginally,
5752b15cb3dSCy Schubertthis was done using the Data Encryption Standard (DES) algorithm
5762b15cb3dSCy Schubertoperating in Cipher Block Chaining (CBC) mode, commonly called
5772b15cb3dSCy SchubertDES-CBC.
5782b15cb3dSCy SchubertSubsequently, this was replaced by the RSA Message Digest
5792b15cb3dSCy Schubert5 (MD5) algorithm using a private key, commonly called keyed-MD5.
5802b15cb3dSCy SchubertEither algorithm computes a message digest, or one-way hash, which
5812b15cb3dSCy Schubertcan be used to verify the server has the correct private key and
5822b15cb3dSCy Schubertkey identifier.
583052d159aSCy Schubert</p>
5842b15cb3dSCy Schubert<p>NTPv4 retains the NTPv3 scheme, properly described as symmetric key
5852b15cb3dSCy Schubertcryptography and, in addition, provides a new Autokey scheme
5862b15cb3dSCy Schubertbased on public key cryptography.
5872b15cb3dSCy SchubertPublic key cryptography is generally considered more secure
5882b15cb3dSCy Schubertthan symmetric key cryptography, since the security is based
5892b15cb3dSCy Schuberton a private value which is generated by each server and
5902b15cb3dSCy Schubertnever revealed.
5912b15cb3dSCy SchubertWith Autokey all key distribution and
5922b15cb3dSCy Schubertmanagement functions involve only public values, which
5932b15cb3dSCy Schubertconsiderably simplifies key distribution and storage.
5942b15cb3dSCy SchubertPublic key management is based on X.509 certificates,
5952b15cb3dSCy Schubertwhich can be provided by commercial services or
5962b15cb3dSCy Schubertproduced by utility programs in the OpenSSL software library
5972b15cb3dSCy Schubertor the NTPv4 distribution.
598052d159aSCy Schubert</p>
5992b15cb3dSCy Schubert<p>While the algorithms for symmetric key cryptography are
6002b15cb3dSCy Schubertincluded in the NTPv4 distribution, public key cryptography
6012b15cb3dSCy Schubertrequires the OpenSSL software library to be installed
6022b15cb3dSCy Schubertbefore building the NTP distribution.
6032b15cb3dSCy SchubertDirections for doing that
6042b15cb3dSCy Schubertare on the Building and Installing the Distribution page.
605052d159aSCy Schubert</p>
6062b15cb3dSCy Schubert<p>Authentication is configured separately for each association
6072b15cb3dSCy Schubertusing the
6082b15cb3dSCy Schubert<code>key</code>
6092b15cb3dSCy Schubertor
6102b15cb3dSCy Schubert<code>autokey</code>
6112b15cb3dSCy Schubertsubcommand on the
6122b15cb3dSCy Schubert<code>peer</code>,
6132b15cb3dSCy Schubert<code>server</code>,
6142b15cb3dSCy Schubert<code>broadcast</code>
6152b15cb3dSCy Schubertand
6162b15cb3dSCy Schubert<code>manycastclient</code>
6172b15cb3dSCy Schubertconfiguration commands as described in
618052d159aSCy Schubert&lsquo;Configuration Options&rsquo;
6192b15cb3dSCy Schubertpage.
6202b15cb3dSCy SchubertThe authentication
6212b15cb3dSCy Schubertoptions described below specify the locations of the key files,
6222b15cb3dSCy Schubertif other than default, which symmetric keys are trusted
6232b15cb3dSCy Schubertand the interval between various operations, if other than default.
624052d159aSCy Schubert</p>
6252b15cb3dSCy Schubert<p>Authentication is always enabled,
6262b15cb3dSCy Schubertalthough ineffective if not configured as
6272b15cb3dSCy Schubertdescribed below.
6282b15cb3dSCy SchubertIf a NTP packet arrives
6292b15cb3dSCy Schubertincluding a message authentication
6302b15cb3dSCy Schubertcode (MAC), it is accepted only if it
6312b15cb3dSCy Schubertpasses all cryptographic checks.
6322b15cb3dSCy SchubertThe
6332b15cb3dSCy Schubertchecks require correct key ID, key value
6342b15cb3dSCy Schubertand message digest.
6352b15cb3dSCy SchubertIf the packet has
6362b15cb3dSCy Schubertbeen modified in any way or replayed
6372b15cb3dSCy Schubertby an intruder, it will fail one or more
6382b15cb3dSCy Schubertof these checks and be discarded.
6392b15cb3dSCy SchubertFurthermore, the Autokey scheme requires a
6402b15cb3dSCy Schubertpreliminary protocol exchange to obtain
6412b15cb3dSCy Schubertthe server certificate, verify its
6422b15cb3dSCy Schubertcredentials and initialize the protocol
643052d159aSCy Schubert</p>
6442b15cb3dSCy Schubert<p>The
6452b15cb3dSCy Schubert<code>auth</code>
6462b15cb3dSCy Schubertflag controls whether new associations or
6472b15cb3dSCy Schubertremote configuration commands require cryptographic authentication.
6482b15cb3dSCy SchubertThis flag can be set or reset by the
6492b15cb3dSCy Schubert<code>enable</code>
6502b15cb3dSCy Schubertand
6512b15cb3dSCy Schubert<code>disable</code>
6522b15cb3dSCy Schubertcommands and also by remote
6532b15cb3dSCy Schubertconfiguration commands sent by a
6542b15cb3dSCy Schubert<code>ntpdc(1ntpdcmdoc)</code>
655e27abb66SXin LIprogram running on
6562b15cb3dSCy Schubertanother machine.
6572b15cb3dSCy SchubertIf this flag is enabled, which is the default
6582b15cb3dSCy Schubertcase, new broadcast client and symmetric passive associations and
6592b15cb3dSCy Schubertremote configuration commands must be cryptographically
6602b15cb3dSCy Schubertauthenticated using either symmetric key or public key cryptography.
6612b15cb3dSCy SchubertIf this
6622b15cb3dSCy Schubertflag is disabled, these operations are effective
6632b15cb3dSCy Schuberteven if not cryptographic
6642b15cb3dSCy Schubertauthenticated.
6652b15cb3dSCy SchubertIt should be understood
6662b15cb3dSCy Schubertthat operating with the
6672b15cb3dSCy Schubert<code>auth</code>
6682b15cb3dSCy Schubertflag disabled invites a significant vulnerability
6692b15cb3dSCy Schubertwhere a rogue hacker can
6702b15cb3dSCy Schubertmasquerade as a falseticker and seriously
6712b15cb3dSCy Schubertdisrupt system timekeeping.
6722b15cb3dSCy SchubertIt is
6732b15cb3dSCy Schubertimportant to note that this flag has no purpose
6742b15cb3dSCy Schubertother than to allow or disallow
6752b15cb3dSCy Schuberta new association in response to new broadcast
6762b15cb3dSCy Schubertand symmetric active messages
6772b15cb3dSCy Schubertand remote configuration commands and, in particular,
6782b15cb3dSCy Schubertthe flag has no effect on
6792b15cb3dSCy Schubertthe authentication process itself.
680052d159aSCy Schubert</p>
6812b15cb3dSCy Schubert<p>An attractive alternative where multicast support is available
6822b15cb3dSCy Schubertis manycast mode, in which clients periodically troll
6832b15cb3dSCy Schubertfor servers as described in the
6842b15cb3dSCy Schubert<a href="#Automatic-NTP-Configuration-Options">Automatic NTP Configuration Options</a>
6852b15cb3dSCy Schubertpage.
6862b15cb3dSCy SchubertEither symmetric key or public key
6872b15cb3dSCy Schubertcryptographic authentication can be used in this mode.
6882b15cb3dSCy SchubertThe principle advantage
6892b15cb3dSCy Schubertof manycast mode is that potential servers need not be
6902b15cb3dSCy Schubertconfigured in advance,
6912b15cb3dSCy Schubertsince the client finds them during regular operation,
6922b15cb3dSCy Schubertand the configuration
6932b15cb3dSCy Schubertfiles for all clients can be identical.
694052d159aSCy Schubert</p>
6952b15cb3dSCy Schubert<p>The security model and protocol schemes for
6962b15cb3dSCy Schubertboth symmetric key and public key
6972b15cb3dSCy Schubertcryptography are summarized below;
6982b15cb3dSCy Schubertfurther details are in the briefings, papers
6992b15cb3dSCy Schubertand reports at the NTP project page linked from
7002b15cb3dSCy Schubert<code>http://www.ntp.org/</code>.
701052d159aSCy Schubert</p><a name="Symmetric_002dKey-Cryptography"></a>
702052d159aSCy Schubert<h4 class="subsubsection">1.1.2.1 Symmetric-Key Cryptography</h4>
7032b15cb3dSCy Schubert<p>The original RFC-1305 specification allows any one of possibly
7044e1ef62aSXin LI65,535 keys, each distinguished by a 32-bit key identifier, to
7052b15cb3dSCy Schubertauthenticate an association.
7062b15cb3dSCy SchubertThe servers and clients involved must
7072b15cb3dSCy Schubertagree on the key and key identifier to
7082b15cb3dSCy Schubertauthenticate NTP packets.
7092b15cb3dSCy SchubertKeys and
7102b15cb3dSCy Schubertrelated information are specified in a key
7112b15cb3dSCy Schubertfile, usually called
712052d159aSCy Schubert<samp>ntp.keys</samp>,
7132b15cb3dSCy Schubertwhich must be distributed and stored using
7142b15cb3dSCy Schubertsecure means beyond the scope of the NTP protocol itself.
7152b15cb3dSCy SchubertBesides the keys used
7162b15cb3dSCy Schubertfor ordinary NTP associations,
7172b15cb3dSCy Schubertadditional keys can be used as passwords for the
7182b15cb3dSCy Schubert<code>ntpq(1ntpqmdoc)</code>
7192b15cb3dSCy Schubertand
7202b15cb3dSCy Schubert<code>ntpdc(1ntpdcmdoc)</code>
7212b15cb3dSCy Schubertutility programs.
722052d159aSCy Schubert</p>
7232b15cb3dSCy Schubert<p>When
7242b15cb3dSCy Schubert<code>ntpd(1ntpdmdoc)</code>
7252b15cb3dSCy Schubertis first started, it reads the key file specified in the
7262b15cb3dSCy Schubert<code>keys</code>
7272b15cb3dSCy Schubertconfiguration command and installs the keys
7282b15cb3dSCy Schubertin the key cache.
7292b15cb3dSCy SchubertHowever,
7302b15cb3dSCy Schubertindividual keys must be activated with the
7312b15cb3dSCy Schubert<code>trusted</code>
7322b15cb3dSCy Schubertcommand before use.
7332b15cb3dSCy SchubertThis
7342b15cb3dSCy Schubertallows, for instance, the installation of possibly
7352b15cb3dSCy Schubertseveral batches of keys and
7362b15cb3dSCy Schubertthen activating or deactivating each batch
7372b15cb3dSCy Schubertremotely using
7382b15cb3dSCy Schubert<code>ntpdc(1ntpdcmdoc)</code>.
7392b15cb3dSCy SchubertThis also provides a revocation capability that can be used
7402b15cb3dSCy Schubertif a key becomes compromised.
7412b15cb3dSCy SchubertThe
7422b15cb3dSCy Schubert<code>requestkey</code>
7432b15cb3dSCy Schubertcommand selects the key used as the password for the
7442b15cb3dSCy Schubert<code>ntpdc(1ntpdcmdoc)</code>
7452b15cb3dSCy Schubertutility, while the
7462b15cb3dSCy Schubert<code>controlkey</code>
7472b15cb3dSCy Schubertcommand selects the key used as the password for the
7482b15cb3dSCy Schubert<code>ntpq(1ntpqmdoc)</code>
7492b15cb3dSCy Schubertutility.
750052d159aSCy Schubert</p><a name="Public-Key-Cryptography"></a>
751052d159aSCy Schubert<h4 class="subsubsection">1.1.2.2 Public Key Cryptography</h4>
7522b15cb3dSCy Schubert<p>NTPv4 supports the original NTPv3 symmetric key scheme
7532b15cb3dSCy Schubertdescribed in RFC-1305 and in addition the Autokey protocol,
7542b15cb3dSCy Schubertwhich is based on public key cryptography.
7552b15cb3dSCy SchubertThe Autokey Version 2 protocol described on the Autokey Protocol
7562b15cb3dSCy Schubertpage verifies packet integrity using MD5 message digests
7572b15cb3dSCy Schubertand verifies the source with digital signatures and any of several
7582b15cb3dSCy Schubertdigest/signature schemes.
7592b15cb3dSCy SchubertOptional identity schemes described on the Identity Schemes
7602b15cb3dSCy Schubertpage and based on cryptographic challenge/response algorithms
7612b15cb3dSCy Schubertare also available.
7622b15cb3dSCy SchubertUsing all of these schemes provides strong security against
7632b15cb3dSCy Schubertreplay with or without modification, spoofing, masquerade
7642b15cb3dSCy Schubertand most forms of clogging attacks.
765052d159aSCy Schubert</p>
7662b15cb3dSCy Schubert<p>The Autokey protocol has several modes of operation
7672b15cb3dSCy Schubertcorresponding to the various NTP modes supported.
7682b15cb3dSCy SchubertMost modes use a special cookie which can be
7692b15cb3dSCy Schubertcomputed independently by the client and server,
7702b15cb3dSCy Schubertbut encrypted in transmission.
7712b15cb3dSCy SchubertAll modes use in addition a variant of the S-KEY scheme,
7722b15cb3dSCy Schubertin which a pseudo-random key list is generated and used
7732b15cb3dSCy Schubertin reverse order.
7742b15cb3dSCy SchubertThese schemes are described along with an executive summary,
7752b15cb3dSCy Schubertcurrent status, briefing slides and reading list on the
776052d159aSCy Schubert&lsquo;Autonomous Authentication&rsquo;
7772b15cb3dSCy Schubertpage.
778052d159aSCy Schubert</p>
7792b15cb3dSCy Schubert<p>The specific cryptographic environment used by Autokey servers
7802b15cb3dSCy Schubertand clients is determined by a set of files
7812b15cb3dSCy Schubertand soft links generated by the
7822b15cb3dSCy Schubert<code>ntp-keygen(1ntpkeygenmdoc)</code>
7832b15cb3dSCy Schubertprogram.
7842b15cb3dSCy SchubertThis includes a required host key file,
7852b15cb3dSCy Schubertrequired certificate file and optional sign key file,
7862b15cb3dSCy Schubertleapsecond file and identity scheme files.
7872b15cb3dSCy SchubertThe
7882b15cb3dSCy Schubertdigest/signature scheme is specified in the X.509 certificate
7892b15cb3dSCy Schubertalong with the matching sign key.
7902b15cb3dSCy SchubertThere are several schemes
7912b15cb3dSCy Schubertavailable in the OpenSSL software library, each identified
7922b15cb3dSCy Schubertby a specific string such as
7932b15cb3dSCy Schubert<code>md5WithRSAEncryption</code>,
7942b15cb3dSCy Schubertwhich stands for the MD5 message digest with RSA
7952b15cb3dSCy Schubertencryption scheme.
7962b15cb3dSCy SchubertThe current NTP distribution supports
7972b15cb3dSCy Schubertall the schemes in the OpenSSL library, including
7982b15cb3dSCy Schubertthose based on RSA and DSA digital signatures.
799052d159aSCy Schubert</p>
8002b15cb3dSCy Schubert<p>NTP secure groups can be used to define cryptographic compartments
8012b15cb3dSCy Schubertand security hierarchies.
8022b15cb3dSCy SchubertIt is important that every host
8032b15cb3dSCy Schubertin the group be able to construct a certificate trail to one
8042b15cb3dSCy Schubertor more trusted hosts in the same group.
8052b15cb3dSCy SchubertEach group
8062b15cb3dSCy Schuberthost runs the Autokey protocol to obtain the certificates
8072b15cb3dSCy Schubertfor all hosts along the trail to one or more trusted hosts.
8082b15cb3dSCy SchubertThis requires the configuration file in all hosts to be
8092b15cb3dSCy Schubertengineered so that, even under anticipated failure conditions,
8102b15cb3dSCy Schubertthe NTP subnet will form such that every group host can find
8112b15cb3dSCy Schuberta trail to at least one trusted host.
812052d159aSCy Schubert</p><a name="Naming-and-Addressing"></a>
813052d159aSCy Schubert<h4 class="subsubsection">1.1.2.3 Naming and Addressing</h4>
8142b15cb3dSCy Schubert<p>It is important to note that Autokey does not use DNS to
815052d159aSCy Schubertresolve addresses, since DNS can&rsquo;t be completely trusted
8162b15cb3dSCy Schubertuntil the name servers have synchronized clocks.
8172b15cb3dSCy SchubertThe cryptographic name used by Autokey to bind the host identity
8182b15cb3dSCy Schubertcredentials and cryptographic values must be independent
8192b15cb3dSCy Schubertof interface, network and any other naming convention.
8202b15cb3dSCy SchubertThe name appears in the host certificate in either or both
8212b15cb3dSCy Schubertthe subject and issuer fields, so protection against
8222b15cb3dSCy SchubertDNS compromise is essential.
823052d159aSCy Schubert</p>
8242b15cb3dSCy Schubert<p>By convention, the name of an Autokey host is the name returned
8252b15cb3dSCy Schubertby the Unix
8262b15cb3dSCy Schubert<code>gethostname(2)</code>
8272b15cb3dSCy Schubertsystem call or equivalent in other systems.
8282b15cb3dSCy SchubertBy the system design
8292b15cb3dSCy Schubertmodel, there are no provisions to allow alternate names or aliases.
8302b15cb3dSCy SchubertHowever, this is not to say that DNS aliases, different names
8312b15cb3dSCy Schubertfor each interface, etc., are constrained in any way.
832052d159aSCy Schubert</p>
8332b15cb3dSCy Schubert<p>It is also important to note that Autokey verifies authenticity
8342b15cb3dSCy Schubertusing the host name, network address and public keys,
8352b15cb3dSCy Schubertall of which are bound together by the protocol specifically
8362b15cb3dSCy Schubertto deflect masquerade attacks.
8372b15cb3dSCy SchubertFor this reason Autokey
838e27abb66SXin LIincludes the source and destination IP addresses in message digest
8392b15cb3dSCy Schubertcomputations and so the same addresses must be available
8402b15cb3dSCy Schubertat both the server and client.
8412b15cb3dSCy SchubertFor this reason operation
8422b15cb3dSCy Schubertwith network address translation schemes is not possible.
8432b15cb3dSCy SchubertThis reflects the intended robust security model where government
8442b15cb3dSCy Schubertand corporate NTP servers are operated outside firewall perimeters.
845052d159aSCy Schubert</p><a name="Operation"></a>
846052d159aSCy Schubert<h4 class="subsubsection">1.1.2.4 Operation</h4>
8472b15cb3dSCy Schubert<p>A specific combination of authentication scheme (none,
8482b15cb3dSCy Schubertsymmetric key, public key) and identity scheme is called
8492b15cb3dSCy Schuberta cryptotype, although not all combinations are compatible.
8502b15cb3dSCy SchubertThere may be management configurations where the clients,
8512b15cb3dSCy Schubertservers and peers may not all support the same cryptotypes.
8522b15cb3dSCy SchubertA secure NTPv4 subnet can be configured in many ways while
8532b15cb3dSCy Schubertkeeping in mind the principles explained above and
8542b15cb3dSCy Schubertin this section.
8552b15cb3dSCy SchubertNote however that some cryptotype
8562b15cb3dSCy Schubertcombinations may successfully interoperate with each other,
8572b15cb3dSCy Schubertbut may not represent good security practice.
858052d159aSCy Schubert</p>
8592b15cb3dSCy Schubert<p>The cryptotype of an association is determined at the time
8602b15cb3dSCy Schubertof mobilization, either at configuration time or some time
8612b15cb3dSCy Schubertlater when a message of appropriate cryptotype arrives.
8622b15cb3dSCy SchubertWhen mobilized by a
8632b15cb3dSCy Schubert<code>server</code>
8642b15cb3dSCy Schubertor
8652b15cb3dSCy Schubert<code>peer</code>
8662b15cb3dSCy Schubertconfiguration command and no
8672b15cb3dSCy Schubert<code>key</code>
8682b15cb3dSCy Schubertor
8692b15cb3dSCy Schubert<code>autokey</code>
8702b15cb3dSCy Schubertsubcommands are present, the association is not
8712b15cb3dSCy Schubertauthenticated; if the
8722b15cb3dSCy Schubert<code>key</code>
8732b15cb3dSCy Schubertsubcommand is present, the association is authenticated
8742b15cb3dSCy Schubertusing the symmetric key ID specified; if the
8752b15cb3dSCy Schubert<code>autokey</code>
8762b15cb3dSCy Schubertsubcommand is present, the association is authenticated
8772b15cb3dSCy Schubertusing Autokey.
878052d159aSCy Schubert</p>
8792b15cb3dSCy Schubert<p>When multiple identity schemes are supported in the Autokey
8802b15cb3dSCy Schubertprotocol, the first message exchange determines which one is used.
8812b15cb3dSCy SchubertThe client request message contains bits corresponding
8822b15cb3dSCy Schubertto which schemes it has available.
8832b15cb3dSCy SchubertThe server response message
8842b15cb3dSCy Schubertcontains bits corresponding to which schemes it has available.
8852b15cb3dSCy SchubertBoth server and client match the received bits with their own
8862b15cb3dSCy Schubertand select a common scheme.
887052d159aSCy Schubert</p>
8882b15cb3dSCy Schubert<p>Following the principle that time is a public value,
8892b15cb3dSCy Schuberta server responds to any client packet that matches
8902b15cb3dSCy Schubertits cryptotype capabilities.
8912b15cb3dSCy SchubertThus, a server receiving
8922b15cb3dSCy Schubertan unauthenticated packet will respond with an unauthenticated
8932b15cb3dSCy Schubertpacket, while the same server receiving a packet of a cryptotype
8942b15cb3dSCy Schubertit supports will respond with packets of that cryptotype.
8952b15cb3dSCy SchubertHowever, unconfigured broadcast or manycast client
8962b15cb3dSCy Schubertassociations or symmetric passive associations will not be
8972b15cb3dSCy Schubertmobilized unless the server supports a cryptotype compatible
8982b15cb3dSCy Schubertwith the first packet received.
8992b15cb3dSCy SchubertBy default, unauthenticated associations will not be mobilized
9002b15cb3dSCy Schubertunless overridden in a decidedly dangerous way.
901052d159aSCy Schubert</p>
9022b15cb3dSCy Schubert<p>Some examples may help to reduce confusion.
9032b15cb3dSCy SchubertClient Alice has no specific cryptotype selected.
9042b15cb3dSCy SchubertServer Bob has both a symmetric key file and minimal Autokey files.
905052d159aSCy SchubertAlice&rsquo;s unauthenticated messages arrive at Bob, who replies with
9062b15cb3dSCy Schubertunauthenticated messages.
907052d159aSCy SchubertCathy has a copy of Bob&rsquo;s symmetric
9082b15cb3dSCy Schubertkey file and has selected key ID 4 in messages to Bob.
9092b15cb3dSCy SchubertBob verifies the message with his key ID 4.
910052d159aSCy SchubertIf it&rsquo;s the
9112b15cb3dSCy Schubertsame key and the message is verified, Bob sends Cathy a reply
9122b15cb3dSCy Schubertauthenticated with that key.
9132b15cb3dSCy SchubertIf verification fails,
9142b15cb3dSCy SchubertBob sends Cathy a thing called a crypto-NAK, which tells her
9152b15cb3dSCy Schubertsomething broke.
9162b15cb3dSCy SchubertShe can see the evidence using the
9172b15cb3dSCy Schubert<code>ntpq(1ntpqmdoc)</code>
9182b15cb3dSCy Schubertprogram.
919052d159aSCy Schubert</p>
9202b15cb3dSCy Schubert<p>Denise has rolled her own host key and certificate.
9212b15cb3dSCy SchubertShe also uses one of the identity schemes as Bob.
9222b15cb3dSCy SchubertShe sends the first Autokey message to Bob and they
9232b15cb3dSCy Schubertboth dance the protocol authentication and identity steps.
9242b15cb3dSCy SchubertIf all comes out okay, Denise and Bob continue as described above.
925052d159aSCy Schubert</p>
9262b15cb3dSCy Schubert<p>It should be clear from the above that Bob can support
9272b15cb3dSCy Schubertall the girls at the same time, as long as he has compatible
9282b15cb3dSCy Schubertauthentication and identity credentials.
9292b15cb3dSCy SchubertNow, Bob can act just like the girls in his own choice of servers;
9302b15cb3dSCy Schuberthe can run multiple configured associations with multiple different
9312b15cb3dSCy Schubertservers (or the same server, although that might not be useful).
9322b15cb3dSCy SchubertBut, wise security policy might preclude some cryptotype
9332b15cb3dSCy Schubertcombinations; for instance, running an identity scheme
9342b15cb3dSCy Schubertwith one server and no authentication with another might not be wise.
935052d159aSCy Schubert</p><a name="Key-Management"></a>
936052d159aSCy Schubert<h4 class="subsubsection">1.1.2.5 Key Management</h4>
9372b15cb3dSCy Schubert<p>The cryptographic values used by the Autokey protocol are
9382b15cb3dSCy Schubertincorporated as a set of files generated by the
9392b15cb3dSCy Schubert<code>ntp-keygen(1ntpkeygenmdoc)</code>
9402b15cb3dSCy Schubertutility program, including symmetric key, host key and
9412b15cb3dSCy Schubertpublic certificate files, as well as sign key, identity parameters
9422b15cb3dSCy Schubertand leapseconds files.
9432b15cb3dSCy SchubertAlternatively, host and sign keys and
9442b15cb3dSCy Schubertcertificate files can be generated by the OpenSSL utilities
9452b15cb3dSCy Schubertand certificates can be imported from public certificate
9462b15cb3dSCy Schubertauthorities.
9472b15cb3dSCy SchubertNote that symmetric keys are necessary for the
9482b15cb3dSCy Schubert<code>ntpq(1ntpqmdoc)</code>
9492b15cb3dSCy Schubertand
9502b15cb3dSCy Schubert<code>ntpdc(1ntpdcmdoc)</code>
9512b15cb3dSCy Schubertutility programs.
9522b15cb3dSCy SchubertThe remaining files are necessary only for the
9532b15cb3dSCy SchubertAutokey protocol.
954052d159aSCy Schubert</p>
9552b15cb3dSCy Schubert<p>Certificates imported from OpenSSL or public certificate
9562b15cb3dSCy Schubertauthorities have certian limitations.
9572b15cb3dSCy SchubertThe certificate should be in ASN.1 syntax, X.509 Version 3
9582b15cb3dSCy Schubertformat and encoded in PEM, which is the same format
9592b15cb3dSCy Schubertused by OpenSSL.
9602b15cb3dSCy SchubertThe overall length of the certificate encoded
9612b15cb3dSCy Schubertin ASN.1 must not exceed 1024 bytes.
9622b15cb3dSCy SchubertThe subject distinguished
9632b15cb3dSCy Schubertname field (CN) is the fully qualified name of the host
9642b15cb3dSCy Schuberton which it is used; the remaining subject fields are ignored.
9652b15cb3dSCy SchubertThe certificate extension fields must not contain either
9662b15cb3dSCy Schuberta subject key identifier or a issuer key identifier field;
9672b15cb3dSCy Schuberthowever, an extended key usage field for a trusted host must
9682b15cb3dSCy Schubertcontain the value
9692b15cb3dSCy Schubert<code>trustRoot</code>;.
9702b15cb3dSCy SchubertOther extension fields are ignored.
971052d159aSCy Schubert</p><a name="Authentication-Commands"></a>
972052d159aSCy Schubert<h4 class="subsubsection">1.1.2.6 Authentication Commands</h4>
973052d159aSCy Schubert<dl compact="compact">
974052d159aSCy Schubert<dt><code>autokey</code> <code>[<kbd>logsec</kbd>]</code></dt>
975052d159aSCy Schubert<dd><p>Specifies the interval between regenerations of the session key
9762b15cb3dSCy Schubertlist used with the Autokey protocol.
9772b15cb3dSCy SchubertNote that the size of the key
9782b15cb3dSCy Schubertlist for each association depends on this interval and the current
9792b15cb3dSCy Schubertpoll interval.
9802b15cb3dSCy SchubertThe default value is 12 (4096 s or about 1.1 hours).
9812b15cb3dSCy SchubertFor poll intervals above the specified interval, a session key list
9822b15cb3dSCy Schubertwith a single entry will be regenerated for every message
9832b15cb3dSCy Schubertsent.
984052d159aSCy Schubert</p></dd>
985052d159aSCy Schubert<dt><code>controlkey</code> <kbd>key</kbd></dt>
986052d159aSCy Schubert<dd><p>Specifies the key identifier to use with the
9872b15cb3dSCy Schubert<code>ntpq(1ntpqmdoc)</code>
9882b15cb3dSCy Schubertutility, which uses the standard
9892b15cb3dSCy Schubertprotocol defined in RFC-1305.
9902b15cb3dSCy SchubertThe
9912b15cb3dSCy Schubert<kbd>key</kbd>
9922b15cb3dSCy Schubertargument is
9932b15cb3dSCy Schubertthe key identifier for a trusted key, where the value can be in the
9944e1ef62aSXin LIrange 1 to 65,535, inclusive.
995052d159aSCy Schubert</p></dd>
996052d159aSCy Schubert<dt><code>crypto</code> <code>[<code>cert</code> <kbd>file</kbd>]</code> <code>[<code>leap</code> <kbd>file</kbd>]</code> <code>[<code>randfile</code> <kbd>file</kbd>]</code> <code>[<code>host</code> <kbd>file</kbd>]</code> <code>[<code>sign</code> <kbd>file</kbd>]</code> <code>[<code>gq</code> <kbd>file</kbd>]</code> <code>[<code>gqpar</code> <kbd>file</kbd>]</code> <code>[<code>iffpar</code> <kbd>file</kbd>]</code> <code>[<code>mvpar</code> <kbd>file</kbd>]</code> <code>[<code>pw</code> <kbd>password</kbd>]</code></dt>
997052d159aSCy Schubert<dd><p>This command requires the OpenSSL library.
9982b15cb3dSCy SchubertIt activates public key
9992b15cb3dSCy Schubertcryptography, selects the message digest and signature
10002b15cb3dSCy Schubertencryption scheme and loads the required private and public
10012b15cb3dSCy Schubertvalues described above.
10022b15cb3dSCy SchubertIf one or more files are left unspecified,
10032b15cb3dSCy Schubertthe default names are used as described above.
10042b15cb3dSCy SchubertUnless the complete path and name of the file are specified, the
10052b15cb3dSCy Schubertlocation of a file is relative to the keys directory specified
10062b15cb3dSCy Schubertin the
10072b15cb3dSCy Schubert<code>keysdir</code>
10082b15cb3dSCy Schubertcommand or default
1009052d159aSCy Schubert<samp>/usr/local/etc</samp>.
10102b15cb3dSCy SchubertFollowing are the subcommands:
1011052d159aSCy Schubert</p><dl compact="compact">
1012052d159aSCy Schubert<dt><code>cert</code> <kbd>file</kbd></dt>
1013052d159aSCy Schubert<dd><p>Specifies the location of the required host public certificate file.
10142b15cb3dSCy SchubertThis overrides the link
1015052d159aSCy Schubert<samp>ntpkey_cert_</samp><kbd>hostname</kbd>
10162b15cb3dSCy Schubertin the keys directory.
1017052d159aSCy Schubert</p></dd>
1018052d159aSCy Schubert<dt><code>gqpar</code> <kbd>file</kbd></dt>
1019052d159aSCy Schubert<dd><p>Specifies the location of the optional GQ parameters file.
10202b15cb3dSCy SchubertThis
10212b15cb3dSCy Schubertoverrides the link
1022052d159aSCy Schubert<samp>ntpkey_gq_</samp><kbd>hostname</kbd>
10232b15cb3dSCy Schubertin the keys directory.
1024052d159aSCy Schubert</p></dd>
1025052d159aSCy Schubert<dt><code>host</code> <kbd>file</kbd></dt>
1026052d159aSCy Schubert<dd><p>Specifies the location of the required host key file.
10272b15cb3dSCy SchubertThis overrides
10282b15cb3dSCy Schubertthe link
1029052d159aSCy Schubert<samp>ntpkey_key_</samp><kbd>hostname</kbd>
10302b15cb3dSCy Schubertin the keys directory.
1031052d159aSCy Schubert</p></dd>
1032052d159aSCy Schubert<dt><code>iffpar</code> <kbd>file</kbd></dt>
1033052d159aSCy Schubert<dd><p>Specifies the location of the optional IFF parameters file.
1034e27abb66SXin LIThis overrides the link
1035052d159aSCy Schubert<samp>ntpkey_iff_</samp><kbd>hostname</kbd>
10362b15cb3dSCy Schubertin the keys directory.
1037052d159aSCy Schubert</p></dd>
1038052d159aSCy Schubert<dt><code>leap</code> <kbd>file</kbd></dt>
1039052d159aSCy Schubert<dd><p>Specifies the location of the optional leapsecond file.
10402b15cb3dSCy SchubertThis overrides the link
1041052d159aSCy Schubert<samp>ntpkey_leap</samp>
10422b15cb3dSCy Schubertin the keys directory.
1043052d159aSCy Schubert</p></dd>
1044052d159aSCy Schubert<dt><code>mvpar</code> <kbd>file</kbd></dt>
1045052d159aSCy Schubert<dd><p>Specifies the location of the optional MV parameters file.
1046e27abb66SXin LIThis overrides the link
1047052d159aSCy Schubert<samp>ntpkey_mv_</samp><kbd>hostname</kbd>
10482b15cb3dSCy Schubertin the keys directory.
1049052d159aSCy Schubert</p></dd>
1050052d159aSCy Schubert<dt><code>pw</code> <kbd>password</kbd></dt>
1051052d159aSCy Schubert<dd><p>Specifies the password to decrypt files containing private keys and
10522b15cb3dSCy Schubertidentity parameters.
10532b15cb3dSCy SchubertThis is required only if these files have been
10542b15cb3dSCy Schubertencrypted.
1055052d159aSCy Schubert</p></dd>
1056052d159aSCy Schubert<dt><code>randfile</code> <kbd>file</kbd></dt>
1057052d159aSCy Schubert<dd><p>Specifies the location of the random seed file used by the OpenSSL
10582b15cb3dSCy Schubertlibrary.
10592b15cb3dSCy SchubertThe defaults are described in the main text above.
1060052d159aSCy Schubert</p></dd>
1061052d159aSCy Schubert<dt><code>sign</code> <kbd>file</kbd></dt>
1062052d159aSCy Schubert<dd><p>Specifies the location of the optional sign key file.
10632b15cb3dSCy SchubertThis overrides
10642b15cb3dSCy Schubertthe link
1065052d159aSCy Schubert<samp>ntpkey_sign_</samp><kbd>hostname</kbd>
10662b15cb3dSCy Schubertin the keys directory.
10672b15cb3dSCy SchubertIf this file is
10682b15cb3dSCy Schubertnot found, the host key is also the sign key.
1069052d159aSCy Schubert</p></dd>
10702b15cb3dSCy Schubert</dl>
1071052d159aSCy Schubert</dd>
1072052d159aSCy Schubert<dt><code>keys</code> <kbd>keyfile</kbd></dt>
1073052d159aSCy Schubert<dd><p>Specifies the complete path and location of the MD5 key file
10742b15cb3dSCy Schubertcontaining the keys and key identifiers used by
10752b15cb3dSCy Schubert<code>ntpd(1ntpdmdoc)</code>,
10762b15cb3dSCy Schubert<code>ntpq(1ntpqmdoc)</code>
10772b15cb3dSCy Schubertand
10782b15cb3dSCy Schubert<code>ntpdc(1ntpdcmdoc)</code>
10792b15cb3dSCy Schubertwhen operating with symmetric key cryptography.
10802b15cb3dSCy SchubertThis is the same operation as the
10812b15cb3dSCy Schubert<code>-k</code>
10822b15cb3dSCy Schubertcommand line option.
1083052d159aSCy Schubert</p></dd>
1084052d159aSCy Schubert<dt><code>keysdir</code> <kbd>path</kbd></dt>
1085052d159aSCy Schubert<dd><p>This command specifies the default directory path for
10862b15cb3dSCy Schubertcryptographic keys, parameters and certificates.
10872b15cb3dSCy SchubertThe default is
1088052d159aSCy Schubert<samp>/usr/local/etc/</samp>.
1089052d159aSCy Schubert</p></dd>
1090052d159aSCy Schubert<dt><code>requestkey</code> <kbd>key</kbd></dt>
1091052d159aSCy Schubert<dd><p>Specifies the key identifier to use with the
10922b15cb3dSCy Schubert<code>ntpdc(1ntpdcmdoc)</code>
10932b15cb3dSCy Schubertutility program, which uses a
10942b15cb3dSCy Schubertproprietary protocol specific to this implementation of
10952b15cb3dSCy Schubert<code>ntpd(1ntpdmdoc)</code>.
10962b15cb3dSCy SchubertThe
10972b15cb3dSCy Schubert<kbd>key</kbd>
10982b15cb3dSCy Schubertargument is a key identifier
10992b15cb3dSCy Schubertfor the trusted key, where the value can be in the range 1 to
11004e1ef62aSXin LI65,535, inclusive.
1101052d159aSCy Schubert</p></dd>
1102052d159aSCy Schubert<dt><code>revoke</code> <kbd>logsec</kbd></dt>
1103052d159aSCy Schubert<dd><p>Specifies the interval between re-randomization of certain
11042b15cb3dSCy Schubertcryptographic values used by the Autokey scheme, as a power of 2 in
11052b15cb3dSCy Schubertseconds.
11062b15cb3dSCy SchubertThese values need to be updated frequently in order to
11072b15cb3dSCy Schubertdeflect brute-force attacks on the algorithms of the scheme;
11082b15cb3dSCy Schuberthowever, updating some values is a relatively expensive operation.
11092b15cb3dSCy SchubertThe default interval is 16 (65,536 s or about 18 hours).
11102b15cb3dSCy SchubertFor poll
11112b15cb3dSCy Schubertintervals above the specified interval, the values will be updated
11122b15cb3dSCy Schubertfor every message sent.
1113052d159aSCy Schubert</p></dd>
1114052d159aSCy Schubert<dt><code>trustedkey</code> <kbd>key</kbd> <kbd>...</kbd></dt>
1115052d159aSCy Schubert<dd><p>Specifies the key identifiers which are trusted for the
11162b15cb3dSCy Schubertpurposes of authenticating peers with symmetric key cryptography,
11172b15cb3dSCy Schubertas well as keys used by the
11182b15cb3dSCy Schubert<code>ntpq(1ntpqmdoc)</code>
11192b15cb3dSCy Schubertand
11202b15cb3dSCy Schubert<code>ntpdc(1ntpdcmdoc)</code>
11212b15cb3dSCy Schubertprograms.
11222b15cb3dSCy SchubertThe authentication procedures require that both the local
11232b15cb3dSCy Schubertand remote servers share the same key and key identifier for this
11242b15cb3dSCy Schubertpurpose, although different keys can be used with different
11252b15cb3dSCy Schubertservers.
11262b15cb3dSCy SchubertThe
11272b15cb3dSCy Schubert<kbd>key</kbd>
11282b15cb3dSCy Schubertarguments are 32-bit unsigned
11294e1ef62aSXin LIintegers with values from 1 to 65,535.
1130052d159aSCy Schubert</p></dd>
11312b15cb3dSCy Schubert</dl>
1132052d159aSCy Schubert<a name="Error-Codes"></a>
1133052d159aSCy Schubert<h4 class="subsubsection">1.1.2.7 Error Codes</h4>
11342b15cb3dSCy Schubert<p>The following error codes are reported via the NTP control
11352b15cb3dSCy Schubertand monitoring protocol trap mechanism.
1136052d159aSCy Schubert</p><dl compact="compact">
1137052d159aSCy Schubert<dt>101</dt>
1138052d159aSCy Schubert<dd><p>(bad field format or length)
11392b15cb3dSCy SchubertThe packet has invalid version, length or format.
1140052d159aSCy Schubert</p></dd>
1141052d159aSCy Schubert<dt>102</dt>
1142052d159aSCy Schubert<dd><p>(bad timestamp)
11432b15cb3dSCy SchubertThe packet timestamp is the same or older than the most recent received.
11442b15cb3dSCy SchubertThis could be due to a replay or a server clock time step.
1145052d159aSCy Schubert</p></dd>
1146052d159aSCy Schubert<dt>103</dt>
1147052d159aSCy Schubert<dd><p>(bad filestamp)
11482b15cb3dSCy SchubertThe packet filestamp is the same or older than the most recent received.
11492b15cb3dSCy SchubertThis could be due to a replay or a key file generation error.
1150052d159aSCy Schubert</p></dd>
1151052d159aSCy Schubert<dt>104</dt>
1152052d159aSCy Schubert<dd><p>(bad or missing public key)
11532b15cb3dSCy SchubertThe public key is missing, has incorrect format or is an unsupported type.
1154052d159aSCy Schubert</p></dd>
1155052d159aSCy Schubert<dt>105</dt>
1156052d159aSCy Schubert<dd><p>(unsupported digest type)
11572b15cb3dSCy SchubertThe server requires an unsupported digest/signature scheme.
1158052d159aSCy Schubert</p></dd>
1159052d159aSCy Schubert<dt>106</dt>
1160052d159aSCy Schubert<dd><p>(mismatched digest types)
11612b15cb3dSCy SchubertNot used.
1162052d159aSCy Schubert</p></dd>
1163052d159aSCy Schubert<dt>107</dt>
1164052d159aSCy Schubert<dd><p>(bad signature length)
11652b15cb3dSCy SchubertThe signature length does not match the current public key.
1166052d159aSCy Schubert</p></dd>
1167052d159aSCy Schubert<dt>108</dt>
1168052d159aSCy Schubert<dd><p>(signature not verified)
11692b15cb3dSCy SchubertThe message fails the signature check.
11702b15cb3dSCy SchubertIt could be bogus or signed by a
11712b15cb3dSCy Schubertdifferent private key.
1172052d159aSCy Schubert</p></dd>
1173052d159aSCy Schubert<dt>109</dt>
1174052d159aSCy Schubert<dd><p>(certificate not verified)
11752b15cb3dSCy SchubertThe certificate is invalid or signed with the wrong key.
1176052d159aSCy Schubert</p></dd>
1177052d159aSCy Schubert<dt>110</dt>
1178052d159aSCy Schubert<dd><p>(certificate not verified)
11792b15cb3dSCy SchubertThe certificate is not yet valid or has expired or the signature could not
11802b15cb3dSCy Schubertbe verified.
1181052d159aSCy Schubert</p></dd>
1182052d159aSCy Schubert<dt>111</dt>
1183052d159aSCy Schubert<dd><p>(bad or missing cookie)
11842b15cb3dSCy SchubertThe cookie is missing, corrupted or bogus.
1185052d159aSCy Schubert</p></dd>
1186052d159aSCy Schubert<dt>112</dt>
1187052d159aSCy Schubert<dd><p>(bad or missing leapseconds table)
11882b15cb3dSCy SchubertThe leapseconds table is missing, corrupted or bogus.
1189052d159aSCy Schubert</p></dd>
1190052d159aSCy Schubert<dt>113</dt>
1191052d159aSCy Schubert<dd><p>(bad or missing certificate)
11922b15cb3dSCy SchubertThe certificate is missing, corrupted or bogus.
1193052d159aSCy Schubert</p></dd>
1194052d159aSCy Schubert<dt>114</dt>
1195052d159aSCy Schubert<dd><p>(bad or missing identity)
11962b15cb3dSCy SchubertThe identity key is missing, corrupt or bogus.
1197052d159aSCy Schubert</p></dd>
11982b15cb3dSCy Schubert</dl>
1199052d159aSCy Schubert<hr>
12002b15cb3dSCy Schubert<a name="Monitoring-Support"></a>
1201052d159aSCy Schubert<div class="header">
1202052d159aSCy Schubert<p>
1203052d159aSCy SchubertNext: <a href="#Access-Control-Support" accesskey="n" rel="next">Access Control Support</a>, Previous: <a href="#Authentication-Support" accesskey="p" rel="prev">Authentication Support</a>, Up: <a href="#ntp_002econf-Notes" accesskey="u" rel="up">ntp.conf Notes</a> &nbsp; </p>
12042b15cb3dSCy Schubert</div>
1205052d159aSCy Schubert<a name="Monitoring-Support-1"></a>
1206052d159aSCy Schubert<h4 class="subsection">1.1.3 Monitoring Support</h4>
12072b15cb3dSCy Schubert<p><code>ntpd(1ntpdmdoc)</code>
12082b15cb3dSCy Schubertincludes a comprehensive monitoring facility suitable
12092b15cb3dSCy Schubertfor continuous, long term recording of server and client
12102b15cb3dSCy Schuberttimekeeping performance.
12112b15cb3dSCy SchubertSee the
12122b15cb3dSCy Schubert<code>statistics</code>
12132b15cb3dSCy Schubertcommand below
12142b15cb3dSCy Schubertfor a listing and example of each type of statistics currently
12152b15cb3dSCy Schubertsupported.
12162b15cb3dSCy SchubertStatistic files are managed using file generation sets
12172b15cb3dSCy Schubertand scripts in the
1218052d159aSCy Schubert<samp>./scripts</samp>
1219e27abb66SXin LIdirectory of the source code distribution.
12202b15cb3dSCy SchubertUsing
12212b15cb3dSCy Schubertthese facilities and
1222052d159aSCy Schubert<small>UNIX</small>
12232b15cb3dSCy Schubert<code>cron(8)</code>
12242b15cb3dSCy Schubertjobs, the data can be
12252b15cb3dSCy Schubertautomatically summarized and archived for retrospective analysis.
1226052d159aSCy Schubert</p><a name="Monitoring-Commands"></a>
1227052d159aSCy Schubert<h4 class="subsubsection">1.1.3.1 Monitoring Commands</h4>
1228052d159aSCy Schubert<dl compact="compact">
1229052d159aSCy Schubert<dt><code>statistics</code> <kbd>name</kbd> <kbd>...</kbd></dt>
1230052d159aSCy Schubert<dd><p>Enables writing of statistics records.
12312b15cb3dSCy SchubertCurrently, eight kinds of
12322b15cb3dSCy Schubert<kbd>name</kbd>
12332b15cb3dSCy Schubertstatistics are supported.
1234052d159aSCy Schubert</p><dl compact="compact">
1235052d159aSCy Schubert<dt><code>clockstats</code></dt>
1236052d159aSCy Schubert<dd><p>Enables recording of clock driver statistics information.
12372b15cb3dSCy SchubertEach update
12382b15cb3dSCy Schubertreceived from a clock driver appends a line of the following form to
12392b15cb3dSCy Schubertthe file generation set named
12402b15cb3dSCy Schubert<code>clockstats</code>:
1241052d159aSCy Schubert</p><pre class="verbatim">49213 525.624 127.127.4.1 93 226 00:08:29.606 D
12422b15cb3dSCy Schubert</pre>
12432b15cb3dSCy Schubert<p>The first two fields show the date (Modified Julian Day) and time
12442b15cb3dSCy Schubert(seconds and fraction past UTC midnight).
12452b15cb3dSCy SchubertThe next field shows the
12462b15cb3dSCy Schubertclock address in dotted-quad notation.
12472b15cb3dSCy SchubertThe final field shows the last
12482b15cb3dSCy Schuberttimecode received from the clock in decoded ASCII format, where
12492b15cb3dSCy Schubertmeaningful.
12502b15cb3dSCy SchubertIn some clock drivers a good deal of additional information
12512b15cb3dSCy Schubertcan be gathered and displayed as well.
12522b15cb3dSCy SchubertSee information specific to each
12532b15cb3dSCy Schubertclock for further details.
1254052d159aSCy Schubert</p></dd>
1255052d159aSCy Schubert<dt><code>cryptostats</code></dt>
1256052d159aSCy Schubert<dd><p>This option requires the OpenSSL cryptographic software library.
12572b15cb3dSCy SchubertIt
12582b15cb3dSCy Schubertenables recording of cryptographic public key protocol information.
12592b15cb3dSCy SchubertEach message received by the protocol module appends a line of the
12602b15cb3dSCy Schubertfollowing form to the file generation set named
12612b15cb3dSCy Schubert<code>cryptostats</code>:
1262052d159aSCy Schubert</p><pre class="verbatim">49213 525.624 127.127.4.1 message
12632b15cb3dSCy Schubert</pre>
12642b15cb3dSCy Schubert<p>The first two fields show the date (Modified Julian Day) and time
12652b15cb3dSCy Schubert(seconds and fraction past UTC midnight).
12662b15cb3dSCy SchubertThe next field shows the peer
12672b15cb3dSCy Schubertaddress in dotted-quad notation, The final message field includes the
12682b15cb3dSCy Schubertmessage type and certain ancillary information.
12692b15cb3dSCy SchubertSee the
1270052d159aSCy Schubert&lsquo;Authentication Options&rsquo;
12712b15cb3dSCy Schubertsection for further information.
1272052d159aSCy Schubert</p></dd>
1273052d159aSCy Schubert<dt><code>loopstats</code></dt>
1274052d159aSCy Schubert<dd><p>Enables recording of loop filter statistics information.
12752b15cb3dSCy SchubertEach
12762b15cb3dSCy Schubertupdate of the local clock outputs a line of the following form to
12772b15cb3dSCy Schubertthe file generation set named
12782b15cb3dSCy Schubert<code>loopstats</code>:
1279052d159aSCy Schubert</p><pre class="verbatim">50935 75440.031 0.000006019 13.778190 0.000351733 0.0133806
12802b15cb3dSCy Schubert</pre>
12812b15cb3dSCy Schubert<p>The first two fields show the date (Modified Julian Day) and
12822b15cb3dSCy Schuberttime (seconds and fraction past UTC midnight).
12832b15cb3dSCy SchubertThe next five fields
12842b15cb3dSCy Schubertshow time offset (seconds), frequency offset (parts per million -
12852b15cb3dSCy SchubertPPM), RMS jitter (seconds), Allan deviation (PPM) and clock
12862b15cb3dSCy Schubertdiscipline time constant.
1287052d159aSCy Schubert</p></dd>
1288052d159aSCy Schubert<dt><code>peerstats</code></dt>
1289052d159aSCy Schubert<dd><p>Enables recording of peer statistics information.
12902b15cb3dSCy SchubertThis includes
12912b15cb3dSCy Schubertstatistics records of all peers of a NTP server and of special
12922b15cb3dSCy Schubertsignals, where present and configured.
12932b15cb3dSCy SchubertEach valid update appends a
12942b15cb3dSCy Schubertline of the following form to the current element of a file
12952b15cb3dSCy Schubertgeneration set named
12962b15cb3dSCy Schubert<code>peerstats</code>:
1297052d159aSCy Schubert</p><pre class="verbatim">48773 10847.650 127.127.4.1 9714 -0.001605376 0.000000000 0.001424877 0.000958674
12982b15cb3dSCy Schubert</pre>
12992b15cb3dSCy Schubert<p>The first two fields show the date (Modified Julian Day) and
13002b15cb3dSCy Schuberttime (seconds and fraction past UTC midnight).
13012b15cb3dSCy SchubertThe next two fields
13022b15cb3dSCy Schubertshow the peer address in dotted-quad notation and status,
13032b15cb3dSCy Schubertrespectively.
13042b15cb3dSCy SchubertThe status field is encoded in hex in the format
13052b15cb3dSCy Schubertdescribed in Appendix A of the NTP specification RFC 1305.
13062b15cb3dSCy SchubertThe final four fields show the offset,
13072b15cb3dSCy Schubertdelay, dispersion and RMS jitter, all in seconds.
1308052d159aSCy Schubert</p></dd>
1309052d159aSCy Schubert<dt><code>rawstats</code></dt>
1310052d159aSCy Schubert<dd><p>Enables recording of raw-timestamp statistics information.
13112b15cb3dSCy SchubertThis
13122b15cb3dSCy Schubertincludes statistics records of all peers of a NTP server and of
13132b15cb3dSCy Schubertspecial signals, where present and configured.
13142b15cb3dSCy SchubertEach NTP message
13152b15cb3dSCy Schubertreceived from a peer or clock driver appends a line of the
13162b15cb3dSCy Schubertfollowing form to the file generation set named
13172b15cb3dSCy Schubert<code>rawstats</code>:
1318052d159aSCy Schubert</p><pre class="verbatim">50928 2132.543 128.4.1.1 128.4.1.20 3102453281.584327000 3102453281.58622800031 02453332.540806000 3102453332.541458000
13192b15cb3dSCy Schubert</pre>
13202b15cb3dSCy Schubert<p>The first two fields show the date (Modified Julian Day) and
13212b15cb3dSCy Schuberttime (seconds and fraction past UTC midnight).
13222b15cb3dSCy SchubertThe next two fields
13232b15cb3dSCy Schubertshow the remote peer or clock address followed by the local address
13242b15cb3dSCy Schubertin dotted-quad notation.
13252b15cb3dSCy SchubertThe final four fields show the originate,
13262b15cb3dSCy Schubertreceive, transmit and final NTP timestamps in order.
13272b15cb3dSCy SchubertThe timestamp
13282b15cb3dSCy Schubertvalues are as received and before processing by the various data
13292b15cb3dSCy Schubertsmoothing and mitigation algorithms.
1330052d159aSCy Schubert</p></dd>
1331052d159aSCy Schubert<dt><code>sysstats</code></dt>
1332052d159aSCy Schubert<dd><p>Enables recording of ntpd statistics counters on a periodic basis.
13332b15cb3dSCy SchubertEach
13342b15cb3dSCy Schuberthour a line of the following form is appended to the file generation
13352b15cb3dSCy Schubertset named
13362b15cb3dSCy Schubert<code>sysstats</code>:
1337052d159aSCy Schubert</p><pre class="verbatim">50928 2132.543 36000 81965 0 9546 56 71793 512 540 10 147
13382b15cb3dSCy Schubert</pre>
13392b15cb3dSCy Schubert<p>The first two fields show the date (Modified Julian Day) and time
13402b15cb3dSCy Schubert(seconds and fraction past UTC midnight).
13412b15cb3dSCy SchubertThe remaining ten fields show
13422b15cb3dSCy Schubertthe statistics counter values accumulated since the last generated
13432b15cb3dSCy Schubertline.
1344052d159aSCy Schubert</p><dl compact="compact">
1345052d159aSCy Schubert<dt>Time since restart <code>36000</code></dt>
1346052d159aSCy Schubert<dd><p>Time in hours since the system was last rebooted.
1347052d159aSCy Schubert</p></dd>
1348052d159aSCy Schubert<dt>Packets received <code>81965</code></dt>
1349052d159aSCy Schubert<dd><p>Total number of packets received.
1350052d159aSCy Schubert</p></dd>
1351052d159aSCy Schubert<dt>Packets processed <code>0</code></dt>
1352052d159aSCy Schubert<dd><p>Number of packets received in response to previous packets sent
1353052d159aSCy Schubert</p></dd>
1354052d159aSCy Schubert<dt>Current version <code>9546</code></dt>
1355052d159aSCy Schubert<dd><p>Number of packets matching the current NTP version.
1356052d159aSCy Schubert</p></dd>
1357052d159aSCy Schubert<dt>Previous version <code>56</code></dt>
1358052d159aSCy Schubert<dd><p>Number of packets matching the previous NTP version.
1359052d159aSCy Schubert</p></dd>
1360052d159aSCy Schubert<dt>Bad version <code>71793</code></dt>
1361052d159aSCy Schubert<dd><p>Number of packets matching neither NTP version.
1362052d159aSCy Schubert</p></dd>
1363052d159aSCy Schubert<dt>Access denied <code>512</code></dt>
1364052d159aSCy Schubert<dd><p>Number of packets denied access for any reason.
1365052d159aSCy Schubert</p></dd>
1366052d159aSCy Schubert<dt>Bad length or format <code>540</code></dt>
1367052d159aSCy Schubert<dd><p>Number of packets with invalid length, format or port number.
1368052d159aSCy Schubert</p></dd>
1369052d159aSCy Schubert<dt>Bad authentication <code>10</code></dt>
1370052d159aSCy Schubert<dd><p>Number of packets not verified as authentic.
1371052d159aSCy Schubert</p></dd>
1372052d159aSCy Schubert<dt>Rate exceeded <code>147</code></dt>
1373052d159aSCy Schubert<dd><p>Number of packets discarded due to rate limitation.
1374052d159aSCy Schubert</p></dd>
13752b15cb3dSCy Schubert</dl>
1376052d159aSCy Schubert</dd>
1377052d159aSCy Schubert<dt><code>statsdir</code> <kbd>directory_path</kbd></dt>
1378052d159aSCy Schubert<dd><p>Indicates the full path of a directory where statistics files
13792b15cb3dSCy Schubertshould be created (see below).
13802b15cb3dSCy SchubertThis keyword allows
13812b15cb3dSCy Schubertthe (otherwise constant)
13822b15cb3dSCy Schubert<code>filegen</code>
13832b15cb3dSCy Schubertfilename prefix to be modified for file generation sets, which
13842b15cb3dSCy Schubertis useful for handling statistics logs.
1385052d159aSCy Schubert</p></dd>
1386052d159aSCy Schubert<dt><code>filegen</code> <kbd>name</kbd> <code>[<code>file</code> <kbd>filename</kbd>]</code> <code>[<code>type</code> <kbd>typename</kbd>]</code> <code>[<code>link</code> | <code>nolink</code>]</code> <code>[<code>enable</code> | <code>disable</code>]</code></dt>
1387052d159aSCy Schubert<dd><p>Configures setting of generation file set name.
13882b15cb3dSCy SchubertGeneration
13892b15cb3dSCy Schubertfile sets provide a means for handling files that are
13902b15cb3dSCy Schubertcontinuously growing during the lifetime of a server.
13912b15cb3dSCy SchubertServer statistics are a typical example for such files.
13922b15cb3dSCy SchubertGeneration file sets provide access to a set of files used
13932b15cb3dSCy Schubertto store the actual data.
13942b15cb3dSCy SchubertAt any time at most one element
13952b15cb3dSCy Schubertof the set is being written to.
13962b15cb3dSCy SchubertThe type given specifies
13972b15cb3dSCy Schubertwhen and how data will be directed to a new element of the set.
13982b15cb3dSCy SchubertThis way, information stored in elements of a file set
13992b15cb3dSCy Schubertthat are currently unused are available for administrational
14002b15cb3dSCy Schubertoperations without the risk of disturbing the operation of ntpd.
14012b15cb3dSCy Schubert(Most important: they can be removed to free space for new data
14022b15cb3dSCy Schubertproduced.)
1403052d159aSCy Schubert</p>
14042b15cb3dSCy Schubert<p>Note that this command can be sent from the
14052b15cb3dSCy Schubert<code>ntpdc(1ntpdcmdoc)</code>
14062b15cb3dSCy Schubertprogram running at a remote location.
1407052d159aSCy Schubert</p><dl compact="compact">
1408052d159aSCy Schubert<dt><code>name</code></dt>
1409052d159aSCy Schubert<dd><p>This is the type of the statistics records, as shown in the
14102b15cb3dSCy Schubert<code>statistics</code>
14112b15cb3dSCy Schubertcommand.
1412052d159aSCy Schubert</p></dd>
1413052d159aSCy Schubert<dt><code>file</code> <kbd>filename</kbd></dt>
1414052d159aSCy Schubert<dd><p>This is the file name for the statistics records.
14152b15cb3dSCy SchubertFilenames of set
14162b15cb3dSCy Schubertmembers are built from three concatenated elements
14172b15cb3dSCy Schubert<code>prefix</code>,
14182b15cb3dSCy Schubert<code>filename</code>
14192b15cb3dSCy Schubertand
14202b15cb3dSCy Schubert<code>suffix</code>:
1421052d159aSCy Schubert</p><dl compact="compact">
1422052d159aSCy Schubert<dt><code>prefix</code></dt>
1423052d159aSCy Schubert<dd><p>This is a constant filename path.
14242b15cb3dSCy SchubertIt is not subject to
14252b15cb3dSCy Schubertmodifications via the
14262b15cb3dSCy Schubert<kbd>filegen</kbd>
14272b15cb3dSCy Schubertoption.
14282b15cb3dSCy SchubertIt is defined by the
14292b15cb3dSCy Schubertserver, usually specified as a compile-time constant.
14302b15cb3dSCy SchubertIt may,
14312b15cb3dSCy Schuberthowever, be configurable for individual file generation sets
14322b15cb3dSCy Schubertvia other commands.
14332b15cb3dSCy SchubertFor example, the prefix used with
14342b15cb3dSCy Schubert<kbd>loopstats</kbd>
14352b15cb3dSCy Schubertand
14362b15cb3dSCy Schubert<kbd>peerstats</kbd>
14372b15cb3dSCy Schubertgeneration can be configured using the
14382b15cb3dSCy Schubert<kbd>statsdir</kbd>
14392b15cb3dSCy Schubertoption explained above.
1440052d159aSCy Schubert</p></dd>
1441052d159aSCy Schubert<dt><code>filename</code></dt>
1442052d159aSCy Schubert<dd><p>This string is directly concatenated to the prefix mentioned
14432b15cb3dSCy Schubertabove (no intervening
1444052d159aSCy Schubert&lsquo;/&rsquo;).
14452b15cb3dSCy SchubertThis can be modified using
14462b15cb3dSCy Schubertthe file argument to the
14472b15cb3dSCy Schubert<kbd>filegen</kbd>
14482b15cb3dSCy Schubertstatement.
14492b15cb3dSCy SchubertNo
1450052d159aSCy Schubert<samp>..</samp>
14512b15cb3dSCy Schubertelements are
14522b15cb3dSCy Schubertallowed in this component to prevent filenames referring to
14532b15cb3dSCy Schubertparts outside the filesystem hierarchy denoted by
14542b15cb3dSCy Schubert<kbd>prefix</kbd>.
1455052d159aSCy Schubert</p></dd>
1456052d159aSCy Schubert<dt><code>suffix</code></dt>
1457052d159aSCy Schubert<dd><p>This part is reflects individual elements of a file set.
14582b15cb3dSCy SchubertIt is
14592b15cb3dSCy Schubertgenerated according to the type of a file set.
1460052d159aSCy Schubert</p></dd>
14612b15cb3dSCy Schubert</dl>
1462052d159aSCy Schubert</dd>
1463052d159aSCy Schubert<dt><code>type</code> <kbd>typename</kbd></dt>
1464052d159aSCy Schubert<dd><p>A file generation set is characterized by its type.
14652b15cb3dSCy SchubertThe following
14662b15cb3dSCy Schuberttypes are supported:
1467052d159aSCy Schubert</p><dl compact="compact">
1468052d159aSCy Schubert<dt><code>none</code></dt>
1469052d159aSCy Schubert<dd><p>The file set is actually a single plain file.
1470052d159aSCy Schubert</p></dd>
1471052d159aSCy Schubert<dt><code>pid</code></dt>
1472052d159aSCy Schubert<dd><p>One element of file set is used per incarnation of a ntpd
14732b15cb3dSCy Schubertserver.
14742b15cb3dSCy SchubertThis type does not perform any changes to file set
14752b15cb3dSCy Schubertmembers during runtime, however it provides an easy way of
14762b15cb3dSCy Schubertseparating files belonging to different
14772b15cb3dSCy Schubert<code>ntpd(1ntpdmdoc)</code>
14782b15cb3dSCy Schubertserver incarnations.
14792b15cb3dSCy SchubertThe set member filename is built by appending a
1480052d159aSCy Schubert&lsquo;.&rsquo;
14812b15cb3dSCy Schubertto concatenated
14822b15cb3dSCy Schubert<kbd>prefix</kbd>
14832b15cb3dSCy Schubertand
14842b15cb3dSCy Schubert<kbd>filename</kbd>
14852b15cb3dSCy Schubertstrings, and
14862b15cb3dSCy Schubertappending the decimal representation of the process ID of the
14872b15cb3dSCy Schubert<code>ntpd(1ntpdmdoc)</code>
14882b15cb3dSCy Schubertserver process.
1489052d159aSCy Schubert</p></dd>
1490052d159aSCy Schubert<dt><code>day</code></dt>
1491052d159aSCy Schubert<dd><p>One file generation set element is created per day.
14922b15cb3dSCy SchubertA day is
14932b15cb3dSCy Schubertdefined as the period between 00:00 and 24:00 UTC.
14942b15cb3dSCy SchubertThe file set
14952b15cb3dSCy Schubertmember suffix consists of a
1496052d159aSCy Schubert&lsquo;.&rsquo;
14972b15cb3dSCy Schubertand a day specification in
14982b15cb3dSCy Schubertthe form
14992b15cb3dSCy Schubert<code>YYYYMMdd</code>.
15002b15cb3dSCy Schubert<code>YYYY</code>
15012b15cb3dSCy Schubertis a 4-digit year number (e.g., 1992).
15022b15cb3dSCy Schubert<code>MM</code>
15032b15cb3dSCy Schubertis a two digit month number.
15042b15cb3dSCy Schubert<code>dd</code>
15052b15cb3dSCy Schubertis a two digit day number.
15062b15cb3dSCy SchubertThus, all information written at 10 December 1992 would end up
15072b15cb3dSCy Schubertin a file named
15082b15cb3dSCy Schubert<kbd>prefix</kbd>
15092b15cb3dSCy Schubert<kbd>filename</kbd>.19921210.
1510052d159aSCy Schubert</p></dd>
1511052d159aSCy Schubert<dt><code>week</code></dt>
1512052d159aSCy Schubert<dd><p>Any file set member contains data related to a certain week of
15132b15cb3dSCy Schuberta year.
15142b15cb3dSCy SchubertThe term week is defined by computing day-of-year
15152b15cb3dSCy Schubertmodulo 7.
15162b15cb3dSCy SchubertElements of such a file generation set are
15172b15cb3dSCy Schubertdistinguished by appending the following suffix to the file set
15182b15cb3dSCy Schubertfilename base: A dot, a 4-digit year number, the letter
15192b15cb3dSCy Schubert<code>W</code>,
15202b15cb3dSCy Schubertand a 2-digit week number.
15212b15cb3dSCy SchubertFor example, information from January,
15222b15cb3dSCy Schubert10th 1992 would end up in a file with suffix
15232b15cb3dSCy Schubert.No . Ns Ar 1992W1 .
1524052d159aSCy Schubert</p></dd>
1525052d159aSCy Schubert<dt><code>month</code></dt>
1526052d159aSCy Schubert<dd><p>One generation file set element is generated per month.
15272b15cb3dSCy SchubertThe
15282b15cb3dSCy Schubertfile name suffix consists of a dot, a 4-digit year number, and
15292b15cb3dSCy Schuberta 2-digit month.
1530052d159aSCy Schubert</p></dd>
1531052d159aSCy Schubert<dt><code>year</code></dt>
1532052d159aSCy Schubert<dd><p>One generation file element is generated per year.
15332b15cb3dSCy SchubertThe filename
15342b15cb3dSCy Schubertsuffix consists of a dot and a 4 digit year number.
1535052d159aSCy Schubert</p></dd>
1536052d159aSCy Schubert<dt><code>age</code></dt>
1537052d159aSCy Schubert<dd><p>This type of file generation sets changes to a new element of
15382b15cb3dSCy Schubertthe file set every 24 hours of server operation.
15392b15cb3dSCy SchubertThe filename
15402b15cb3dSCy Schubertsuffix consists of a dot, the letter
15412b15cb3dSCy Schubert<code>a</code>,
15422b15cb3dSCy Schubertand an 8-digit number.
15432b15cb3dSCy SchubertThis number is taken to be the number of seconds the server is
15442b15cb3dSCy Schubertrunning at the start of the corresponding 24-hour period.
15452b15cb3dSCy SchubertInformation is only written to a file generation by specifying
15462b15cb3dSCy Schubert<code>enable</code>;
15472b15cb3dSCy Schubertoutput is prevented by specifying
15482b15cb3dSCy Schubert<code>disable</code>.
1549052d159aSCy Schubert</p></dd>
15502b15cb3dSCy Schubert</dl>
1551052d159aSCy Schubert</dd>
1552052d159aSCy Schubert<dt><code>link</code> | <code>nolink</code></dt>
1553052d159aSCy Schubert<dd><p>It is convenient to be able to access the current element of a file
15542b15cb3dSCy Schubertgeneration set by a fixed name.
15552b15cb3dSCy SchubertThis feature is enabled by
15562b15cb3dSCy Schubertspecifying
15572b15cb3dSCy Schubert<code>link</code>
15582b15cb3dSCy Schubertand disabled using
15592b15cb3dSCy Schubert<code>nolink</code>.
15602b15cb3dSCy SchubertIf link is specified, a
15612b15cb3dSCy Schuberthard link from the current file set element to a file without
15622b15cb3dSCy Schubertsuffix is created.
15632b15cb3dSCy SchubertWhen there is already a file with this name and
15642b15cb3dSCy Schubertthe number of links of this file is one, it is renamed appending a
15652b15cb3dSCy Schubertdot, the letter
15662b15cb3dSCy Schubert<code>C</code>,
1567e27abb66SXin LIand the pid of the
1568e27abb66SXin LI<code>ntpd(1ntpdmdoc)</code>
1569e27abb66SXin LIserver process.
15702b15cb3dSCy SchubertWhen the
15712b15cb3dSCy Schubertnumber of links is greater than one, the file is unlinked.
15722b15cb3dSCy SchubertThis
15732b15cb3dSCy Schubertallows the current file to be accessed by a constant name.
1574052d159aSCy Schubert</p></dd>
1575052d159aSCy Schubert<dt><code>enable</code> <code>|</code> <code>disable</code></dt>
1576052d159aSCy Schubert<dd><p>Enables or disables the recording function.
1577052d159aSCy Schubert</p></dd>
15782b15cb3dSCy Schubert</dl>
1579052d159aSCy Schubert</dd>
15802b15cb3dSCy Schubert</dl>
1581052d159aSCy Schubert</dd>
15822b15cb3dSCy Schubert</dl>
1583052d159aSCy Schubert<hr>
15842b15cb3dSCy Schubert<a name="Access-Control-Support"></a>
1585052d159aSCy Schubert<div class="header">
1586052d159aSCy Schubert<p>
1587052d159aSCy SchubertNext: <a href="#Automatic-NTP-Configuration-Options" accesskey="n" rel="next">Automatic NTP Configuration Options</a>, Previous: <a href="#Monitoring-Support" accesskey="p" rel="prev">Monitoring Support</a>, Up: <a href="#ntp_002econf-Notes" accesskey="u" rel="up">ntp.conf Notes</a> &nbsp; </p>
15882b15cb3dSCy Schubert</div>
1589052d159aSCy Schubert<a name="Access-Control-Support-1"></a>
1590052d159aSCy Schubert<h4 class="subsection">1.1.4 Access Control Support</h4>
15912b15cb3dSCy Schubert<p>The
15922b15cb3dSCy Schubert<code>ntpd(1ntpdmdoc)</code>
15932b15cb3dSCy Schubertdaemon implements a general purpose address/mask based restriction
15942b15cb3dSCy Schubertlist.
15952b15cb3dSCy SchubertThe list contains address/match entries sorted first
15962b15cb3dSCy Schubertby increasing address values and and then by increasing mask values.
15972b15cb3dSCy SchubertA match occurs when the bitwise AND of the mask and the packet
15982b15cb3dSCy Schubertsource address is equal to the bitwise AND of the mask and
15992b15cb3dSCy Schubertaddress in the list.
16002b15cb3dSCy SchubertThe list is searched in order with the
16012b15cb3dSCy Schubertlast match found defining the restriction flags associated
16022b15cb3dSCy Schubertwith the entry.
16032b15cb3dSCy SchubertAdditional information and examples can be found in the
1604052d159aSCy Schubert&quot;Notes on Configuring NTP and Setting up a NTP Subnet&quot;
16052b15cb3dSCy Schubertpage
16062b15cb3dSCy Schubert(available as part of the HTML documentation
16072b15cb3dSCy Schubertprovided in
1608052d159aSCy Schubert<samp>/usr/share/doc/ntp</samp>).
1609052d159aSCy Schubert</p>
16102b15cb3dSCy Schubert<p>The restriction facility was implemented in conformance
16112b15cb3dSCy Schubertwith the access policies for the original NSFnet backbone
16122b15cb3dSCy Schuberttime servers.
16132b15cb3dSCy SchubertLater the facility was expanded to deflect
16142b15cb3dSCy Schubertcryptographic and clogging attacks.
16152b15cb3dSCy SchubertWhile this facility may
16162b15cb3dSCy Schubertbe useful for keeping unwanted or broken or malicious clients
16172b15cb3dSCy Schubertfrom congesting innocent servers, it should not be considered
16182b15cb3dSCy Schubertan alternative to the NTP authentication facilities.
16192b15cb3dSCy SchubertSource address based restrictions are easily circumvented
16202b15cb3dSCy Schubertby a determined cracker.
1621052d159aSCy Schubert</p>
16222b15cb3dSCy Schubert<p>Clients can be denied service because they are explicitly
16234990d495SXin LIincluded in the restrict list created by the
16244990d495SXin LI<code>restrict</code>
16254990d495SXin LIcommand
16262b15cb3dSCy Schubertor implicitly as the result of cryptographic or rate limit
16272b15cb3dSCy Schubertviolations.
16282b15cb3dSCy SchubertCryptographic violations include certificate
16292b15cb3dSCy Schubertor identity verification failure; rate limit violations generally
16302b15cb3dSCy Schubertresult from defective NTP implementations that send packets
16312b15cb3dSCy Schubertat abusive rates.
16322b15cb3dSCy SchubertSome violations cause denied service
16332b15cb3dSCy Schubertonly for the offending packet, others cause denied service
16342b15cb3dSCy Schubertfor a timed period and others cause the denied service for
1635e27abb66SXin LIan indefinite period.
16362b15cb3dSCy SchubertWhen a client or network is denied access
1637e27abb66SXin LIfor an indefinite period, the only way at present to remove
16382b15cb3dSCy Schubertthe restrictions is by restarting the server.
1639052d159aSCy Schubert</p><a name="The-Kiss_002dof_002dDeath-Packet"></a>
1640052d159aSCy Schubert<h4 class="subsubsection">1.1.4.1 The Kiss-of-Death Packet</h4>
16412b15cb3dSCy Schubert<p>Ordinarily, packets denied service are simply dropped with no
16422b15cb3dSCy Schubertfurther action except incrementing statistics counters.
16432b15cb3dSCy SchubertSometimes a
16442b15cb3dSCy Schubertmore proactive response is needed, such as a server message that
16452b15cb3dSCy Schubertexplicitly requests the client to stop sending and leave a message
16462b15cb3dSCy Schubertfor the system operator.
16472b15cb3dSCy SchubertA special packet format has been created
1648052d159aSCy Schubertfor this purpose called the &quot;kiss-of-death&quot; (KoD) packet.
16492b15cb3dSCy SchubertKoD packets have the leap bits set unsynchronized and stratum set
16502b15cb3dSCy Schubertto zero and the reference identifier field set to a four-byte
16512b15cb3dSCy SchubertASCII code.
16522b15cb3dSCy SchubertIf the
16532b15cb3dSCy Schubert<code>noserve</code>
16542b15cb3dSCy Schubertor
16552b15cb3dSCy Schubert<code>notrust</code>
16562b15cb3dSCy Schubertflag of the matching restrict list entry is set,
1657052d159aSCy Schubertthe code is &quot;DENY&quot;; if the
16582b15cb3dSCy Schubert<code>limited</code>
16592b15cb3dSCy Schubertflag is set and the rate limit
1660052d159aSCy Schubertis exceeded, the code is &quot;RATE&quot;.
1661052d159aSCy SchubertFinally, if a cryptographic violation occurs, the code is &quot;CRYP&quot;.
1662052d159aSCy Schubert</p>
16632b15cb3dSCy Schubert<p>A client receiving a KoD performs a set of sanity checks to
16642b15cb3dSCy Schubertminimize security exposure, then updates the stratum and
16652b15cb3dSCy Schubertreference identifier peer variables, sets the access
16662b15cb3dSCy Schubertdenied (TEST4) bit in the peer flash variable and sends
16672b15cb3dSCy Schuberta message to the log.
16682b15cb3dSCy SchubertAs long as the TEST4 bit is set,
16692b15cb3dSCy Schubertthe client will send no further packets to the server.
16702b15cb3dSCy SchubertThe only way at present to recover from this condition is
16712b15cb3dSCy Schubertto restart the protocol at both the client and server.
16722b15cb3dSCy SchubertThis
16732b15cb3dSCy Schuberthappens automatically at the client when the association times out.
16742b15cb3dSCy SchubertIt will happen at the server only if the server operator cooperates.
1675052d159aSCy Schubert</p><a name="Access-Control-Commands"></a>
1676052d159aSCy Schubert<h4 class="subsubsection">1.1.4.2 Access Control Commands</h4>
1677052d159aSCy Schubert<dl compact="compact">
1678052d159aSCy Schubert<dt><code>discard</code> <code>[<code>average</code> <kbd>avg</kbd>]</code> <code>[<code>minimum</code> <kbd>min</kbd>]</code> <code>[<code>monitor</code> <kbd>prob</kbd>]</code></dt>
1679052d159aSCy Schubert<dd><p>Set the parameters of the
16802b15cb3dSCy Schubert<code>limited</code>
16812b15cb3dSCy Schubertfacility which protects the server from
16822b15cb3dSCy Schubertclient abuse.
16832b15cb3dSCy SchubertThe
16842b15cb3dSCy Schubert<code>average</code>
16852b15cb3dSCy Schubertsubcommand specifies the minimum average packet
16862b15cb3dSCy Schubertspacing, while the
16872b15cb3dSCy Schubert<code>minimum</code>
16882b15cb3dSCy Schubertsubcommand specifies the minimum packet spacing.
16892b15cb3dSCy SchubertPackets that violate these minima are discarded
1690052d159aSCy Schubertand a kiss-o&rsquo;-death packet returned if enabled.
16912b15cb3dSCy SchubertThe default
16922b15cb3dSCy Schubertminimum average and minimum are 5 and 2, respectively.
16934990d495SXin LIThe
16944990d495SXin LI<code>monitor</code>
16954990d495SXin LIsubcommand specifies the probability of discard
16962b15cb3dSCy Schubertfor packets that overflow the rate-control window.
1697052d159aSCy Schubert</p></dd>
1698052d159aSCy Schubert<dt><code>restrict</code> <code>address</code> <code>[<code>mask</code> <kbd>mask</kbd>]</code> <code>[<code>ippeerlimit</code> <kbd>int</kbd>]</code> <code>[<kbd>flag</kbd> <kbd>...</kbd>]</code></dt>
1699052d159aSCy Schubert<dd><p>The
17002b15cb3dSCy Schubert<kbd>address</kbd>
17012b15cb3dSCy Schubertargument expressed in
17022b15cb3dSCy Schubertdotted-quad form is the address of a host or network.
17032b15cb3dSCy SchubertAlternatively, the
17042b15cb3dSCy Schubert<kbd>address</kbd>
17052b15cb3dSCy Schubertargument can be a valid host DNS name.
17062b15cb3dSCy SchubertThe
17072b15cb3dSCy Schubert<kbd>mask</kbd>
17082b15cb3dSCy Schubertargument expressed in dotted-quad form defaults to
17092b15cb3dSCy Schubert<code>255.255.255.255</code>,
17102b15cb3dSCy Schubertmeaning that the
17112b15cb3dSCy Schubert<kbd>address</kbd>
17122b15cb3dSCy Schubertis treated as the address of an individual host.
17132b15cb3dSCy SchubertA default entry (address
17142b15cb3dSCy Schubert<code>0.0.0.0</code>,
17152b15cb3dSCy Schubertmask
17162b15cb3dSCy Schubert<code>0.0.0.0</code>)
17172b15cb3dSCy Schubertis always included and is always the first entry in the list.
17182b15cb3dSCy SchubertNote that text string
17192b15cb3dSCy Schubert<code>default</code>,
17202b15cb3dSCy Schubertwith no mask option, may
17212b15cb3dSCy Schubertbe used to indicate the default entry.
172209100258SXin LIThe
172309100258SXin LI<code>ippeerlimit</code>
172409100258SXin LIdirective limits the number of peer requests for each IP to
172509100258SXin LI<kbd>int</kbd>,
1726052d159aSCy Schubertwhere a value of -1 means &quot;unlimited&quot;, the current default.
1727052d159aSCy SchubertA value of 0 means &quot;none&quot;.
172809100258SXin LIThere would usually be at most 1 peering request per IP,
172909100258SXin LIbut if the remote peering requests are behind a proxy
173009100258SXin LIthere could well be more than 1 per IP.
17312b15cb3dSCy SchubertIn the current implementation,
17322b15cb3dSCy Schubert<code>flag</code>
17332b15cb3dSCy Schubertalways
17342b15cb3dSCy Schubertrestricts access, i.e., an entry with no flags indicates that free
17352b15cb3dSCy Schubertaccess to the server is to be given.
17362b15cb3dSCy SchubertThe flags are not orthogonal,
17372b15cb3dSCy Schubertin that more restrictive flags will often make less restrictive
17382b15cb3dSCy Schubertones redundant.
17392b15cb3dSCy SchubertThe flags can generally be classed into two
17402b15cb3dSCy Schubertcategories, those which restrict time service and those which
17412b15cb3dSCy Schubertrestrict informational queries and attempts to do run-time
17422b15cb3dSCy Schubertreconfiguration of the server.
17432b15cb3dSCy SchubertOne or more of the following flags
17442b15cb3dSCy Schubertmay be specified:
1745052d159aSCy Schubert</p><dl compact="compact">
1746052d159aSCy Schubert<dt><code>ignore</code></dt>
1747052d159aSCy Schubert<dd><p>Deny packets of all kinds, including
17482b15cb3dSCy Schubert<code>ntpq(1ntpqmdoc)</code>
17492b15cb3dSCy Schubertand
17502b15cb3dSCy Schubert<code>ntpdc(1ntpdcmdoc)</code>
17512b15cb3dSCy Schubertqueries.
1752052d159aSCy Schubert</p></dd>
1753052d159aSCy Schubert<dt><code>kod</code></dt>
1754052d159aSCy Schubert<dd><p>If this flag is set when an access violation occurs, a kiss-o&rsquo;-death
17552b15cb3dSCy Schubert(KoD) packet is sent.
17562b15cb3dSCy SchubertKoD packets are rate limited to no more than one
17572b15cb3dSCy Schubertper second.
17582b15cb3dSCy SchubertIf another KoD packet occurs within one second after the
17592b15cb3dSCy Schubertlast one, the packet is dropped.
1760052d159aSCy Schubert</p></dd>
1761052d159aSCy Schubert<dt><code>limited</code></dt>
1762052d159aSCy Schubert<dd><p>Deny service if the packet spacing violates the lower limits specified
17634990d495SXin LIin the
17644990d495SXin LI<code>discard</code>
17654990d495SXin LIcommand.
17662b15cb3dSCy SchubertA history of clients is kept using the
17672b15cb3dSCy Schubertmonitoring capability of
17682b15cb3dSCy Schubert<code>ntpd(1ntpdmdoc)</code>.
17692b15cb3dSCy SchubertThus, monitoring is always active as
17702b15cb3dSCy Schubertlong as there is a restriction entry with the
17712b15cb3dSCy Schubert<code>limited</code>
17722b15cb3dSCy Schubertflag.
1773052d159aSCy Schubert</p></dd>
1774052d159aSCy Schubert<dt><code>lowpriotrap</code></dt>
1775052d159aSCy Schubert<dd><p>Declare traps set by matching hosts to be low priority.
17762b15cb3dSCy SchubertThe
17772b15cb3dSCy Schubertnumber of traps a server can maintain is limited (the current limit
17782b15cb3dSCy Schubertis 3).
17792b15cb3dSCy SchubertTraps are usually assigned on a first come, first served
17802b15cb3dSCy Schubertbasis, with later trap requestors being denied service.
17812b15cb3dSCy SchubertThis flag
17822b15cb3dSCy Schubertmodifies the assignment algorithm by allowing low priority traps to
17832b15cb3dSCy Schubertbe overridden by later requests for normal priority traps.
1784052d159aSCy Schubert</p></dd>
1785052d159aSCy Schubert<dt><code>noepeer</code></dt>
1786052d159aSCy Schubert<dd><p>Deny ephemeral peer requests,
178709100258SXin LIeven if they come from an authenticated source.
178809100258SXin LINote that the ability to use a symmetric key for authentication may be restricted to
178909100258SXin LIone or more IPs or subnets via the third field of the
1790052d159aSCy Schubert<samp>ntp.keys</samp>
179109100258SXin LIfile.
179209100258SXin LIThis restriction is not enabled by default,
179309100258SXin LIto maintain backward compatability.
179409100258SXin LIExpect
179509100258SXin LI<code>noepeer</code>
179609100258SXin LIto become the default in ntp-4.4.
1797052d159aSCy Schubert</p></dd>
1798052d159aSCy Schubert<dt><code>nomodify</code></dt>
1799052d159aSCy Schubert<dd><p>Deny
18002b15cb3dSCy Schubert<code>ntpq(1ntpqmdoc)</code>
18012b15cb3dSCy Schubertand
18022b15cb3dSCy Schubert<code>ntpdc(1ntpdcmdoc)</code>
18032b15cb3dSCy Schubertqueries which attempt to modify the state of the
18042b15cb3dSCy Schubertserver (i.e., run time reconfiguration).
18052b15cb3dSCy SchubertQueries which return
18062b15cb3dSCy Schubertinformation are permitted.
1807052d159aSCy Schubert</p></dd>
1808052d159aSCy Schubert<dt><code>noquery</code></dt>
1809052d159aSCy Schubert<dd><p>Deny
18102b15cb3dSCy Schubert<code>ntpq(1ntpqmdoc)</code>
18112b15cb3dSCy Schubertand
18122b15cb3dSCy Schubert<code>ntpdc(1ntpdcmdoc)</code>
18132b15cb3dSCy Schubertqueries.
18142b15cb3dSCy SchubertTime service is not affected.
1815052d159aSCy Schubert</p></dd>
1816052d159aSCy Schubert<dt><code>nopeer</code></dt>
1817052d159aSCy Schubert<dd><p>Deny unauthenticated packets which would result in mobilizing a new association.
181809100258SXin LIThis includes
181909100258SXin LIbroadcast and symmetric active packets
182009100258SXin LIwhen a configured association does not exist.
18212b15cb3dSCy SchubertIt also includes
18222b15cb3dSCy Schubert<code>pool</code>
18232b15cb3dSCy Schubertassociations, so if you want to use servers from a
18242b15cb3dSCy Schubert<code>pool</code>
18252b15cb3dSCy Schubertdirective and also want to use
18262b15cb3dSCy Schubert<code>nopeer</code>
1827052d159aSCy Schubertby default, you&rsquo;ll want a
182809100258SXin LI<code>restrict source ...</code>
182909100258SXin LIline as well that does
183009100258SXin LI<em>not</em>
183109100258SXin LIinclude the
18322b15cb3dSCy Schubert<code>nopeer</code>
18332b15cb3dSCy Schubertdirective.
1834052d159aSCy Schubert</p></dd>
1835052d159aSCy Schubert<dt><code>noserve</code></dt>
1836052d159aSCy Schubert<dd><p>Deny all packets except
18372b15cb3dSCy Schubert<code>ntpq(1ntpqmdoc)</code>
18382b15cb3dSCy Schubertand
18392b15cb3dSCy Schubert<code>ntpdc(1ntpdcmdoc)</code>
18402b15cb3dSCy Schubertqueries.
1841052d159aSCy Schubert</p></dd>
1842052d159aSCy Schubert<dt><code>notrap</code></dt>
1843052d159aSCy Schubert<dd><p>Decline to provide mode 6 control message trap service to matching
18442b15cb3dSCy Schuberthosts.
1845e27abb66SXin LIThe trap service is a subsystem of the
1846e27abb66SXin LI<code>ntpq(1ntpqmdoc)</code>
1847e27abb66SXin LIcontrol message
18482b15cb3dSCy Schubertprotocol which is intended for use by remote event logging programs.
1849052d159aSCy Schubert</p></dd>
1850052d159aSCy Schubert<dt><code>notrust</code></dt>
1851052d159aSCy Schubert<dd><p>Deny service unless the packet is cryptographically authenticated.
1852052d159aSCy Schubert</p></dd>
1853052d159aSCy Schubert<dt><code>ntpport</code></dt>
1854052d159aSCy Schubert<dd><p>This is actually a match algorithm modifier, rather than a
18552b15cb3dSCy Schubertrestriction flag.
18562b15cb3dSCy SchubertIts presence causes the restriction entry to be
18572b15cb3dSCy Schubertmatched only if the source port in the packet is the standard NTP
18582b15cb3dSCy SchubertUDP port (123).
18592b15cb3dSCy SchubertBoth
18602b15cb3dSCy Schubert<code>ntpport</code>
18612b15cb3dSCy Schubertand
18622b15cb3dSCy Schubert<code>non-ntpport</code>
18632b15cb3dSCy Schubertmay
18642b15cb3dSCy Schubertbe specified.
18652b15cb3dSCy SchubertThe
18662b15cb3dSCy Schubert<code>ntpport</code>
18672b15cb3dSCy Schubertis considered more specific and
18682b15cb3dSCy Schubertis sorted later in the list.
1869052d159aSCy Schubert</p></dd>
1870*2d4e511cSCy Schubert<dt><code>serverresponse fuzz</code></dt>
1871*2d4e511cSCy Schubert<dd><p>When reponding to server requests,
1872*2d4e511cSCy Schubertfuzz the low order bits of the
1873*2d4e511cSCy Schubert<code>reftime</code>.
1874*2d4e511cSCy Schubert</p></dd>
1875052d159aSCy Schubert<dt><code>version</code></dt>
1876052d159aSCy Schubert<dd><p>Deny packets that do not match the current NTP version.
1877052d159aSCy Schubert</p></dd>
18782b15cb3dSCy Schubert</dl>
18792b15cb3dSCy Schubert
18802b15cb3dSCy Schubert<p>Default restriction list entries with the flags ignore, interface,
1881052d159aSCy Schubertntpport, for each of the local host&rsquo;s interface addresses are
18822b15cb3dSCy Schubertinserted into the table at startup to prevent the server
18832b15cb3dSCy Schubertfrom attempting to synchronize to its own time.
18842b15cb3dSCy SchubertA default entry is also always present, though if it is
18852b15cb3dSCy Schubertotherwise unconfigured; no flags are associated
18862b15cb3dSCy Schubertwith the default entry (i.e., everything besides your own
18872b15cb3dSCy SchubertNTP server is unrestricted).
1888052d159aSCy Schubert</p></dd>
18892b15cb3dSCy Schubert</dl>
1890052d159aSCy Schubert<hr>
18912b15cb3dSCy Schubert<a name="Automatic-NTP-Configuration-Options"></a>
1892052d159aSCy Schubert<div class="header">
1893052d159aSCy Schubert<p>
1894052d159aSCy SchubertNext: <a href="#Reference-Clock-Support" accesskey="n" rel="next">Reference Clock Support</a>, Previous: <a href="#Access-Control-Support" accesskey="p" rel="prev">Access Control Support</a>, Up: <a href="#ntp_002econf-Notes" accesskey="u" rel="up">ntp.conf Notes</a> &nbsp; </p>
18952b15cb3dSCy Schubert</div>
1896052d159aSCy Schubert<a name="Automatic-NTP-Configuration-Options-1"></a>
1897052d159aSCy Schubert<h4 class="subsection">1.1.5 Automatic NTP Configuration Options</h4>
1898052d159aSCy Schubert<a name="Manycasting"></a>
1899052d159aSCy Schubert<h4 class="subsubsection">1.1.5.1 Manycasting</h4>
19002b15cb3dSCy Schubert<p>Manycasting is a automatic discovery and configuration paradigm
19012b15cb3dSCy Schubertnew to NTPv4.
19022b15cb3dSCy SchubertIt is intended as a means for a multicast client
19032b15cb3dSCy Schubertto troll the nearby network neighborhood to find cooperating
19042b15cb3dSCy Schubertmanycast servers, validate them using cryptographic means
19052b15cb3dSCy Schubertand evaluate their time values with respect to other servers
19062b15cb3dSCy Schubertthat might be lurking in the vicinity.
19072b15cb3dSCy SchubertThe intended result is that each manycast client mobilizes
1908052d159aSCy Schubertclient associations with some number of the &quot;best&quot;
19092b15cb3dSCy Schubertof the nearby manycast servers, yet automatically reconfigures
19102b15cb3dSCy Schubertto sustain this number of servers should one or another fail.
1911052d159aSCy Schubert</p>
19122b15cb3dSCy Schubert<p>Note that the manycasting paradigm does not coincide
19132b15cb3dSCy Schubertwith the anycast paradigm described in RFC-1546,
19142b15cb3dSCy Schubertwhich is designed to find a single server from a clique
19152b15cb3dSCy Schubertof servers providing the same service.
19162b15cb3dSCy SchubertThe manycast paradigm is designed to find a plurality
19172b15cb3dSCy Schubertof redundant servers satisfying defined optimality criteria.
1918052d159aSCy Schubert</p>
19192b15cb3dSCy Schubert<p>Manycasting can be used with either symmetric key
19202b15cb3dSCy Schubertor public key cryptography.
19212b15cb3dSCy SchubertThe public key infrastructure (PKI)
19222b15cb3dSCy Schubertoffers the best protection against compromised keys
19232b15cb3dSCy Schubertand is generally considered stronger, at least with relatively
19242b15cb3dSCy Schubertlarge key sizes.
19252b15cb3dSCy SchubertIt is implemented using the Autokey protocol and
19262b15cb3dSCy Schubertthe OpenSSL cryptographic library available from
19272b15cb3dSCy Schubert<code>http://www.openssl.org/</code>.
19282b15cb3dSCy SchubertThe library can also be used with other NTPv4 modes
19292b15cb3dSCy Schubertas well and is highly recommended, especially for broadcast modes.
1930052d159aSCy Schubert</p>
19312b15cb3dSCy Schubert<p>A persistent manycast client association is configured
19324990d495SXin LIusing the
19334990d495SXin LI<code>manycastclient</code>
19344990d495SXin LIcommand, which is similar to the
19354990d495SXin LI<code>server</code>
19364990d495SXin LIcommand but with a multicast (IPv4 class
19372b15cb3dSCy Schubert<code>D</code>
19382b15cb3dSCy Schubertor IPv6 prefix
19392b15cb3dSCy Schubert<code>FF</code>)
19402b15cb3dSCy Schubertgroup address.
19412b15cb3dSCy SchubertThe IANA has designated IPv4 address 224.1.1.1
19422b15cb3dSCy Schubertand IPv6 address FF05::101 (site local) for NTP.
19432b15cb3dSCy SchubertWhen more servers are needed, it broadcasts manycast
19442b15cb3dSCy Schubertclient messages to this address at the minimum feasible rate
19452b15cb3dSCy Schubertand minimum feasible time-to-live (TTL) hops, depending
19462b15cb3dSCy Schuberton how many servers have already been found.
19472b15cb3dSCy SchubertThere can be as many manycast client associations
19482b15cb3dSCy Schubertas different group address, each one serving as a template
19492b15cb3dSCy Schubertfor a future ephemeral unicast client/server association.
1950052d159aSCy Schubert</p>
19512b15cb3dSCy Schubert<p>Manycast servers configured with the
19522b15cb3dSCy Schubert<code>manycastserver</code>
19532b15cb3dSCy Schubertcommand listen on the specified group address for manycast
19542b15cb3dSCy Schubertclient messages.
19552b15cb3dSCy SchubertNote the distinction between manycast client,
19562b15cb3dSCy Schubertwhich actively broadcasts messages, and manycast server,
19572b15cb3dSCy Schubertwhich passively responds to them.
19582b15cb3dSCy SchubertIf a manycast server is
19592b15cb3dSCy Schubertin scope of the current TTL and is itself synchronized
19602b15cb3dSCy Schubertto a valid source and operating at a stratum level equal
19612b15cb3dSCy Schubertto or lower than the manycast client, it replies to the
19622b15cb3dSCy Schubertmanycast client message with an ordinary unicast server message.
1963052d159aSCy Schubert</p>
19642b15cb3dSCy Schubert<p>The manycast client receiving this message mobilizes
19652b15cb3dSCy Schubertan ephemeral client/server association according to the
19662b15cb3dSCy Schubertmatching manycast client template, but only if cryptographically
19672b15cb3dSCy Schubertauthenticated and the server stratum is less than or equal
19682b15cb3dSCy Schubertto the client stratum.
19692b15cb3dSCy SchubertAuthentication is explicitly required
19702b15cb3dSCy Schubertand either symmetric key or public key (Autokey) can be used.
19712b15cb3dSCy SchubertThen, the client polls the server at its unicast address
19722b15cb3dSCy Schubertin burst mode in order to reliably set the host clock
19732b15cb3dSCy Schubertand validate the source.
19742b15cb3dSCy SchubertThis normally results
19752b15cb3dSCy Schubertin a volley of eight client/server at 2-s intervals
19762b15cb3dSCy Schubertduring which both the synchronization and cryptographic
19772b15cb3dSCy Schubertprotocols run concurrently.
19782b15cb3dSCy SchubertFollowing the volley,
19792b15cb3dSCy Schubertthe client runs the NTP intersection and clustering
1980052d159aSCy Schubertalgorithms, which act to discard all but the &quot;best&quot;
19812b15cb3dSCy Schubertassociations according to stratum and synchronization
19822b15cb3dSCy Schubertdistance.
19832b15cb3dSCy SchubertThe surviving associations then continue
19842b15cb3dSCy Schubertin ordinary client/server mode.
1985052d159aSCy Schubert</p>
19862b15cb3dSCy Schubert<p>The manycast client polling strategy is designed to reduce
19872b15cb3dSCy Schubertas much as possible the volume of manycast client messages
19882b15cb3dSCy Schubertand the effects of implosion due to near-simultaneous
19892b15cb3dSCy Schubertarrival of manycast server messages.
19902b15cb3dSCy SchubertThe strategy is determined by the
19912b15cb3dSCy Schubert<code>manycastclient</code>,
19922b15cb3dSCy Schubert<code>tos</code>
19932b15cb3dSCy Schubertand
19942b15cb3dSCy Schubert<code>ttl</code>
19952b15cb3dSCy Schubertconfiguration commands.
19962b15cb3dSCy SchubertThe manycast poll interval is
19972b15cb3dSCy Schubertnormally eight times the system poll interval,
19982b15cb3dSCy Schubertwhich starts out at the
19992b15cb3dSCy Schubert<code>minpoll</code>
20002b15cb3dSCy Schubertvalue specified in the
20012b15cb3dSCy Schubert<code>manycastclient</code>,
20022b15cb3dSCy Schubertcommand and, under normal circumstances, increments to the
20032b15cb3dSCy Schubert<code>maxpolll</code>
20042b15cb3dSCy Schubertvalue specified in this command.
20052b15cb3dSCy SchubertInitially, the TTL is
20064990d495SXin LIset at the minimum hops specified by the
20074990d495SXin LI<code>ttl</code>
20084990d495SXin LIcommand.
20092b15cb3dSCy SchubertAt each retransmission the TTL is increased until reaching
20102b15cb3dSCy Schubertthe maximum hops specified by this command or a sufficient
20112b15cb3dSCy Schubertnumber client associations have been found.
20122b15cb3dSCy SchubertFurther retransmissions use the same TTL.
2013052d159aSCy Schubert</p>
20142b15cb3dSCy Schubert<p>The quality and reliability of the suite of associations
20152b15cb3dSCy Schubertdiscovered by the manycast client is determined by the NTP
20162b15cb3dSCy Schubertmitigation algorithms and the
20172b15cb3dSCy Schubert<code>minclock</code>
20182b15cb3dSCy Schubertand
20192b15cb3dSCy Schubert<code>minsane</code>
20202b15cb3dSCy Schubertvalues specified in the
20212b15cb3dSCy Schubert<code>tos</code>
20222b15cb3dSCy Schubertconfiguration command.
20232b15cb3dSCy SchubertAt least
20242b15cb3dSCy Schubert<code>minsane</code>
20252b15cb3dSCy Schubertcandidate servers must be available and the mitigation
20262b15cb3dSCy Schubertalgorithms produce at least
20272b15cb3dSCy Schubert<code>minclock</code>
20282b15cb3dSCy Schubertsurvivors in order to synchronize the clock.
20292b15cb3dSCy SchubertByzantine agreement principles require at least four
20302b15cb3dSCy Schubertcandidates in order to correctly discard a single falseticker.
20312b15cb3dSCy SchubertFor legacy purposes,
20322b15cb3dSCy Schubert<code>minsane</code>
20332b15cb3dSCy Schubertdefaults to 1 and
20342b15cb3dSCy Schubert<code>minclock</code>
20352b15cb3dSCy Schubertdefaults to 3.
20362b15cb3dSCy SchubertFor manycast service
20372b15cb3dSCy Schubert<code>minsane</code>
20382b15cb3dSCy Schubertshould be explicitly set to 4, assuming at least that
20392b15cb3dSCy Schubertnumber of servers are available.
2040052d159aSCy Schubert</p>
20412b15cb3dSCy Schubert<p>If at least
20422b15cb3dSCy Schubert<code>minclock</code>
20432b15cb3dSCy Schubertservers are found, the manycast poll interval is immediately
20442b15cb3dSCy Schubertset to eight times
20452b15cb3dSCy Schubert<code>maxpoll</code>.
20462b15cb3dSCy SchubertIf less than
20472b15cb3dSCy Schubert<code>minclock</code>
20482b15cb3dSCy Schubertservers are found when the TTL has reached the maximum hops,
20492b15cb3dSCy Schubertthe manycast poll interval is doubled.
20502b15cb3dSCy SchubertFor each transmission
20512b15cb3dSCy Schubertafter that, the poll interval is doubled again until
20522b15cb3dSCy Schubertreaching the maximum of eight times
20532b15cb3dSCy Schubert<code>maxpoll</code>.
20542b15cb3dSCy SchubertFurther transmissions use the same poll interval and
20552b15cb3dSCy SchubertTTL values.
20562b15cb3dSCy SchubertNote that while all this is going on,
20572b15cb3dSCy Schuberteach client/server association found is operating normally
20582b15cb3dSCy Schubertit the system poll interval.
2059052d159aSCy Schubert</p>
20602b15cb3dSCy Schubert<p>Administratively scoped multicast boundaries are normally
20612b15cb3dSCy Schubertspecified by the network router configuration and,
20622b15cb3dSCy Schubertin the case of IPv6, the link/site scope prefix.
20632b15cb3dSCy SchubertBy default, the increment for TTL hops is 32 starting
20642b15cb3dSCy Schubertfrom 31; however, the
20652b15cb3dSCy Schubert<code>ttl</code>
20662b15cb3dSCy Schubertconfiguration command can be
20672b15cb3dSCy Schubertused to modify the values to match the scope rules.
2068052d159aSCy Schubert</p>
20692b15cb3dSCy Schubert<p>It is often useful to narrow the range of acceptable
20702b15cb3dSCy Schubertservers which can be found by manycast client associations.
20712b15cb3dSCy SchubertBecause manycast servers respond only when the client
20722b15cb3dSCy Schubertstratum is equal to or greater than the server stratum,
20732b15cb3dSCy Schubertprimary (stratum 1) servers fill find only primary servers
20742b15cb3dSCy Schubertin TTL range, which is probably the most common objective.
20752b15cb3dSCy SchubertHowever, unless configured otherwise, all manycast clients
20762b15cb3dSCy Schubertin TTL range will eventually find all primary servers
20772b15cb3dSCy Schubertin TTL range, which is probably not the most common
20782b15cb3dSCy Schubertobjective in large networks.
20792b15cb3dSCy SchubertThe
20802b15cb3dSCy Schubert<code>tos</code>
20812b15cb3dSCy Schubertcommand can be used to modify this behavior.
20822b15cb3dSCy SchubertServers with stratum below
20832b15cb3dSCy Schubert<code>floor</code>
20842b15cb3dSCy Schubertor above
20852b15cb3dSCy Schubert<code>ceiling</code>
20862b15cb3dSCy Schubertspecified in the
20872b15cb3dSCy Schubert<code>tos</code>
20882b15cb3dSCy Schubertcommand are strongly discouraged during the selection
20892b15cb3dSCy Schubertprocess; however, these servers may be temporally
20902b15cb3dSCy Schubertaccepted if the number of servers within TTL range is
20912b15cb3dSCy Schubertless than
20922b15cb3dSCy Schubert<code>minclock</code>.
2093052d159aSCy Schubert</p>
20942b15cb3dSCy Schubert<p>The above actions occur for each manycast client message,
20952b15cb3dSCy Schubertwhich repeats at the designated poll interval.
20962b15cb3dSCy SchubertHowever, once the ephemeral client association is mobilized,
20972b15cb3dSCy Schubertsubsequent manycast server replies are discarded,
20982b15cb3dSCy Schubertsince that would result in a duplicate association.
20992b15cb3dSCy SchubertIf during a poll interval the number of client associations
21002b15cb3dSCy Schubertfalls below
21012b15cb3dSCy Schubert<code>minclock</code>,
21022b15cb3dSCy Schubertall manycast client prototype associations are reset
21032b15cb3dSCy Schubertto the initial poll interval and TTL hops and operation
21042b15cb3dSCy Schubertresumes from the beginning.
21052b15cb3dSCy SchubertIt is important to avoid
21062b15cb3dSCy Schubertfrequent manycast client messages, since each one requires
21072b15cb3dSCy Schubertall manycast servers in TTL range to respond.
21082b15cb3dSCy SchubertThe result could well be an implosion, either minor or major,
21092b15cb3dSCy Schubertdepending on the number of servers in range.
21102b15cb3dSCy SchubertThe recommended value for
21112b15cb3dSCy Schubert<code>maxpoll</code>
21122b15cb3dSCy Schubertis 12 (4,096 s).
2113052d159aSCy Schubert</p>
21142b15cb3dSCy Schubert<p>It is possible and frequently useful to configure a host
21152b15cb3dSCy Schubertas both manycast client and manycast server.
21162b15cb3dSCy SchubertA number of hosts configured this way and sharing a common
21172b15cb3dSCy Schubertgroup address will automatically organize themselves
21182b15cb3dSCy Schubertin an optimum configuration based on stratum and
21192b15cb3dSCy Schubertsynchronization distance.
21202b15cb3dSCy SchubertFor example, consider an NTP
21212b15cb3dSCy Schubertsubnet of two primary servers and a hundred or more
21222b15cb3dSCy Schubertdependent clients.
21232b15cb3dSCy SchubertWith two exceptions, all servers
21242b15cb3dSCy Schubertand clients have identical configuration files including both
21252b15cb3dSCy Schubert<code>multicastclient</code>
21262b15cb3dSCy Schubertand
21272b15cb3dSCy Schubert<code>multicastserver</code>
21282b15cb3dSCy Schubertcommands using, for instance, multicast group address
21292b15cb3dSCy Schubert239.1.1.1.
21302b15cb3dSCy SchubertThe only exception is that each primary server
21312b15cb3dSCy Schubertconfiguration file must include commands for the primary
21322b15cb3dSCy Schubertreference source such as a GPS receiver.
2133052d159aSCy Schubert</p>
21342b15cb3dSCy Schubert<p>The remaining configuration files for all secondary
21352b15cb3dSCy Schubertservers and clients have the same contents, except for the
21362b15cb3dSCy Schubert<code>tos</code>
21372b15cb3dSCy Schubertcommand, which is specific for each stratum level.
21382b15cb3dSCy SchubertFor stratum 1 and stratum 2 servers, that command is
21392b15cb3dSCy Schubertnot necessary.
21402b15cb3dSCy SchubertFor stratum 3 and above servers the
21412b15cb3dSCy Schubert<code>floor</code>
21422b15cb3dSCy Schubertvalue is set to the intended stratum number.
21432b15cb3dSCy SchubertThus, all stratum 3 configuration files are identical,
21442b15cb3dSCy Schubertall stratum 4 files are identical and so forth.
2145052d159aSCy Schubert</p>
21462b15cb3dSCy Schubert<p>Once operations have stabilized in this scenario,
21472b15cb3dSCy Schubertthe primary servers will find the primary reference source
21482b15cb3dSCy Schubertand each other, since they both operate at the same
21492b15cb3dSCy Schubertstratum (1), but not with any secondary server or client,
21502b15cb3dSCy Schubertsince these operate at a higher stratum.
21512b15cb3dSCy SchubertThe secondary
21522b15cb3dSCy Schubertservers will find the servers at the same stratum level.
21532b15cb3dSCy SchubertIf one of the primary servers loses its GPS receiver,
21542b15cb3dSCy Schubertit will continue to operate as a client and other clients
21552b15cb3dSCy Schubertwill time out the corresponding association and
21562b15cb3dSCy Schubertre-associate accordingly.
2157052d159aSCy Schubert</p>
21582b15cb3dSCy Schubert<p>Some administrators prefer to avoid running
21592b15cb3dSCy Schubert<code>ntpd(1ntpdmdoc)</code>
21602b15cb3dSCy Schubertcontinuously and run either
21619034852cSGleb Smirnoff<code>sntp(1sntpmdoc)</code>
21622b15cb3dSCy Schubertor
21632b15cb3dSCy Schubert<code>ntpd(1ntpdmdoc)</code>
21642b15cb3dSCy Schubert<code>-q</code>
21652b15cb3dSCy Schubertas a cron job.
21662b15cb3dSCy SchubertIn either case the servers must be
21672b15cb3dSCy Schubertconfigured in advance and the program fails if none are
21682b15cb3dSCy Schubertavailable when the cron job runs.
21692b15cb3dSCy SchubertA really slick
21702b15cb3dSCy Schubertapplication of manycast is with
21712b15cb3dSCy Schubert<code>ntpd(1ntpdmdoc)</code>
21722b15cb3dSCy Schubert<code>-q</code>.
21732b15cb3dSCy SchubertThe program wakes up, scans the local landscape looking
21742b15cb3dSCy Schubertfor the usual suspects, selects the best from among
21752b15cb3dSCy Schubertthe rascals, sets the clock and then departs.
21762b15cb3dSCy SchubertServers do not have to be configured in advance and
21772b15cb3dSCy Schubertall clients throughout the network can have the same
21782b15cb3dSCy Schubertconfiguration file.
2179052d159aSCy Schubert</p><a name="Manycast-Interactions-with-Autokey"></a>
2180052d159aSCy Schubert<h4 class="subsubsection">1.1.5.2 Manycast Interactions with Autokey</h4>
21812b15cb3dSCy Schubert<p>Each time a manycast client sends a client mode packet
21822b15cb3dSCy Schubertto a multicast group address, all manycast servers
21832b15cb3dSCy Schubertin scope generate a reply including the host name
21842b15cb3dSCy Schubertand status word.
21852b15cb3dSCy SchubertThe manycast clients then run
21862b15cb3dSCy Schubertthe Autokey protocol, which collects and verifies
21872b15cb3dSCy Schubertall certificates involved.
21882b15cb3dSCy SchubertFollowing the burst interval
21892b15cb3dSCy Schubertall but three survivors are cast off,
21902b15cb3dSCy Schubertbut the certificates remain in the local cache.
21912b15cb3dSCy SchubertIt often happens that several complete signing trails
21922b15cb3dSCy Schubertfrom the client to the primary servers are collected in this way.
2193052d159aSCy Schubert</p>
21942b15cb3dSCy Schubert<p>About once an hour or less often if the poll interval
21952b15cb3dSCy Schubertexceeds this, the client regenerates the Autokey key list.
21962b15cb3dSCy SchubertThis is in general transparent in client/server mode.
21972b15cb3dSCy SchubertHowever, about once per day the server private value
21982b15cb3dSCy Schubertused to generate cookies is refreshed along with all
21992b15cb3dSCy Schubertmanycast client associations.
22002b15cb3dSCy SchubertIn this case all
22012b15cb3dSCy Schubertcryptographic values including certificates is refreshed.
22022b15cb3dSCy SchubertIf a new certificate has been generated since
22032b15cb3dSCy Schubertthe last refresh epoch, it will automatically revoke
22042b15cb3dSCy Schubertall prior certificates that happen to be in the
22052b15cb3dSCy Schubertcertificate cache.
22062b15cb3dSCy SchubertAt the same time, the manycast
22072b15cb3dSCy Schubertscheme starts all over from the beginning and
22082b15cb3dSCy Schubertthe expanding ring shrinks to the minimum and increments
22092b15cb3dSCy Schubertfrom there while collecting all servers in scope.
2210052d159aSCy Schubert</p><a name="Broadcast-Options"></a>
2211052d159aSCy Schubert<h4 class="subsubsection">1.1.5.3 Broadcast Options</h4>
2212052d159aSCy Schubert<dl compact="compact">
2213052d159aSCy Schubert<dt><code>tos</code> <code>[<code>bcpollbstep</code> <kbd>gate</kbd>]</code></dt>
2214052d159aSCy Schubert<dd><p>This command provides a way to delay,
2215f391d6bcSXin LIby the specified number of broadcast poll intervals,
2216f391d6bcSXin LIbelieving backward time steps from a broadcast server.
2217f391d6bcSXin LIBroadcast time networks are expected to be trusted.
2218052d159aSCy SchubertIn the event a broadcast server&rsquo;s time is stepped backwards,
2219f391d6bcSXin LIthere is clear benefit to having the clients notice this change
2220f391d6bcSXin LIas soon as possible.
2221f391d6bcSXin LIAttacks such as replay attacks can happen, however,
2222f391d6bcSXin LIand even though there are a number of protections built in to
2223f391d6bcSXin LIbroadcast mode, attempts to perform a replay attack are possible.
2224f391d6bcSXin LIThis value defaults to 0, but can be changed
2225f391d6bcSXin LIto any number of poll intervals between 0 and 4.
2226052d159aSCy Schubert</p></dd>
222709100258SXin LI</dl>
2228052d159aSCy Schubert<a name="Manycast-Options"></a>
2229052d159aSCy Schubert<h4 class="subsubsection">1.1.5.4 Manycast Options</h4>
2230052d159aSCy Schubert<dl compact="compact">
2231052d159aSCy Schubert<dt><code>tos</code> <code>[<code>ceiling</code> <kbd>ceiling</kbd> | <code>cohort</code> <code>{</code> <code>0</code> | <code>1</code> <code>}</code> | <code>floor</code> <kbd>floor</kbd> | <code>minclock</code> <kbd>minclock</kbd> | <code>minsane</code> <kbd>minsane</kbd>]</code></dt>
2232052d159aSCy Schubert<dd><p>This command affects the clock selection and clustering
22332b15cb3dSCy Schubertalgorithms.
22342b15cb3dSCy SchubertIt can be used to select the quality and
22352b15cb3dSCy Schubertquantity of peers used to synchronize the system clock
22362b15cb3dSCy Schubertand is most useful in manycast mode.
22372b15cb3dSCy SchubertThe variables operate
22382b15cb3dSCy Schubertas follows:
2239052d159aSCy Schubert</p><dl compact="compact">
2240052d159aSCy Schubert<dt><code>ceiling</code> <kbd>ceiling</kbd></dt>
2241052d159aSCy Schubert<dd><p>Peers with strata above
22422b15cb3dSCy Schubert<code>ceiling</code>
22432b15cb3dSCy Schubertwill be discarded if there are at least
22442b15cb3dSCy Schubert<code>minclock</code>
22452b15cb3dSCy Schubertpeers remaining.
22462b15cb3dSCy SchubertThis value defaults to 15, but can be changed
22472b15cb3dSCy Schubertto any number from 1 to 15.
2248052d159aSCy Schubert</p></dd>
2249052d159aSCy Schubert<dt><code>cohort</code> <code>{0 | 1}</code></dt>
2250052d159aSCy Schubert<dd><p>This is a binary flag which enables (0) or disables (1)
22512b15cb3dSCy Schubertmanycast server replies to manycast clients with the same
22522b15cb3dSCy Schubertstratum level.
22532b15cb3dSCy SchubertThis is useful to reduce implosions where
22542b15cb3dSCy Schubertlarge numbers of clients with the same stratum level
22552b15cb3dSCy Schubertare present.
22562b15cb3dSCy SchubertThe default is to enable these replies.
2257052d159aSCy Schubert</p></dd>
2258052d159aSCy Schubert<dt><code>floor</code> <kbd>floor</kbd></dt>
2259052d159aSCy Schubert<dd><p>Peers with strata below
22602b15cb3dSCy Schubert<code>floor</code>
22612b15cb3dSCy Schubertwill be discarded if there are at least
22622b15cb3dSCy Schubert<code>minclock</code>
22632b15cb3dSCy Schubertpeers remaining.
22642b15cb3dSCy SchubertThis value defaults to 1, but can be changed
22652b15cb3dSCy Schubertto any number from 1 to 15.
2266052d159aSCy Schubert</p></dd>
2267052d159aSCy Schubert<dt><code>minclock</code> <kbd>minclock</kbd></dt>
2268052d159aSCy Schubert<dd><p>The clustering algorithm repeatedly casts out outlier
22692b15cb3dSCy Schubertassociations until no more than
22702b15cb3dSCy Schubert<code>minclock</code>
22712b15cb3dSCy Schubertassociations remain.
22722b15cb3dSCy SchubertThis value defaults to 3,
22732b15cb3dSCy Schubertbut can be changed to any number from 1 to the number of
22742b15cb3dSCy Schubertconfigured sources.
2275052d159aSCy Schubert</p></dd>
2276052d159aSCy Schubert<dt><code>minsane</code> <kbd>minsane</kbd></dt>
2277052d159aSCy Schubert<dd><p>This is the minimum number of candidates available
22782b15cb3dSCy Schubertto the clock selection algorithm in order to produce
22792b15cb3dSCy Schubertone or more truechimers for the clustering algorithm.
22802b15cb3dSCy SchubertIf fewer than this number are available, the clock is
22812b15cb3dSCy Schubertundisciplined and allowed to run free.
22822b15cb3dSCy SchubertThe default is 1
22832b15cb3dSCy Schubertfor legacy purposes.
22842b15cb3dSCy SchubertHowever, according to principles of
22852b15cb3dSCy SchubertByzantine agreement,
22862b15cb3dSCy Schubert<code>minsane</code>
22872b15cb3dSCy Schubertshould be at least 4 in order to detect and discard
22882b15cb3dSCy Schuberta single falseticker.
2289052d159aSCy Schubert</p></dd>
22902b15cb3dSCy Schubert</dl>
2291052d159aSCy Schubert</dd>
2292052d159aSCy Schubert<dt><code>ttl</code> <kbd>hop</kbd> <kbd>...</kbd></dt>
2293052d159aSCy Schubert<dd><p>This command specifies a list of TTL values in increasing
22942b15cb3dSCy Schubertorder, up to 8 values can be specified.
22952b15cb3dSCy SchubertIn manycast mode these values are used in turn
22962b15cb3dSCy Schubertin an expanding-ring search.
22972b15cb3dSCy SchubertThe default is eight
22982b15cb3dSCy Schubertmultiples of 32 starting at 31.
2299052d159aSCy Schubert</p></dd>
23002b15cb3dSCy Schubert</dl>
2301052d159aSCy Schubert<hr>
23022b15cb3dSCy Schubert<a name="Reference-Clock-Support"></a>
2303052d159aSCy Schubert<div class="header">
2304052d159aSCy Schubert<p>
2305052d159aSCy SchubertNext: <a href="#Miscellaneous-Options" accesskey="n" rel="next">Miscellaneous Options</a>, Previous: <a href="#Automatic-NTP-Configuration-Options" accesskey="p" rel="prev">Automatic NTP Configuration Options</a>, Up: <a href="#ntp_002econf-Notes" accesskey="u" rel="up">ntp.conf Notes</a> &nbsp; </p>
23062b15cb3dSCy Schubert</div>
2307052d159aSCy Schubert<a name="Reference-Clock-Support-1"></a>
2308052d159aSCy Schubert<h4 class="subsection">1.1.6 Reference Clock Support</h4>
23092b15cb3dSCy Schubert<p>The NTP Version 4 daemon supports some three dozen different radio,
23102b15cb3dSCy Schubertsatellite and modem reference clocks plus a special pseudo-clock
23112b15cb3dSCy Schubertused for backup or when no other clock source is available.
23122b15cb3dSCy SchubertDetailed descriptions of individual device drivers and options can
23132b15cb3dSCy Schubertbe found in the
2314052d159aSCy Schubert&quot;Reference Clock Drivers&quot;
23152b15cb3dSCy Schubertpage
23162b15cb3dSCy Schubert(available as part of the HTML documentation
23172b15cb3dSCy Schubertprovided in
2318052d159aSCy Schubert<samp>/usr/share/doc/ntp</samp>).
23192b15cb3dSCy SchubertAdditional information can be found in the pages linked
23202b15cb3dSCy Schubertthere, including the
2321052d159aSCy Schubert&quot;Debugging Hints for Reference Clock Drivers&quot;
23222b15cb3dSCy Schubertand
2323052d159aSCy Schubert&quot;How To Write a Reference Clock Driver&quot;
23242b15cb3dSCy Schubertpages
23252b15cb3dSCy Schubert(available as part of the HTML documentation
23262b15cb3dSCy Schubertprovided in
2327052d159aSCy Schubert<samp>/usr/share/doc/ntp</samp>).
23282b15cb3dSCy SchubertIn addition, support for a PPS
23292b15cb3dSCy Schubertsignal is available as described in the
2330052d159aSCy Schubert&quot;Pulse-per-second (PPS) Signal Interfacing&quot;
23312b15cb3dSCy Schubertpage
23322b15cb3dSCy Schubert(available as part of the HTML documentation
23332b15cb3dSCy Schubertprovided in
2334052d159aSCy Schubert<samp>/usr/share/doc/ntp</samp>).
23352b15cb3dSCy SchubertMany
23362b15cb3dSCy Schubertdrivers support special line discipline/streams modules which can
23372b15cb3dSCy Schubertsignificantly improve the accuracy using the driver.
23382b15cb3dSCy SchubertThese are
23392b15cb3dSCy Schubertdescribed in the
2340052d159aSCy Schubert&quot;Line Disciplines and Streams Drivers&quot;
23412b15cb3dSCy Schubertpage
23422b15cb3dSCy Schubert(available as part of the HTML documentation
23432b15cb3dSCy Schubertprovided in
2344052d159aSCy Schubert<samp>/usr/share/doc/ntp</samp>).
2345052d159aSCy Schubert</p>
23462b15cb3dSCy Schubert<p>A reference clock will generally (though not always) be a radio
23472b15cb3dSCy Schuberttimecode receiver which is synchronized to a source of standard
23482b15cb3dSCy Schuberttime such as the services offered by the NRC in Canada and NIST and
23492b15cb3dSCy SchubertUSNO in the US.
23502b15cb3dSCy SchubertThe interface between the computer and the timecode
23512b15cb3dSCy Schubertreceiver is device dependent, but is usually a serial port.
23522b15cb3dSCy SchubertA
23532b15cb3dSCy Schubertdevice driver specific to each reference clock must be selected and
23542b15cb3dSCy Schubertcompiled in the distribution; however, most common radio, satellite
23552b15cb3dSCy Schubertand modem clocks are included by default.
23562b15cb3dSCy SchubertNote that an attempt to
23572b15cb3dSCy Schubertconfigure a reference clock when the driver has not been compiled
23582b15cb3dSCy Schubertor the hardware port has not been appropriately configured results
23592b15cb3dSCy Schubertin a scalding remark to the system log file, but is otherwise non
23602b15cb3dSCy Schuberthazardous.
2361052d159aSCy Schubert</p>
23622b15cb3dSCy Schubert<p>For the purposes of configuration,
23632b15cb3dSCy Schubert<code>ntpd(1ntpdmdoc)</code>
23642b15cb3dSCy Schuberttreats
23652b15cb3dSCy Schubertreference clocks in a manner analogous to normal NTP peers as much
23662b15cb3dSCy Schubertas possible.
23672b15cb3dSCy SchubertReference clocks are identified by a syntactically
23682b15cb3dSCy Schubertcorrect but invalid IP address, in order to distinguish them from
23692b15cb3dSCy Schubertnormal NTP peers.
23702b15cb3dSCy SchubertReference clock addresses are of the form
23712b15cb3dSCy Schubert<code>127.127.</code><kbd>t</kbd>.<kbd>u</kbd>,
23722b15cb3dSCy Schubertwhere
23732b15cb3dSCy Schubert<kbd>t</kbd>
23742b15cb3dSCy Schubertis an integer
23752b15cb3dSCy Schubertdenoting the clock type and
23762b15cb3dSCy Schubert<kbd>u</kbd>
23772b15cb3dSCy Schubertindicates the unit
23782b15cb3dSCy Schubertnumber in the range 0-3.
23792b15cb3dSCy SchubertWhile it may seem overkill, it is in fact
23802b15cb3dSCy Schubertsometimes useful to configure multiple reference clocks of the same
23812b15cb3dSCy Schuberttype, in which case the unit numbers must be unique.
2382052d159aSCy Schubert</p>
23832b15cb3dSCy Schubert<p>The
23842b15cb3dSCy Schubert<code>server</code>
23852b15cb3dSCy Schubertcommand is used to configure a reference
23862b15cb3dSCy Schubertclock, where the
23872b15cb3dSCy Schubert<kbd>address</kbd>
23882b15cb3dSCy Schubertargument in that command
23892b15cb3dSCy Schubertis the clock address.
23902b15cb3dSCy SchubertThe
23912b15cb3dSCy Schubert<code>key</code>,
23922b15cb3dSCy Schubert<code>version</code>
23932b15cb3dSCy Schubertand
23942b15cb3dSCy Schubert<code>ttl</code>
23952b15cb3dSCy Schubertoptions are not used for reference clock support.
23962b15cb3dSCy SchubertThe
23972b15cb3dSCy Schubert<code>mode</code>
23982b15cb3dSCy Schubertoption is added for reference clock support, as
23992b15cb3dSCy Schubertdescribed below.
24002b15cb3dSCy SchubertThe
24012b15cb3dSCy Schubert<code>prefer</code>
24022b15cb3dSCy Schubertoption can be useful to
24032b15cb3dSCy Schubertpersuade the server to cherish a reference clock with somewhat more
24042b15cb3dSCy Schubertenthusiasm than other reference clocks or peers.
24052b15cb3dSCy SchubertFurther
24062b15cb3dSCy Schubertinformation on this option can be found in the
2407052d159aSCy Schubert&quot;Mitigation Rules and the prefer Keyword&quot;
24082b15cb3dSCy Schubert(available as part of the HTML documentation
24092b15cb3dSCy Schubertprovided in
2410052d159aSCy Schubert<samp>/usr/share/doc/ntp</samp>)
24112b15cb3dSCy Schubertpage.
24122b15cb3dSCy SchubertThe
24132b15cb3dSCy Schubert<code>minpoll</code>
24142b15cb3dSCy Schubertand
24152b15cb3dSCy Schubert<code>maxpoll</code>
24162b15cb3dSCy Schubertoptions have
24172b15cb3dSCy Schubertmeaning only for selected clock drivers.
24182b15cb3dSCy SchubertSee the individual clock
24192b15cb3dSCy Schubertdriver document pages for additional information.
2420052d159aSCy Schubert</p>
24212b15cb3dSCy Schubert<p>The
24222b15cb3dSCy Schubert<code>fudge</code>
24232b15cb3dSCy Schubertcommand is used to provide additional
24242b15cb3dSCy Schubertinformation for individual clock drivers and normally follows
24252b15cb3dSCy Schubertimmediately after the
24262b15cb3dSCy Schubert<code>server</code>
24272b15cb3dSCy Schubertcommand.
24282b15cb3dSCy SchubertThe
24292b15cb3dSCy Schubert<kbd>address</kbd>
24302b15cb3dSCy Schubertargument specifies the clock address.
24312b15cb3dSCy SchubertThe
24322b15cb3dSCy Schubert<code>refid</code>
24332b15cb3dSCy Schubertand
24342b15cb3dSCy Schubert<code>stratum</code>
24352b15cb3dSCy Schubertoptions can be used to
24362b15cb3dSCy Schubertoverride the defaults for the device.
24372b15cb3dSCy SchubertThere are two optional
24382b15cb3dSCy Schubertdevice-dependent time offsets and four flags that can be included
24392b15cb3dSCy Schubertin the
24402b15cb3dSCy Schubert<code>fudge</code>
24412b15cb3dSCy Schubertcommand as well.
2442052d159aSCy Schubert</p>
24432b15cb3dSCy Schubert<p>The stratum number of a reference clock is by default zero.
24442b15cb3dSCy SchubertSince the
24452b15cb3dSCy Schubert<code>ntpd(1ntpdmdoc)</code>
24462b15cb3dSCy Schubertdaemon adds one to the stratum of each
24472b15cb3dSCy Schubertpeer, a primary server ordinarily displays an external stratum of
24482b15cb3dSCy Schubertone.
24492b15cb3dSCy SchubertIn order to provide engineered backups, it is often useful to
24502b15cb3dSCy Schubertspecify the reference clock stratum as greater than zero.
24512b15cb3dSCy SchubertThe
24522b15cb3dSCy Schubert<code>stratum</code>
24532b15cb3dSCy Schubertoption is used for this purpose.
24542b15cb3dSCy SchubertAlso, in cases
24552b15cb3dSCy Schubertinvolving both a reference clock and a pulse-per-second (PPS)
24562b15cb3dSCy Schubertdiscipline signal, it is useful to specify the reference clock
24572b15cb3dSCy Schubertidentifier as other than the default, depending on the driver.
24582b15cb3dSCy SchubertThe
24592b15cb3dSCy Schubert<code>refid</code>
24602b15cb3dSCy Schubertoption is used for this purpose.
24612b15cb3dSCy SchubertExcept where noted,
24622b15cb3dSCy Schubertthese options apply to all clock drivers.
2463052d159aSCy Schubert</p><a name="Reference-Clock-Commands"></a>
2464052d159aSCy Schubert<h4 class="subsubsection">1.1.6.1 Reference Clock Commands</h4>
2465052d159aSCy Schubert<dl compact="compact">
2466052d159aSCy Schubert<dt><code>server</code> <code>127.127.</code><kbd>t</kbd>.<kbd>u</kbd> <code>[<code>prefer</code>]</code> <code>[<code>mode</code> <kbd>int</kbd>]</code> <code>[<code>minpoll</code> <kbd>int</kbd>]</code> <code>[<code>maxpoll</code> <kbd>int</kbd>]</code></dt>
2467052d159aSCy Schubert<dd><p>This command can be used to configure reference clocks in
24682b15cb3dSCy Schubertspecial ways.
24692b15cb3dSCy SchubertThe options are interpreted as follows:
2470052d159aSCy Schubert</p><dl compact="compact">
2471052d159aSCy Schubert<dt><code>prefer</code></dt>
2472052d159aSCy Schubert<dd><p>Marks the reference clock as preferred.
24732b15cb3dSCy SchubertAll other things being
24742b15cb3dSCy Schubertequal, this host will be chosen for synchronization among a set of
24752b15cb3dSCy Schubertcorrectly operating hosts.
24762b15cb3dSCy SchubertSee the
2477052d159aSCy Schubert&quot;Mitigation Rules and the prefer Keyword&quot;
24782b15cb3dSCy Schubertpage
24792b15cb3dSCy Schubert(available as part of the HTML documentation
24802b15cb3dSCy Schubertprovided in
2481052d159aSCy Schubert<samp>/usr/share/doc/ntp</samp>)
24822b15cb3dSCy Schubertfor further information.
2483052d159aSCy Schubert</p></dd>
2484052d159aSCy Schubert<dt><code>mode</code> <kbd>int</kbd></dt>
2485052d159aSCy Schubert<dd><p>Specifies a mode number which is interpreted in a
24862b15cb3dSCy Schubertdevice-specific fashion.
24872b15cb3dSCy SchubertFor instance, it selects a dialing
24882b15cb3dSCy Schubertprotocol in the ACTS driver and a device subtype in the
24892b15cb3dSCy Schubertparse
24902b15cb3dSCy Schubertdrivers.
2491052d159aSCy Schubert</p></dd>
2492052d159aSCy Schubert<dt><code>minpoll</code> <kbd>int</kbd></dt>
2493052d159aSCy Schubert<dt><code>maxpoll</code> <kbd>int</kbd></dt>
2494052d159aSCy Schubert<dd><p>These options specify the minimum and maximum polling interval
24952b15cb3dSCy Schubertfor reference clock messages, as a power of 2 in seconds
24962b15cb3dSCy SchubertFor
24972b15cb3dSCy Schubertmost directly connected reference clocks, both
24982b15cb3dSCy Schubert<code>minpoll</code>
24992b15cb3dSCy Schubertand
25002b15cb3dSCy Schubert<code>maxpoll</code>
25012b15cb3dSCy Schubertdefault to 6 (64 s).
25022b15cb3dSCy SchubertFor modem reference clocks,
25032b15cb3dSCy Schubert<code>minpoll</code>
25042b15cb3dSCy Schubertdefaults to 10 (17.1 m) and
25052b15cb3dSCy Schubert<code>maxpoll</code>
25062b15cb3dSCy Schubertdefaults to 14 (4.5 h).
25072b15cb3dSCy SchubertThe allowable range is 4 (16 s) to 17 (36.4 h) inclusive.
2508052d159aSCy Schubert</p></dd>
25092b15cb3dSCy Schubert</dl>
2510052d159aSCy Schubert</dd>
2511052d159aSCy Schubert<dt><code>fudge</code> <code>127.127.</code><kbd>t</kbd>.<kbd>u</kbd> <code>[<code>time1</code> <kbd>sec</kbd>]</code> <code>[<code>time2</code> <kbd>sec</kbd>]</code> <code>[<code>stratum</code> <kbd>int</kbd>]</code> <code>[<code>refid</code> <kbd>string</kbd>]</code> <code>[<code>mode</code> <kbd>int</kbd>]</code> <code>[<code>flag1</code> <code>0</code> <code>|</code> <code>1</code>]</code> <code>[<code>flag2</code> <code>0</code> <code>|</code> <code>1</code>]</code> <code>[<code>flag3</code> <code>0</code> <code>|</code> <code>1</code>]</code> <code>[<code>flag4</code> <code>0</code> <code>|</code> <code>1</code>]</code></dt>
2512052d159aSCy Schubert<dd><p>This command can be used to configure reference clocks in
25132b15cb3dSCy Schubertspecial ways.
25142b15cb3dSCy SchubertIt must immediately follow the
25152b15cb3dSCy Schubert<code>server</code>
25162b15cb3dSCy Schubertcommand which configures the driver.
25172b15cb3dSCy SchubertNote that the same capability
25182b15cb3dSCy Schubertis possible at run time using the
25192b15cb3dSCy Schubert<code>ntpdc(1ntpdcmdoc)</code>
25202b15cb3dSCy Schubertprogram.
25212b15cb3dSCy SchubertThe options are interpreted as
25222b15cb3dSCy Schubertfollows:
2523052d159aSCy Schubert</p><dl compact="compact">
2524052d159aSCy Schubert<dt><code>time1</code> <kbd>sec</kbd></dt>
2525052d159aSCy Schubert<dd><p>Specifies a constant to be added to the time offset produced by
25262b15cb3dSCy Schubertthe driver, a fixed-point decimal number in seconds.
25272b15cb3dSCy SchubertThis is used
25282b15cb3dSCy Schubertas a calibration constant to adjust the nominal time offset of a
25292b15cb3dSCy Schubertparticular clock to agree with an external standard, such as a
25302b15cb3dSCy Schubertprecision PPS signal.
25312b15cb3dSCy SchubertIt also provides a way to correct a
25322b15cb3dSCy Schubertsystematic error or bias due to serial port or operating system
25332b15cb3dSCy Schubertlatencies, different cable lengths or receiver internal delay.
25342b15cb3dSCy SchubertThe
25352b15cb3dSCy Schubertspecified offset is in addition to the propagation delay provided
25362b15cb3dSCy Schubertby other means, such as internal DIPswitches.
25372b15cb3dSCy SchubertWhere a calibration
25382b15cb3dSCy Schubertfor an individual system and driver is available, an approximate
25392b15cb3dSCy Schubertcorrection is noted in the driver documentation pages.
25402b15cb3dSCy SchubertNote: in order to facilitate calibration when more than one
25412b15cb3dSCy Schubertradio clock or PPS signal is supported, a special calibration
25422b15cb3dSCy Schubertfeature is available.
25432b15cb3dSCy SchubertIt takes the form of an argument to the
25442b15cb3dSCy Schubert<code>enable</code>
25452b15cb3dSCy Schubertcommand described in
25462b15cb3dSCy Schubert<a href="#Miscellaneous-Options">Miscellaneous Options</a>
25472b15cb3dSCy Schubertpage and operates as described in the
2548052d159aSCy Schubert&quot;Reference Clock Drivers&quot;
25492b15cb3dSCy Schubertpage
25502b15cb3dSCy Schubert(available as part of the HTML documentation
25512b15cb3dSCy Schubertprovided in
2552052d159aSCy Schubert<samp>/usr/share/doc/ntp</samp>).
2553052d159aSCy Schubert</p></dd>
2554052d159aSCy Schubert<dt><code>time2</code> <kbd>secs</kbd></dt>
2555052d159aSCy Schubert<dd><p>Specifies a fixed-point decimal number in seconds, which is
25562b15cb3dSCy Schubertinterpreted in a driver-dependent way.
25572b15cb3dSCy SchubertSee the descriptions of
25582b15cb3dSCy Schubertspecific drivers in the
2559052d159aSCy Schubert&quot;Reference Clock Drivers&quot;
25602b15cb3dSCy Schubertpage
25612b15cb3dSCy Schubert(available as part of the HTML documentation
25622b15cb3dSCy Schubertprovided in
2563052d159aSCy Schubert<samp>/usr/share/doc/ntp</samp> <samp>).</samp>
2564052d159aSCy Schubert</p></dd>
2565052d159aSCy Schubert<dt><code>stratum</code> <kbd>int</kbd></dt>
2566052d159aSCy Schubert<dd><p>Specifies the stratum number assigned to the driver, an integer
25672b15cb3dSCy Schubertbetween 0 and 15.
25682b15cb3dSCy SchubertThis number overrides the default stratum number
25692b15cb3dSCy Schubertordinarily assigned by the driver itself, usually zero.
2570052d159aSCy Schubert</p></dd>
2571052d159aSCy Schubert<dt><code>refid</code> <kbd>string</kbd></dt>
2572052d159aSCy Schubert<dd><p>Specifies an ASCII string of from one to four characters which
25732b15cb3dSCy Schubertdefines the reference identifier used by the driver.
25742b15cb3dSCy SchubertThis string
25752b15cb3dSCy Schubertoverrides the default identifier ordinarily assigned by the driver
25762b15cb3dSCy Schubertitself.
2577052d159aSCy Schubert</p></dd>
2578052d159aSCy Schubert<dt><code>mode</code> <kbd>int</kbd></dt>
2579052d159aSCy Schubert<dd><p>Specifies a mode number which is interpreted in a
25802b15cb3dSCy Schubertdevice-specific fashion.
25812b15cb3dSCy SchubertFor instance, it selects a dialing
25822b15cb3dSCy Schubertprotocol in the ACTS driver and a device subtype in the
25832b15cb3dSCy Schubertparse
25842b15cb3dSCy Schubertdrivers.
2585052d159aSCy Schubert</p></dd>
2586052d159aSCy Schubert<dt><code>flag1</code> <code>0</code> <code>|</code> <code>1</code></dt>
2587052d159aSCy Schubert<dt><code>flag2</code> <code>0</code> <code>|</code> <code>1</code></dt>
2588052d159aSCy Schubert<dt><code>flag3</code> <code>0</code> <code>|</code> <code>1</code></dt>
2589052d159aSCy Schubert<dt><code>flag4</code> <code>0</code> <code>|</code> <code>1</code></dt>
2590052d159aSCy Schubert<dd><p>These four flags are used for customizing the clock driver.
25912b15cb3dSCy SchubertThe
25922b15cb3dSCy Schubertinterpretation of these values, and whether they are used at all,
25932b15cb3dSCy Schubertis a function of the particular clock driver.
25942b15cb3dSCy SchubertHowever, by
25952b15cb3dSCy Schubertconvention
25962b15cb3dSCy Schubert<code>flag4</code>
25972b15cb3dSCy Schubertis used to enable recording monitoring
25982b15cb3dSCy Schubertdata to the
25992b15cb3dSCy Schubert<code>clockstats</code>
26002b15cb3dSCy Schubertfile configured with the
26012b15cb3dSCy Schubert<code>filegen</code>
26022b15cb3dSCy Schubertcommand.
26032b15cb3dSCy SchubertFurther information on the
26042b15cb3dSCy Schubert<code>filegen</code>
26052b15cb3dSCy Schubertcommand can be found in
2606052d159aSCy Schubert&lsquo;Monitoring Options&rsquo;.
2607052d159aSCy Schubert</p></dd>
26082b15cb3dSCy Schubert</dl>
2609052d159aSCy Schubert</dd>
26102b15cb3dSCy Schubert</dl>
2611052d159aSCy Schubert<hr>
26122b15cb3dSCy Schubert<a name="Miscellaneous-Options"></a>
2613052d159aSCy Schubert<div class="header">
2614052d159aSCy Schubert<p>
2615052d159aSCy SchubertNext: <a href="#ntp_002econf-Files" accesskey="n" rel="next">ntp.conf Files</a>, Previous: <a href="#Reference-Clock-Support" accesskey="p" rel="prev">Reference Clock Support</a>, Up: <a href="#ntp_002econf-Notes" accesskey="u" rel="up">ntp.conf Notes</a> &nbsp; </p>
26162b15cb3dSCy Schubert</div>
2617052d159aSCy Schubert<a name="Miscellaneous-Options-1"></a>
2618052d159aSCy Schubert<h4 class="subsection">1.1.7 Miscellaneous Options</h4>
2619052d159aSCy Schubert<dl compact="compact">
2620052d159aSCy Schubert<dt><code>broadcastdelay</code> <kbd>seconds</kbd></dt>
2621052d159aSCy Schubert<dd><p>The broadcast and multicast modes require a special calibration
26222b15cb3dSCy Schubertto determine the network delay between the local and remote
26232b15cb3dSCy Schubertservers.
26242b15cb3dSCy SchubertOrdinarily, this is done automatically by the initial
26252b15cb3dSCy Schubertprotocol exchanges between the client and server.
26262b15cb3dSCy SchubertIn some cases,
26272b15cb3dSCy Schubertthe calibration procedure may fail due to network or server access
26282b15cb3dSCy Schubertcontrols, for example.
26292b15cb3dSCy SchubertThis command specifies the default delay to
26302b15cb3dSCy Schubertbe used under these circumstances.
26312b15cb3dSCy SchubertTypically (for Ethernet), a
26322b15cb3dSCy Schubertnumber between 0.003 and 0.007 seconds is appropriate.
26332b15cb3dSCy SchubertThe default
26342b15cb3dSCy Schubertwhen this command is not used is 0.004 seconds.
2635052d159aSCy Schubert</p></dd>
2636052d159aSCy Schubert<dt><code>calldelay</code> <kbd>delay</kbd></dt>
2637052d159aSCy Schubert<dd><p>This option controls the delay in seconds between the first and second
26382b15cb3dSCy Schubertpackets sent in burst or iburst mode to allow additional time for a modem
26392b15cb3dSCy Schubertor ISDN call to complete.
2640052d159aSCy Schubert</p></dd>
2641052d159aSCy Schubert<dt><code>driftfile</code> <kbd>driftfile</kbd></dt>
2642052d159aSCy Schubert<dd><p>This command specifies the complete path and name of the file used to
26432b15cb3dSCy Schubertrecord the frequency of the local clock oscillator.
26442b15cb3dSCy SchubertThis is the same
26452b15cb3dSCy Schubertoperation as the
26462b15cb3dSCy Schubert<code>-f</code>
26472b15cb3dSCy Schubertcommand line option.
26482b15cb3dSCy SchubertIf the file exists, it is read at
26492b15cb3dSCy Schubertstartup in order to set the initial frequency and then updated once per
26502b15cb3dSCy Schuberthour with the current frequency computed by the daemon.
26512b15cb3dSCy SchubertIf the file name is
26522b15cb3dSCy Schubertspecified, but the file itself does not exist, the starts with an initial
26532b15cb3dSCy Schubertfrequency of zero and creates the file when writing it for the first time.
26542b15cb3dSCy SchubertIf this command is not given, the daemon will always start with an initial
26552b15cb3dSCy Schubertfrequency of zero.
2656052d159aSCy Schubert</p>
26572b15cb3dSCy Schubert<p>The file format consists of a single line containing a single
26582b15cb3dSCy Schubertfloating point number, which records the frequency offset measured
26592b15cb3dSCy Schubertin parts-per-million (PPM).
26602b15cb3dSCy SchubertThe file is updated by first writing
26612b15cb3dSCy Schubertthe current drift value into a temporary file and then renaming
26622b15cb3dSCy Schubertthis file to replace the old version.
26632b15cb3dSCy SchubertThis implies that
26642b15cb3dSCy Schubert<code>ntpd(1ntpdmdoc)</code>
26652b15cb3dSCy Schubertmust have write permission for the directory the
26662b15cb3dSCy Schubertdrift file is located in, and that file system links, symbolic or
26672b15cb3dSCy Schubertotherwise, should be avoided.
2668052d159aSCy Schubert</p></dd>
2669052d159aSCy Schubert<dt><code>dscp</code> <kbd>value</kbd></dt>
2670052d159aSCy Schubert<dd><p>This option specifies the Differentiated Services Control Point (DSCP) value,
2671e27abb66SXin LIa 6-bit code.
2672e27abb66SXin LIThe default value is 46, signifying Expedited Forwarding.
2673052d159aSCy Schubert</p></dd>
2674052d159aSCy Schubert<dt><code>enable</code> <code>[<code>auth</code> | <code>bclient</code> | <code>calibrate</code> | <code>kernel</code> | <code>mode7</code> | <code>monitor</code> | <code>ntp</code> | <code>stats</code> | <code>peer_clear_digest_early</code> | <code>unpeer_crypto_early</code> | <code>unpeer_crypto_nak_early</code> | <code>unpeer_digest_early</code>]</code></dt>
2675052d159aSCy Schubert<dt><code>disable</code> <code>[<code>auth</code> | <code>bclient</code> | <code>calibrate</code> | <code>kernel</code> | <code>mode7</code> | <code>monitor</code> | <code>ntp</code> | <code>stats</code> | <code>peer_clear_digest_early</code> | <code>unpeer_crypto_early</code> | <code>unpeer_crypto_nak_early</code> | <code>unpeer_digest_early</code>]</code></dt>
2676052d159aSCy Schubert<dd><p>Provides a way to enable or disable various server options.
26772b15cb3dSCy SchubertFlags not mentioned are unaffected.
26782b15cb3dSCy SchubertNote that all of these flags
26792b15cb3dSCy Schubertcan be controlled remotely using the
26802b15cb3dSCy Schubert<code>ntpdc(1ntpdcmdoc)</code>
26812b15cb3dSCy Schubertutility program.
2682052d159aSCy Schubert</p><dl compact="compact">
2683052d159aSCy Schubert<dt><code>auth</code></dt>
2684052d159aSCy Schubert<dd><p>Enables the server to synchronize with unconfigured peers only if the
26852b15cb3dSCy Schubertpeer has been correctly authenticated using either public key or
26862b15cb3dSCy Schubertprivate key cryptography.
26872b15cb3dSCy SchubertThe default for this flag is
26882b15cb3dSCy Schubert<code>enable</code>.
2689052d159aSCy Schubert</p></dd>
2690052d159aSCy Schubert<dt><code>bclient</code></dt>
2691052d159aSCy Schubert<dd><p>Enables the server to listen for a message from a broadcast or
26922b15cb3dSCy Schubertmulticast server, as in the
26932b15cb3dSCy Schubert<code>multicastclient</code>
26942b15cb3dSCy Schubertcommand with default
26952b15cb3dSCy Schubertaddress.
26962b15cb3dSCy SchubertThe default for this flag is
26972b15cb3dSCy Schubert<code>disable</code>.
2698052d159aSCy Schubert</p></dd>
2699052d159aSCy Schubert<dt><code>calibrate</code></dt>
2700052d159aSCy Schubert<dd><p>Enables the calibrate feature for reference clocks.
27012b15cb3dSCy SchubertThe default for
27022b15cb3dSCy Schubertthis flag is
27032b15cb3dSCy Schubert<code>disable</code>.
2704052d159aSCy Schubert</p></dd>
2705052d159aSCy Schubert<dt><code>kernel</code></dt>
2706052d159aSCy Schubert<dd><p>Enables the kernel time discipline, if available.
27072b15cb3dSCy SchubertThe default for this
27082b15cb3dSCy Schubertflag is
27092b15cb3dSCy Schubert<code>enable</code>
27102b15cb3dSCy Schubertif support is available, otherwise
27112b15cb3dSCy Schubert<code>disable</code>.
2712052d159aSCy Schubert</p></dd>
2713052d159aSCy Schubert<dt><code>mode7</code></dt>
2714052d159aSCy Schubert<dd><p>Enables processing of NTP mode 7 implementation-specific requests
27152b15cb3dSCy Schubertwhich are used by the deprecated
27162b15cb3dSCy Schubert<code>ntpdc(1ntpdcmdoc)</code>
27172b15cb3dSCy Schubertprogram.
27182b15cb3dSCy SchubertThe default for this flag is disable.
27192b15cb3dSCy SchubertThis flag is excluded from runtime configuration using
27202b15cb3dSCy Schubert<code>ntpq(1ntpqmdoc)</code>.
27212b15cb3dSCy SchubertThe
27222b15cb3dSCy Schubert<code>ntpq(1ntpqmdoc)</code>
27232b15cb3dSCy Schubertprogram provides the same capabilities as
27242b15cb3dSCy Schubert<code>ntpdc(1ntpdcmdoc)</code>
27252b15cb3dSCy Schubertusing standard mode 6 requests.
2726052d159aSCy Schubert</p></dd>
2727052d159aSCy Schubert<dt><code>monitor</code></dt>
2728052d159aSCy Schubert<dd><p>Enables the monitoring facility.
27292b15cb3dSCy SchubertSee the
27302b15cb3dSCy Schubert<code>ntpdc(1ntpdcmdoc)</code>
27312b15cb3dSCy Schubertprogram
27322b15cb3dSCy Schubertand the
27332b15cb3dSCy Schubert<code>monlist</code>
27342b15cb3dSCy Schubertcommand or further information.
27352b15cb3dSCy SchubertThe
27362b15cb3dSCy Schubertdefault for this flag is
27372b15cb3dSCy Schubert<code>enable</code>.
2738052d159aSCy Schubert</p></dd>
2739052d159aSCy Schubert<dt><code>ntp</code></dt>
2740052d159aSCy Schubert<dd><p>Enables time and frequency discipline.
27412b15cb3dSCy SchubertIn effect, this switch opens and
27422b15cb3dSCy Schubertcloses the feedback loop, which is useful for testing.
27432b15cb3dSCy SchubertThe default for
27442b15cb3dSCy Schubertthis flag is
27452b15cb3dSCy Schubert<code>enable</code>.
2746052d159aSCy Schubert</p></dd>
2747052d159aSCy Schubert<dt><code>peer_clear_digest_early</code></dt>
2748052d159aSCy Schubert<dd><p>By default, if
2749e27abb66SXin LI<code>ntpd(1ntpdmdoc)</code>
2750e27abb66SXin LIis using autokey and it
2751e27abb66SXin LIreceives a crypto-NAK packet that
2752e27abb66SXin LIpasses the duplicate packet and origin timestamp checks
2753e27abb66SXin LIthe peer variables are immediately cleared.
2754e27abb66SXin LIWhile this is generally a feature
2755e27abb66SXin LIas it allows for quick recovery if a server key has changed,
2756e27abb66SXin LIa properly forged and appropriately delivered crypto-NAK packet
2757e27abb66SXin LIcan be used in a DoS attack.
2758e27abb66SXin LIIf you have active noticable problems with this type of DoS attack
2759e27abb66SXin LIthen you should consider
2760e27abb66SXin LIdisabling this option.
2761e27abb66SXin LIYou can check your
2762e27abb66SXin LI<code>peerstats</code>
2763e27abb66SXin LIfile for evidence of any of these attacks.
2764e27abb66SXin LIThe
2765e27abb66SXin LIdefault for this flag is
2766e27abb66SXin LI<code>enable</code>.
2767052d159aSCy Schubert</p></dd>
2768052d159aSCy Schubert<dt><code>stats</code></dt>
2769052d159aSCy Schubert<dd><p>Enables the statistics facility.
27702b15cb3dSCy SchubertSee the
2771052d159aSCy Schubert&lsquo;Monitoring Options&rsquo;
27722b15cb3dSCy Schubertsection for further information.
27732b15cb3dSCy SchubertThe default for this flag is
27742b15cb3dSCy Schubert<code>disable</code>.
2775052d159aSCy Schubert</p></dd>
2776052d159aSCy Schubert<dt><code>unpeer_crypto_early</code></dt>
2777052d159aSCy Schubert<dd><p>By default, if
277868ba7e87SXin LI<code>ntpd(1ntpdmdoc)</code>
277968ba7e87SXin LIreceives an autokey packet that fails TEST9,
278068ba7e87SXin LIa crypto failure,
278168ba7e87SXin LIthe association is immediately cleared.
278268ba7e87SXin LIThis is almost certainly a feature,
278368ba7e87SXin LIbut if, in spite of the current recommendation of not using autokey,
278468ba7e87SXin LIyou are
278568ba7e87SXin LI.B still
278668ba7e87SXin LIusing autokey
278768ba7e87SXin LI.B and
278868ba7e87SXin LIyou are seeing this sort of DoS attack
278968ba7e87SXin LIdisabling this flag will delay
279068ba7e87SXin LItearing down the association until the reachability counter
279168ba7e87SXin LIbecomes zero.
279268ba7e87SXin LIYou can check your
279368ba7e87SXin LI<code>peerstats</code>
279468ba7e87SXin LIfile for evidence of any of these attacks.
279568ba7e87SXin LIThe
279668ba7e87SXin LIdefault for this flag is
279768ba7e87SXin LI<code>enable</code>.
2798052d159aSCy Schubert</p></dd>
2799052d159aSCy Schubert<dt><code>unpeer_crypto_nak_early</code></dt>
2800052d159aSCy Schubert<dd><p>By default, if
280168ba7e87SXin LI<code>ntpd(1ntpdmdoc)</code>
280268ba7e87SXin LIreceives a crypto-NAK packet that
280368ba7e87SXin LIpasses the duplicate packet and origin timestamp checks
280468ba7e87SXin LIthe association is immediately cleared.
280568ba7e87SXin LIWhile this is generally a feature
280668ba7e87SXin LIas it allows for quick recovery if a server key has changed,
280768ba7e87SXin LIa properly forged and appropriately delivered crypto-NAK packet
280868ba7e87SXin LIcan be used in a DoS attack.
280968ba7e87SXin LIIf you have active noticable problems with this type of DoS attack
281068ba7e87SXin LIthen you should consider
281168ba7e87SXin LIdisabling this option.
281268ba7e87SXin LIYou can check your
281368ba7e87SXin LI<code>peerstats</code>
281468ba7e87SXin LIfile for evidence of any of these attacks.
281568ba7e87SXin LIThe
281668ba7e87SXin LIdefault for this flag is
281768ba7e87SXin LI<code>enable</code>.
2818052d159aSCy Schubert</p></dd>
2819052d159aSCy Schubert<dt><code>unpeer_digest_early</code></dt>
2820052d159aSCy Schubert<dd><p>By default, if
282168ba7e87SXin LI<code>ntpd(1ntpdmdoc)</code>
282268ba7e87SXin LIreceives what should be an authenticated packet
282368ba7e87SXin LIthat passes other packet sanity checks but
282468ba7e87SXin LIcontains an invalid digest
282568ba7e87SXin LIthe association is immediately cleared.
282668ba7e87SXin LIWhile this is generally a feature
282768ba7e87SXin LIas it allows for quick recovery,
282868ba7e87SXin LIif this type of packet is carefully forged and sent
282968ba7e87SXin LIduring an appropriate window it can be used for a DoS attack.
283068ba7e87SXin LIIf you have active noticable problems with this type of DoS attack
283168ba7e87SXin LIthen you should consider
283268ba7e87SXin LIdisabling this option.
283368ba7e87SXin LIYou can check your
283468ba7e87SXin LI<code>peerstats</code>
283568ba7e87SXin LIfile for evidence of any of these attacks.
283668ba7e87SXin LIThe
283768ba7e87SXin LIdefault for this flag is
283868ba7e87SXin LI<code>enable</code>.
2839052d159aSCy Schubert</p></dd>
28402b15cb3dSCy Schubert</dl>
2841052d159aSCy Schubert</dd>
2842052d159aSCy Schubert<dt><code>includefile</code> <kbd>includefile</kbd></dt>
2843052d159aSCy Schubert<dd><p>This command allows additional configuration commands
28442b15cb3dSCy Schubertto be included from a separate file.
28452b15cb3dSCy SchubertInclude files may
28462b15cb3dSCy Schubertbe nested to a depth of five; upon reaching the end of any
28472b15cb3dSCy Schubertinclude file, command processing resumes in the previous
28482b15cb3dSCy Schubertconfiguration file.
28492b15cb3dSCy SchubertThis option is useful for sites that run
28502b15cb3dSCy Schubert<code>ntpd(1ntpdmdoc)</code>
28512b15cb3dSCy Schuberton multiple hosts, with (mostly) common options (e.g., a
28522b15cb3dSCy Schubertrestriction list).
2853052d159aSCy Schubert</p></dd>
2854052d159aSCy Schubert<dt><code>interface</code> <code>[<code>listen</code> | <code>ignore</code> | <code>drop</code>]</code> <code>[<code>all</code> | <code>ipv4</code> | <code>ipv6</code> | <code>wildcard</code> <kbd>name</kbd> | <kbd>address</kbd> <code>[<code>/</code> <kbd>prefixlen</kbd>]</code>]</code></dt>
2855052d159aSCy Schubert<dd><p>The
285609100258SXin LI<code>interface</code>
285709100258SXin LIdirective controls which network addresses
285809100258SXin LI<code>ntpd(1ntpdmdoc)</code>
285909100258SXin LIopens, and whether input is dropped without processing.
286009100258SXin LIThe first parameter determines the action for addresses
286109100258SXin LIwhich match the second parameter.
286209100258SXin LIThe second parameter specifies a class of addresses,
286309100258SXin LIor a specific interface name,
286409100258SXin LIor an address.
286509100258SXin LIIn the address case,
286609100258SXin LI<kbd>prefixlen</kbd>
286709100258SXin LIdetermines how many bits must match for this rule to apply.
286809100258SXin LI<code>ignore</code>
286909100258SXin LIprevents opening matching addresses,
287009100258SXin LI<code>drop</code>
287109100258SXin LIcauses
287209100258SXin LI<code>ntpd(1ntpdmdoc)</code>
287309100258SXin LIto open the address and drop all received packets without examination.
287409100258SXin LIMultiple
287509100258SXin LI<code>interface</code>
287609100258SXin LIdirectives can be used.
287709100258SXin LIThe last rule which matches a particular address determines the action for it.
287809100258SXin LI<code>interface</code>
287909100258SXin LIdirectives are disabled if any
288009100258SXin LI<code>-I</code>,
288109100258SXin LI<code>--interface</code>,
288209100258SXin LI<code>-L</code>,
288309100258SXin LIor
288409100258SXin LI<code>--novirtualips</code>
288509100258SXin LIcommand-line options are specified in the configuration file,
288609100258SXin LIall available network addresses are opened.
288709100258SXin LIThe
288809100258SXin LI<code>nic</code>
288909100258SXin LIdirective is an alias for
289009100258SXin LI<code>interface</code>.
2891052d159aSCy Schubert</p></dd>
2892052d159aSCy Schubert<dt><code>leapfile</code> <kbd>leapfile</kbd></dt>
2893052d159aSCy Schubert<dd><p>This command loads the IERS leapseconds file and initializes the
289409100258SXin LIleapsecond values for the next leapsecond event, leapfile expiration
289509100258SXin LItime, and TAI offset.
289609100258SXin LIThe file can be obtained directly from the IERS at
289709100258SXin LI<code>https://hpiers.obspm.fr/iers/bul/bulc/ntp/leap-seconds.list</code>
289809100258SXin LIor
289909100258SXin LI<code>ftp://hpiers.obspm.fr/iers/bul/bulc/ntp/leap-seconds.list</code>.
290009100258SXin LIThe
290109100258SXin LI<code>leapfile</code>
290209100258SXin LIis scanned when
290309100258SXin LI<code>ntpd(1ntpdmdoc)</code>
290409100258SXin LIprocesses the
290509100258SXin LI<code>leapfile</code> <code>directive</code> <code>or</code> <code>when</code>
290609100258SXin LI<code>ntpd</code> <code>detects</code> <code>that</code> <code>the</code>
290709100258SXin LI<kbd>leapfile</kbd>
290809100258SXin LIhas changed.
290909100258SXin LI<code>ntpd</code>
291009100258SXin LIchecks once a day to see if the
291109100258SXin LI<kbd>leapfile</kbd>
291209100258SXin LIhas changed.
291309100258SXin LIThe
291409100258SXin LI<code>update-leap(1update_leapmdoc)</code>
291509100258SXin LIscript can be run to see if the
291609100258SXin LI<kbd>leapfile</kbd>
291709100258SXin LIshould be updated.
2918052d159aSCy Schubert</p></dd>
2919052d159aSCy Schubert<dt><code>leapsmearinterval</code> <kbd>seconds</kbd></dt>
2920052d159aSCy Schubert<dd><p>This EXPERIMENTAL option is only available if
2921276da39aSCy Schubert<code>ntpd(1ntpdmdoc)</code>
2922276da39aSCy Schubertwas built with the
2923276da39aSCy Schubert<code>--enable-leap-smear</code>
2924276da39aSCy Schubertoption to the
2925276da39aSCy Schubert<code>configure</code>
2926276da39aSCy Schubertscript.
2927276da39aSCy SchubertIt specifies the interval over which a leap second correction will be applied.
2928276da39aSCy SchubertRecommended values for this option are between
2929276da39aSCy Schubert7200 (2 hours) and 86400 (24 hours).
2930276da39aSCy Schubert.Sy DO NOT USE THIS OPTION ON PUBLIC-ACCESS SERVERS!
2931276da39aSCy SchubertSee http://bugs.ntp.org/2855 for more information.
2932052d159aSCy Schubert</p></dd>
2933052d159aSCy Schubert<dt><code>logconfig</code> <kbd>configkeyword</kbd></dt>
2934052d159aSCy Schubert<dd><p>This command controls the amount and type of output written to
29352b15cb3dSCy Schubertthe system
29362b15cb3dSCy Schubert<code>syslog(3)</code>
29372b15cb3dSCy Schubertfacility or the alternate
29382b15cb3dSCy Schubert<code>logfile</code>
29392b15cb3dSCy Schubertlog file.
29402b15cb3dSCy SchubertBy default, all output is turned on.
29412b15cb3dSCy SchubertAll
29422b15cb3dSCy Schubert<kbd>configkeyword</kbd>
29432b15cb3dSCy Schubertkeywords can be prefixed with
2944052d159aSCy Schubert&lsquo;=&rsquo;,
2945052d159aSCy Schubert&lsquo;+&rsquo;
29462b15cb3dSCy Schubertand
2947052d159aSCy Schubert&lsquo;-&rsquo;,
29482b15cb3dSCy Schubertwhere
2949052d159aSCy Schubert&lsquo;=&rsquo;
29502b15cb3dSCy Schubertsets the
29512b15cb3dSCy Schubert<code>syslog(3)</code>
29522b15cb3dSCy Schubertpriority mask,
2953052d159aSCy Schubert&lsquo;+&rsquo;
29542b15cb3dSCy Schubertadds and
2955052d159aSCy Schubert&lsquo;-&rsquo;
29562b15cb3dSCy Schubertremoves
29572b15cb3dSCy Schubertmessages.
29582b15cb3dSCy Schubert<code>syslog(3)</code>
29592b15cb3dSCy Schubertmessages can be controlled in four
29602b15cb3dSCy Schubertclasses
29612b15cb3dSCy Schubert(<code>clock</code>, <code>peer</code>, <code>sys</code> and <code>sync</code>).
29622b15cb3dSCy SchubertWithin these classes four types of messages can be
29632b15cb3dSCy Schubertcontrolled: informational messages
29642b15cb3dSCy Schubert(<code>info</code>),
29652b15cb3dSCy Schubertevent messages
29662b15cb3dSCy Schubert(<code>events</code>),
29672b15cb3dSCy Schubertstatistics messages
29682b15cb3dSCy Schubert(<code>statistics</code>)
29692b15cb3dSCy Schubertand
29702b15cb3dSCy Schubertstatus messages
29712b15cb3dSCy Schubert(<code>status</code>).
2972052d159aSCy Schubert</p>
29732b15cb3dSCy Schubert<p>Configuration keywords are formed by concatenating the message class with
29742b15cb3dSCy Schubertthe event class.
29752b15cb3dSCy SchubertThe
29762b15cb3dSCy Schubert<code>all</code>
29772b15cb3dSCy Schubertprefix can be used instead of a message class.
29782b15cb3dSCy SchubertA
29792b15cb3dSCy Schubertmessage class may also be followed by the
29802b15cb3dSCy Schubert<code>all</code>
29812b15cb3dSCy Schubertkeyword to enable/disable all
2982e27abb66SXin LImessages of the respective message class.
2983e27abb66SXin LIThus, a minimal log configuration
29842b15cb3dSCy Schubertcould look like this:
2985052d159aSCy Schubert</p><pre class="verbatim">logconfig =syncstatus +sysevents
29862b15cb3dSCy Schubert</pre>
29872b15cb3dSCy Schubert<p>This would just list the synchronizations state of
29882b15cb3dSCy Schubert<code>ntpd(1ntpdmdoc)</code>
29892b15cb3dSCy Schubertand the major system events.
29902b15cb3dSCy SchubertFor a simple reference server, the
29912b15cb3dSCy Schubertfollowing minimum message configuration could be useful:
2992052d159aSCy Schubert</p><pre class="verbatim">logconfig =syncall +clockall
29932b15cb3dSCy Schubert</pre>
29942b15cb3dSCy Schubert<p>This configuration will list all clock information and
29952b15cb3dSCy Schubertsynchronization information.
29962b15cb3dSCy SchubertAll other events and messages about
29972b15cb3dSCy Schubertpeers, system events and so on is suppressed.
2998052d159aSCy Schubert</p></dd>
2999052d159aSCy Schubert<dt><code>logfile</code> <kbd>logfile</kbd></dt>
3000052d159aSCy Schubert<dd><p>This command specifies the location of an alternate log file to
30012b15cb3dSCy Schubertbe used instead of the default system
30022b15cb3dSCy Schubert<code>syslog(3)</code>
30032b15cb3dSCy Schubertfacility.
30044990d495SXin LIThis is the same operation as the
30054990d495SXin LI<code>-l</code>
30064990d495SXin LIcommand line option.
3007052d159aSCy Schubert</p></dd>
3008052d159aSCy Schubert<dt><code>mru</code> <code>[<code>maxdepth</code> <kbd>count</kbd> | <code>maxmem</code> <kbd>kilobytes</kbd> | <code>mindepth</code> <kbd>count</kbd> | <code>maxage</code> <kbd>seconds</kbd> | <code>initialloc</code> <kbd>count</kbd> | <code>initmem</code> <kbd>kilobytes</kbd> | <code>incalloc</code> <kbd>count</kbd> | <code>incmem</code> <kbd>kilobytes</kbd>]</code></dt>
3009052d159aSCy Schubert<dd><p>Controls size limite of the monitoring facility&rsquo;s Most Recently Used
301009100258SXin LI(MRU) list
301109100258SXin LIof client addresses, which is also used by the
301209100258SXin LIrate control facility.
3013052d159aSCy Schubert</p><dl compact="compact">
3014052d159aSCy Schubert<dt><code>maxdepth</code> <kbd>count</kbd></dt>
3015052d159aSCy Schubert<dt><code>maxmem</code> <kbd>kilobytes</kbd></dt>
3016052d159aSCy Schubert<dd><p>Equivalent upper limits on the size of the MRU list, in terms of entries or kilobytes.
301709100258SXin LIThe acutal limit will be up to
301809100258SXin LI<code>incalloc</code>
301909100258SXin LIentries or
302009100258SXin LI<code>incmem</code>
302109100258SXin LIkilobytes larger.
302209100258SXin LIAs with all of the
302309100258SXin LI<code>mru</code>
302409100258SXin LIoptions offered in units of entries or kilobytes, if both
302509100258SXin LI<code>maxdepth</code>
302609100258SXin LIand
302709100258SXin LI<code>maxmem</code> <code>are</code> <code>used,</code> <code>the</code> <code>last</code> <code>one</code> <code>used</code> <code>controls.</code>
302809100258SXin LIThe default is 1024 kilobytes.
3029052d159aSCy Schubert</p></dd>
3030052d159aSCy Schubert<dt><code>mindepth</code> <kbd>count</kbd></dt>
3031052d159aSCy Schubert<dd><p>Lower limit on the MRU list size.
303209100258SXin LIWhen the MRU list has fewer than
303309100258SXin LI<code>mindepth</code>
303409100258SXin LIentries, existing entries are never removed to make room for newer ones,
303509100258SXin LIregardless of their age.
303609100258SXin LIThe default is 600 entries.
3037052d159aSCy Schubert</p></dd>
3038052d159aSCy Schubert<dt><code>maxage</code> <kbd>seconds</kbd></dt>
3039052d159aSCy Schubert<dd><p>Once the MRU list has
304009100258SXin LI<code>mindepth</code>
304109100258SXin LIentries and an additional client is to ba added to the list,
304209100258SXin LIif the oldest entry was updated more than
304309100258SXin LI<code>maxage</code>
304409100258SXin LIseconds ago, that entry is removed and its storage is reused.
304509100258SXin LIIf the oldest entry was updated more recently the MRU list is grown,
304609100258SXin LIsubject to
304709100258SXin LI<code>maxdepth</code> <code>/</code> <code>moxmem</code>.
304809100258SXin LIThe default is 64 seconds.
3049052d159aSCy Schubert</p></dd>
3050052d159aSCy Schubert<dt><code>initalloc</code> <kbd>count</kbd></dt>
3051052d159aSCy Schubert<dt><code>initmem</code> <kbd>kilobytes</kbd></dt>
3052052d159aSCy Schubert<dd><p>Initial memory allocation at the time the monitoringfacility is first enabled,
305309100258SXin LIin terms of the number of entries or kilobytes.
305409100258SXin LIThe default is 4 kilobytes.
3055052d159aSCy Schubert</p></dd>
3056052d159aSCy Schubert<dt><code>incalloc</code> <kbd>count</kbd></dt>
3057052d159aSCy Schubert<dt><code>incmem</code> <kbd>kilobytes</kbd></dt>
3058052d159aSCy Schubert<dd><p>Size of additional memory allocations when growing the MRU list, in entries or kilobytes.
305909100258SXin LIThe default is 4 kilobytes.
3060052d159aSCy Schubert</p></dd>
306109100258SXin LI</dl>
3062052d159aSCy Schubert</dd>
3063052d159aSCy Schubert<dt><code>nonvolatile</code> <kbd>threshold</kbd></dt>
3064052d159aSCy Schubert<dd><p>Specify the
306509100258SXin LI<kbd>threshold</kbd>
306609100258SXin LIdelta in seconds before an hourly change to the
306709100258SXin LI<code>driftfile</code>
306809100258SXin LI(frequency file) will be written, with a default value of 1e-7 (0.1 PPM).
306909100258SXin LIThe frequency file is inspected each hour.
307009100258SXin LIIf the difference between the current frequency and the last value written
307109100258SXin LIexceeds the threshold, the file is written and the
307209100258SXin LI<code>threshold</code>
307309100258SXin LIbecomes the new threshold value.
307409100258SXin LIIf the threshold is not exceeeded, it is reduced by half.
307509100258SXin LIThis is intended to reduce the number of file writes
307609100258SXin LIfor embedded systems with nonvolatile memory.
3077052d159aSCy Schubert</p></dd>
3078052d159aSCy Schubert<dt><code>phone</code> <kbd>dial</kbd> <kbd>...</kbd></dt>
3079052d159aSCy Schubert<dd><p>This command is used in conjunction with
308009100258SXin LIthe ACTS modem driver (type 18)
308109100258SXin LIor the JJY driver (type 40, mode 100 - 180).
308209100258SXin LIFor the ACTS modem driver (type 18), the arguments consist of
308309100258SXin LIa maximum of 10 telephone numbers used to dial USNO, NIST, or European
308409100258SXin LItime service.
308509100258SXin LIFor the JJY driver (type 40 mode 100 - 180), the argument is
308609100258SXin LIone telephone number used to dial the telephone JJY service.
308709100258SXin LIThe Hayes command ATDT is normally prepended to the number.
308809100258SXin LIThe number can contain other modem control codes as well.
3089052d159aSCy Schubert</p></dd>
3090*2d4e511cSCy Schubert<dt><code>pollskewlist</code> <code>[<kbd>poll</kbd> <kbd>value</kbd> | <kbd>value</kbd>]</code> <kbd>...</kbd> <code>[<code>default</code> <kbd>value</kbd> | <kbd>value</kbd>]</code></dt>
3091*2d4e511cSCy Schubert<dd><p>Enable skewing of our poll requests to our servers.
3092*2d4e511cSCy Schubert<kbd>poll</kbd>
3093*2d4e511cSCy Schubertis a number between 3 and 17 inclusive, identifying a specific poll interval.
3094*2d4e511cSCy SchubertA poll interval is 2^n seconds in duration,
3095*2d4e511cSCy Schubertso a poll value of 3 corresponds to 8 seconds
3096*2d4e511cSCy Schubertand
3097*2d4e511cSCy Schuberta poll interval of 17 corresponds to
3098*2d4e511cSCy Schubert131,072 seconds, or about a day and a half.
3099*2d4e511cSCy SchubertThe next two numbers must be between 0 and one-half of the poll interval,
3100*2d4e511cSCy Schubertinclusive.
3101*2d4e511cSCy SchubertThe first number specifies how early the poll may start,
3102*2d4e511cSCy Schubertwhile
3103*2d4e511cSCy Schubertthe second number specifies how late the poll may be delayed.
3104*2d4e511cSCy SchubertWith no arguments, internally specified default values are chosen.
3105*2d4e511cSCy Schubert</p></dd>
3106052d159aSCy Schubert<dt><code>reset</code> <code>[<code>allpeers</code>]</code> <code>[<code>auth</code>]</code> <code>[<code>ctl</code>]</code> <code>[<code>io</code>]</code> <code>[<code>mem</code>]</code> <code>[<code>sys</code>]</code> <code>[<code>timer</code>]</code></dt>
3107052d159aSCy Schubert<dd><p>Reset one or more groups of counters maintained by
310809100258SXin LI<code>ntpd</code>
310909100258SXin LIand exposed by
311009100258SXin LI<code>ntpq</code>
311109100258SXin LIand
311209100258SXin LI<code>ntpdc</code>.
3113052d159aSCy Schubert</p></dd>
3114052d159aSCy Schubert<dt><code>rlimit</code> <code>[<code>memlock</code> <kbd>Nmegabytes</kbd> | <code>stacksize</code> <kbd>N4kPages</kbd> <code>filenum</code> <kbd>Nfiledescriptors</kbd>]</code></dt>
3115052d159aSCy Schubert<dd><dl compact="compact">
3116052d159aSCy Schubert<dt><code>memlock</code> <kbd>Nmegabytes</kbd></dt>
3117052d159aSCy Schubert<dd><p>Specify the number of megabytes of memory that should be
311809100258SXin LIallocated and locked.
311909100258SXin LIProbably only available under Linux, this option may be useful
312009100258SXin LIwhen dropping root (the
312109100258SXin LI<code>-i</code>
312209100258SXin LIoption).
312309100258SXin LIThe default is 32 megabytes on non-Linux machines, and -1 under Linux.
3124052d159aSCy Schubert-1 means &quot;do not lock the process into memory&quot;.
3125052d159aSCy Schubert0 means &quot;lock whatever memory the process wants into memory&quot;.
3126052d159aSCy Schubert</p></dd>
3127052d159aSCy Schubert<dt><code>stacksize</code> <kbd>N4kPages</kbd></dt>
3128052d159aSCy Schubert<dd><p>Specifies the maximum size of the process stack on systems with the
312909100258SXin LI<code>mlockall()</code>
313009100258SXin LIfunction.
313109100258SXin LIDefaults to 50 4k pages (200 4k pages in OpenBSD).
3132052d159aSCy Schubert</p></dd>
3133052d159aSCy Schubert<dt><code>filenum</code> <kbd>Nfiledescriptors</kbd></dt>
3134052d159aSCy Schubert<dd><p>Specifies the maximum number of file descriptors ntpd may have open at once.
313509100258SXin LIDefaults to the system default.
3136052d159aSCy Schubert</p></dd>
313709100258SXin LI</dl>
3138052d159aSCy Schubert</dd>
3139052d159aSCy Schubert<dt><code>saveconfigdir</code> <kbd>directory_path</kbd></dt>
3140052d159aSCy Schubert<dd><p>Specify the directory in which to write configuration snapshots
314109100258SXin LIrequested with
3142052d159aSCy Schubert.Cm ntpq &rsquo;s
314309100258SXin LI<code>saveconfig</code>
314409100258SXin LIcommand.
314509100258SXin LIIf
314609100258SXin LI<code>saveconfigdir</code>
314709100258SXin LIdoes not appear in the configuration file,
314809100258SXin LI<code>saveconfig</code>
314909100258SXin LIrequests are rejected by
315009100258SXin LI<code>ntpd</code>.
3151052d159aSCy Schubert</p></dd>
3152052d159aSCy Schubert<dt><code>saveconfig</code> <kbd>filename</kbd></dt>
3153052d159aSCy Schubert<dd><p>Write the current configuration, including any runtime
315409100258SXin LImodifications given with
315509100258SXin LI<code>:config</code>
315609100258SXin LIor
315709100258SXin LI<code>config-from-file</code>
315809100258SXin LIto the
315909100258SXin LI<code>ntpd</code>
3160052d159aSCy Schuberthost&rsquo;s
316109100258SXin LI<kbd>filename</kbd>
316209100258SXin LIin the
316309100258SXin LI<code>saveconfigdir</code>.
316409100258SXin LIThis command will be rejected unless the
316509100258SXin LI<code>saveconfigdir</code>
316609100258SXin LIdirective appears in
3167052d159aSCy Schubert.Cm ntpd &rsquo;s
316809100258SXin LIconfiguration file.
316909100258SXin LI<kbd>filename</kbd>
317009100258SXin LIcan use
317109100258SXin LI<code>strftime(3)</code>
317209100258SXin LIformat directives to substitute the current date and time,
317309100258SXin LIfor example,
317409100258SXin LI<code>saveconfig\ ntp-%Y%m%d-%H%M%S.conf</code>.
317509100258SXin LIThe filename used is stored in the system variable
317609100258SXin LI<code>savedconfig</code>.
317709100258SXin LIAuthentication is required.
3178052d159aSCy Schubert</p></dd>
3179052d159aSCy Schubert<dt><code>setvar</code> <kbd>variable</kbd> <code>[<code>default</code>]</code></dt>
3180052d159aSCy Schubert<dd><p>This command adds an additional system variable.
31812b15cb3dSCy SchubertThese
31822b15cb3dSCy Schubertvariables can be used to distribute additional information such as
31832b15cb3dSCy Schubertthe access policy.
31842b15cb3dSCy SchubertIf the variable of the form
31852b15cb3dSCy Schubert<code>name</code><code>=</code><kbd>value</kbd>
31862b15cb3dSCy Schubertis followed by the
31872b15cb3dSCy Schubert<code>default</code>
31882b15cb3dSCy Schubertkeyword, the
31892b15cb3dSCy Schubertvariable will be listed as part of the default system variables
31902b15cb3dSCy Schubert(<code>rv</code> command)).
31912b15cb3dSCy SchubertThese additional variables serve
31922b15cb3dSCy Schubertinformational purposes only.
31932b15cb3dSCy SchubertThey are not related to the protocol
31942b15cb3dSCy Schubertother that they can be listed.
31952b15cb3dSCy SchubertThe known protocol variables will
31962b15cb3dSCy Schubertalways override any variables defined via the
31972b15cb3dSCy Schubert<code>setvar</code>
31982b15cb3dSCy Schubertmechanism.
31992b15cb3dSCy SchubertThere are three special variables that contain the names
32002b15cb3dSCy Schubertof all variable of the same group.
32012b15cb3dSCy SchubertThe
32022b15cb3dSCy Schubert<code>sys_var_list</code>
32032b15cb3dSCy Schubertholds
32042b15cb3dSCy Schubertthe names of all system variables.
32052b15cb3dSCy SchubertThe
32062b15cb3dSCy Schubert<code>peer_var_list</code>
32072b15cb3dSCy Schubertholds
32082b15cb3dSCy Schubertthe names of all peer variables and the
32092b15cb3dSCy Schubert<code>clock_var_list</code>
32102b15cb3dSCy Schubertholds the names of the reference clock variables.
3211052d159aSCy Schubert</p></dd>
3212052d159aSCy Schubert<dt><code>sysinfo</code></dt>
3213052d159aSCy Schubert<dd><p>Display operational summary.
3214052d159aSCy Schubert</p></dd>
3215052d159aSCy Schubert<dt><code>sysstats</code></dt>
3216052d159aSCy Schubert<dd><p>Show statistics counters maintained in the protocol module.
3217052d159aSCy Schubert</p></dd>
3218052d159aSCy Schubert<dt><code>tinker</code> <code>[<code>allan</code> <kbd>allan</kbd> | <code>dispersion</code> <kbd>dispersion</kbd> | <code>freq</code> <kbd>freq</kbd> | <code>huffpuff</code> <kbd>huffpuff</kbd> | <code>panic</code> <kbd>panic</kbd> | <code>step</code> <kbd>step</kbd> | <code>stepback</code> <kbd>stepback</kbd> | <code>stepfwd</code> <kbd>stepfwd</kbd> | <code>stepout</code> <kbd>stepout</kbd>]</code></dt>
3219052d159aSCy Schubert<dd><p>This command can be used to alter several system variables in
32202b15cb3dSCy Schubertvery exceptional circumstances.
32212b15cb3dSCy SchubertIt should occur in the
32222b15cb3dSCy Schubertconfiguration file before any other configuration options.
32232b15cb3dSCy SchubertThe
32242b15cb3dSCy Schubertdefault values of these variables have been carefully optimized for
32252b15cb3dSCy Schuberta wide range of network speeds and reliability expectations.
32262b15cb3dSCy SchubertIn
32272b15cb3dSCy Schubertgeneral, they interact in intricate ways that are hard to predict
32282b15cb3dSCy Schubertand some combinations can result in some very nasty behavior.
32292b15cb3dSCy SchubertVery
32302b15cb3dSCy Schubertrarely is it necessary to change the default values; but, some
32312b15cb3dSCy Schubertfolks cannot resist twisting the knobs anyway and this command is
32322b15cb3dSCy Schubertfor them.
32332b15cb3dSCy SchubertEmphasis added: twisters are on their own and can expect
32342b15cb3dSCy Schubertno help from the support group.
3235052d159aSCy Schubert</p>
32362b15cb3dSCy Schubert<p>The variables operate as follows:
3237052d159aSCy Schubert</p><dl compact="compact">
3238052d159aSCy Schubert<dt><code>allan</code> <kbd>allan</kbd></dt>
3239052d159aSCy Schubert<dd><p>The argument becomes the new value for the minimum Allan
32402b15cb3dSCy Schubertintercept, which is a parameter of the PLL/FLL clock discipline
32412b15cb3dSCy Schubertalgorithm.
32422b15cb3dSCy SchubertThe value in log2 seconds defaults to 7 (1024 s), which is also the lower
32432b15cb3dSCy Schubertlimit.
3244052d159aSCy Schubert</p></dd>
3245052d159aSCy Schubert<dt><code>dispersion</code> <kbd>dispersion</kbd></dt>
3246052d159aSCy Schubert<dd><p>The argument becomes the new value for the dispersion increase rate,
32472b15cb3dSCy Schubertnormally .000015 s/s.
3248052d159aSCy Schubert</p></dd>
3249052d159aSCy Schubert<dt><code>freq</code> <kbd>freq</kbd></dt>
3250052d159aSCy Schubert<dd><p>The argument becomes the initial value of the frequency offset in
32512b15cb3dSCy Schubertparts-per-million.
32522b15cb3dSCy SchubertThis overrides the value in the frequency file, if
32532b15cb3dSCy Schubertpresent, and avoids the initial training state if it is not.
3254052d159aSCy Schubert</p></dd>
3255052d159aSCy Schubert<dt><code>huffpuff</code> <kbd>huffpuff</kbd></dt>
3256052d159aSCy Schubert<dd><p>The argument becomes the new value for the experimental
3257052d159aSCy Schuberthuff-n&rsquo;-puff filter span, which determines the most recent interval
32582b15cb3dSCy Schubertthe algorithm will search for a minimum delay.
32592b15cb3dSCy SchubertThe lower limit is
32602b15cb3dSCy Schubert900 s (15 m), but a more reasonable value is 7200 (2 hours).
32612b15cb3dSCy SchubertThere
32622b15cb3dSCy Schubertis no default, since the filter is not enabled unless this command
32632b15cb3dSCy Schubertis given.
3264052d159aSCy Schubert</p></dd>
3265052d159aSCy Schubert<dt><code>panic</code> <kbd>panic</kbd></dt>
3266052d159aSCy Schubert<dd><p>The argument is the panic threshold, normally 1000 s.
32672b15cb3dSCy SchubertIf set to zero,
32682b15cb3dSCy Schubertthe panic sanity check is disabled and a clock offset of any value will
32692b15cb3dSCy Schubertbe accepted.
3270052d159aSCy Schubert</p></dd>
3271052d159aSCy Schubert<dt><code>step</code> <kbd>step</kbd></dt>
3272052d159aSCy Schubert<dd><p>The argument is the step threshold, which by default is 0.128 s.
32732b15cb3dSCy SchubertIt can
32742b15cb3dSCy Schubertbe set to any positive number in seconds.
32752b15cb3dSCy SchubertIf set to zero, step
32762b15cb3dSCy Schubertadjustments will never occur.
32772b15cb3dSCy SchubertNote: The kernel time discipline is
32782b15cb3dSCy Schubertdisabled if the step threshold is set to zero or greater than the
32792b15cb3dSCy Schubertdefault.
3280052d159aSCy Schubert</p></dd>
3281052d159aSCy Schubert<dt><code>stepback</code> <kbd>stepback</kbd></dt>
3282052d159aSCy Schubert<dd><p>The argument is the step threshold for the backward direction,
3283a25439b6SCy Schubertwhich by default is 0.128 s.
3284a25439b6SCy SchubertIt can
3285a25439b6SCy Schubertbe set to any positive number in seconds.
3286a25439b6SCy SchubertIf both the forward and backward step thresholds are set to zero, step
3287a25439b6SCy Schubertadjustments will never occur.
3288a25439b6SCy SchubertNote: The kernel time discipline is
3289a25439b6SCy Schubertdisabled if
3290a25439b6SCy Schuberteach direction of step threshold are either
3291a25439b6SCy Schubertset to zero or greater than .5 second.
3292052d159aSCy Schubert</p></dd>
3293052d159aSCy Schubert<dt><code>stepfwd</code> <kbd>stepfwd</kbd></dt>
3294052d159aSCy Schubert<dd><p>As for stepback, but for the forward direction.
3295052d159aSCy Schubert</p></dd>
3296052d159aSCy Schubert<dt><code>stepout</code> <kbd>stepout</kbd></dt>
3297052d159aSCy Schubert<dd><p>The argument is the stepout timeout, which by default is 900 s.
32982b15cb3dSCy SchubertIt can
32992b15cb3dSCy Schubertbe set to any positive number in seconds.
33002b15cb3dSCy SchubertIf set to zero, the stepout
33012b15cb3dSCy Schubertpulses will not be suppressed.
3302052d159aSCy Schubert</p></dd>
33032b15cb3dSCy Schubert</dl>
3304052d159aSCy Schubert</dd>
3305052d159aSCy Schubert<dt><code>writevar</code> <kbd>assocID\ name</kbd> <kbd>=</kbd> <kbd>value</kbd> <kbd>[,...]</kbd></dt>
3306052d159aSCy Schubert<dd><p>Write (create or update) the specified variables.
330709100258SXin LIIf the
330809100258SXin LI<code>assocID</code>
330909100258SXin LIis zero, the variablea re from the
331009100258SXin LIsystem variables
331109100258SXin LIname space, otherwise they are from the
331209100258SXin LIpeer variables
331309100258SXin LIname space.
331409100258SXin LIThe
331509100258SXin LI<code>assocID</code>
331609100258SXin LIis required, as the same name can occur in both name spaces.
3317052d159aSCy Schubert</p></dd>
3318052d159aSCy Schubert<dt><code>trap</code> <kbd>host_address</kbd> <code>[<code>port</code> <kbd>port_number</kbd>]</code> <code>[<code>interface</code> <kbd>interface_address</kbd>]</code></dt>
3319052d159aSCy Schubert<dd><p>This command configures a trap receiver at the given host
33202b15cb3dSCy Schubertaddress and port number for sending messages with the specified
33212b15cb3dSCy Schubertlocal interface address.
33222b15cb3dSCy SchubertIf the port number is unspecified, a value
33232b15cb3dSCy Schubertof 18447 is used.
33242b15cb3dSCy SchubertIf the interface address is not specified, the
33252b15cb3dSCy Schubertmessage is sent with a source address of the local interface the
33262b15cb3dSCy Schubertmessage is sent through.
33272b15cb3dSCy SchubertNote that on a multihomed host the
33282b15cb3dSCy Schubertinterface used may vary from time to time with routing changes.
3329052d159aSCy Schubert</p></dd>
3330052d159aSCy Schubert<dt><code>ttl</code> <kbd>hop</kbd> <kbd>...</kbd></dt>
3331052d159aSCy Schubert<dd><p>This command specifies a list of TTL values in increasing order.
333209100258SXin LIUp to 8 values can be specified.
333309100258SXin LIIn
333409100258SXin LI<code>manycast</code>
333509100258SXin LImode these values are used in-turn in an expanding-ring search.
333609100258SXin LIThe default is eight multiples of 32 starting at 31.
3337052d159aSCy Schubert</p>
33382b15cb3dSCy Schubert<p>The trap receiver will generally log event messages and other
33392b15cb3dSCy Schubertinformation from the server in a log file.
33402b15cb3dSCy SchubertWhile such monitor
33412b15cb3dSCy Schubertprograms may also request their own trap dynamically, configuring a
33422b15cb3dSCy Schuberttrap receiver will ensure that no messages are lost when the server
33432b15cb3dSCy Schubertis started.
3344052d159aSCy Schubert</p></dd>
3345052d159aSCy Schubert<dt><code>hop</code> <kbd>...</kbd></dt>
3346052d159aSCy Schubert<dd><p>This command specifies a list of TTL values in increasing order, up to 8
33472b15cb3dSCy Schubertvalues can be specified.
33482b15cb3dSCy SchubertIn manycast mode these values are used in turn in
33492b15cb3dSCy Schubertan expanding-ring search.
33502b15cb3dSCy SchubertThe default is eight multiples of 32 starting at
33512b15cb3dSCy Schubert31.
3352052d159aSCy Schubert</p></dd>
33532b15cb3dSCy Schubert</dl>
33542b15cb3dSCy Schubert
33552b15cb3dSCy Schubert<p>This section was generated by <strong>AutoGen</strong>,
33562b15cb3dSCy Schubertusing the <code>agtexi-cmd</code> template and the option descriptions for the <code>ntp.conf</code> program.
33572b15cb3dSCy SchubertThis software is released under the NTP license, &lt;http://ntp.org/license&gt;.
3358052d159aSCy Schubert</p>
3359052d159aSCy Schubert<table class="menu" border="0" cellspacing="0">
3360052d159aSCy Schubert<tr><td align="left" valign="top">&bull; <a href="#ntp_002econf-Files" accesskey="1">ntp.conf Files</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Files
3361052d159aSCy Schubert</td></tr>
3362052d159aSCy Schubert<tr><td align="left" valign="top">&bull; <a href="#ntp_002econf-See-Also" accesskey="2">ntp.conf See Also</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">See Also
3363052d159aSCy Schubert</td></tr>
3364052d159aSCy Schubert<tr><td align="left" valign="top">&bull; <a href="#ntp_002econf-Bugs" accesskey="3">ntp.conf Bugs</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Bugs
3365052d159aSCy Schubert</td></tr>
3366052d159aSCy Schubert<tr><td align="left" valign="top">&bull; <a href="#ntp_002econf-Notes" accesskey="4">ntp.conf Notes</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Notes
3367052d159aSCy Schubert</td></tr>
3368052d159aSCy Schubert</table>
33692b15cb3dSCy Schubert
3370052d159aSCy Schubert<hr>
33712b15cb3dSCy Schubert<a name="ntp_002econf-Files"></a>
3372052d159aSCy Schubert<div class="header">
3373052d159aSCy Schubert<p>
3374052d159aSCy SchubertNext: <a href="#ntp_002econf-See-Also" accesskey="n" rel="next">ntp.conf See Also</a>, Previous: <a href="#Miscellaneous-Options" accesskey="p" rel="prev">Miscellaneous Options</a>, Up: <a href="#ntp_002econf-Notes" accesskey="u" rel="up">ntp.conf Notes</a> &nbsp; </p>
33752b15cb3dSCy Schubert</div>
3376052d159aSCy Schubert<a name="ntp_002econf-Files-1"></a>
3377052d159aSCy Schubert<h4 class="subsection">1.1.8 ntp.conf Files</h4>
3378052d159aSCy Schubert<dl compact="compact">
3379052d159aSCy Schubert<dt><samp>/etc/ntp.conf</samp></dt>
3380052d159aSCy Schubert<dd><p>the default name of the configuration file
3381052d159aSCy Schubert</p></dd>
3382052d159aSCy Schubert<dt><samp>ntp.keys</samp></dt>
3383052d159aSCy Schubert<dd><p>private MD5 keys
3384052d159aSCy Schubert</p></dd>
3385052d159aSCy Schubert<dt><samp>ntpkey</samp></dt>
3386052d159aSCy Schubert<dd><p>RSA private key
3387052d159aSCy Schubert</p></dd>
3388052d159aSCy Schubert<dt><samp>ntpkey_</samp><kbd>host</kbd></dt>
3389052d159aSCy Schubert<dd><p>RSA public key
3390052d159aSCy Schubert</p></dd>
3391052d159aSCy Schubert<dt><samp>ntp_dh</samp></dt>
3392052d159aSCy Schubert<dd><p>Diffie-Hellman agreement parameters
3393052d159aSCy Schubert</p></dd>
33942b15cb3dSCy Schubert</dl>
3395052d159aSCy Schubert<hr>
33962b15cb3dSCy Schubert<a name="ntp_002econf-See-Also"></a>
3397052d159aSCy Schubert<div class="header">
3398052d159aSCy Schubert<p>
3399052d159aSCy SchubertNext: <a href="#ntp_002econf-Bugs" accesskey="n" rel="next">ntp.conf Bugs</a>, Previous: <a href="#ntp_002econf-Files" accesskey="p" rel="prev">ntp.conf Files</a>, Up: <a href="#ntp_002econf-Notes" accesskey="u" rel="up">ntp.conf Notes</a> &nbsp; </p>
34002b15cb3dSCy Schubert</div>
3401052d159aSCy Schubert<a name="ntp_002econf-See-Also-1"></a>
3402052d159aSCy Schubert<h4 class="subsection">1.1.9 ntp.conf See Also</h4>
34032b15cb3dSCy Schubert<p><code>ntpd(1ntpdmdoc)</code>,
34042b15cb3dSCy Schubert<code>ntpdc(1ntpdcmdoc)</code>,
34052b15cb3dSCy Schubert<code>ntpq(1ntpqmdoc)</code>
3406052d159aSCy Schubert</p>
34072b15cb3dSCy Schubert<p>In addition to the manual pages provided,
34082b15cb3dSCy Schubertcomprehensive documentation is available on the world wide web
34092b15cb3dSCy Schubertat
34102b15cb3dSCy Schubert<code>http://www.ntp.org/</code>.
34112b15cb3dSCy SchubertA snapshot of this documentation is available in HTML format in
3412052d159aSCy Schubert<samp>/usr/share/doc/ntp</samp>.
34132b15cb3dSCy Schubert<br>
3414052d159aSCy Schubert</p>
3415052d159aSCy Schubert<br>
3416052d159aSCy Schubert<p>David L. Mills, <em>Network Time Protocol (Version 4)</em>, RFC5905
3417052d159aSCy Schubert</p><hr>
34182b15cb3dSCy Schubert<a name="ntp_002econf-Bugs"></a>
3419052d159aSCy Schubert<div class="header">
3420052d159aSCy Schubert<p>
3421052d159aSCy SchubertPrevious: <a href="#ntp_002econf-See-Also" accesskey="p" rel="prev">ntp.conf See Also</a>, Up: <a href="#ntp_002econf-Notes" accesskey="u" rel="up">ntp.conf Notes</a> &nbsp; </p>
34222b15cb3dSCy Schubert</div>
3423052d159aSCy Schubert<a name="ntp_002econf-Bugs-1"></a>
3424052d159aSCy Schubert<h4 class="subsection">1.1.10 ntp.conf Bugs</h4>
34252b15cb3dSCy Schubert<p>The syntax checking is not picky; some combinations of
34262b15cb3dSCy Schubertridiculous and even hilarious options and modes may not be
34272b15cb3dSCy Schubertdetected.
3428052d159aSCy Schubert</p>
34292b15cb3dSCy Schubert<p>The
3430052d159aSCy Schubert<samp>ntpkey_</samp><kbd>host</kbd>
34312b15cb3dSCy Schubertfiles are really digital
34322b15cb3dSCy Schubertcertificates.
34332b15cb3dSCy SchubertThese should be obtained via secure directory
34342b15cb3dSCy Schubertservices when they become universally available.
3435052d159aSCy Schubert</p><hr>
3436052d159aSCy Schubert<div class="header">
3437052d159aSCy Schubert<p>
3438052d159aSCy Schubert &nbsp; </p>
34392b15cb3dSCy Schubert</div>
3440052d159aSCy Schubert<a name="ntp_002econf-Notes-1"></a>
3441052d159aSCy Schubert<h4 class="subsection">1.1.11 ntp.conf Notes</h4>
34422b15cb3dSCy Schubert<p>This document was derived from FreeBSD.
3443052d159aSCy Schubert</p><hr>
34442b15cb3dSCy Schubert
34452b15cb3dSCy Schubert
3446052d159aSCy Schubert
3447052d159aSCy Schubert</body>
3448052d159aSCy Schubert</html>
3449