xref: /freebsd/contrib/ntp/ntpd/ntp.conf.html (revision f5f40dd63bc7acbb5312b26ac1ea1103c12352a6)
1052d159aSCy Schubert<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
2052d159aSCy Schubert<html>
3a466cc55SCy Schubert<!-- Created by GNU Texinfo 6.6, 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 Schubertdiv.display {margin-left: 3.2em}
20052d159aSCy Schubertdiv.example {margin-left: 3.2em}
21052d159aSCy Schubertdiv.lisp {margin-left: 3.2em}
22052d159aSCy Schubertkbd {font-style: oblique}
232b15cb3dSCy Schubertpre.display {font-family: inherit}
242b15cb3dSCy Schubertpre.format {font-family: inherit}
25052d159aSCy Schubertpre.menu-comment {font-family: serif}
26052d159aSCy Schubertpre.menu-preformatted {font-family: serif}
27052d159aSCy Schubertspan.nolinebreak {white-space: nowrap}
28052d159aSCy Schubertspan.roman {font-family: initial; font-weight: normal}
29052d159aSCy Schubertspan.sansserif {font-family: sans-serif; font-weight: normal}
30052d159aSCy Schubertul.no-bullet {list-style: none}
31052d159aSCy Schubert-->
32052d159aSCy Schubert</style>
33052d159aSCy Schubert
34052d159aSCy Schubert
352b15cb3dSCy Schubert</head>
36052d159aSCy Schubert
37052d159aSCy Schubert<body lang="en">
38052d159aSCy Schubert<h1 class="settitle" align="center">NTP Configuration File User&rsquo;s Manual</h1>
39052d159aSCy Schubert
40052d159aSCy Schubert
41052d159aSCy Schubert
42052d159aSCy Schubert
43052d159aSCy Schubert
44a466cc55SCy Schubert<span id="Top"></span><div class="header">
45052d159aSCy Schubert<p>
46052d159aSCy 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>
472b15cb3dSCy Schubert</div>
48a466cc55SCy Schubert<span id="NTP_0027s-Configuration-File-User-Manual"></span><h1 class="top">NTP&rsquo;s Configuration File User Manual</h1>
492b15cb3dSCy Schubert
50052d159aSCy Schubert<p>This document describes the configuration file for the NTP Project&rsquo;s
512b15cb3dSCy Schubert<code>ntpd</code> program.
52052d159aSCy Schubert</p>
53*f5f40dd6SCy Schubert<p>This document applies to version 4.2.8p18 of <code>ntp.conf</code>.
54052d159aSCy Schubert</p>
55a466cc55SCy Schubert<span id="SEC_Overview"></span>
56052d159aSCy Schubert<h2 class="shortcontents-heading">Short Table of Contents</h2>
572b15cb3dSCy Schubert
582b15cb3dSCy Schubert<div class="shortcontents">
59052d159aSCy Schubert<ul class="no-bullet">
60a466cc55SCy Schubert<li><a id="stoc-Description" href="#toc-Description">1 Description</a></li>
612b15cb3dSCy Schubert</ul>
622b15cb3dSCy Schubert</div>
632b15cb3dSCy Schubert
642b15cb3dSCy Schubert
65052d159aSCy Schubert<table class="menu" border="0" cellspacing="0">
66a466cc55SCy 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">
67052d159aSCy Schubert</td></tr>
68a466cc55SCy 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">
69052d159aSCy Schubert</td></tr>
70052d159aSCy Schubert</table>
71052d159aSCy Schubert
72052d159aSCy Schubert<hr>
73a466cc55SCy Schubert<span id="ntp_002econf-Description"></span><div class="header">
74052d159aSCy Schubert<p>
75052d159aSCy SchubertPrevious: <a href="#Top" accesskey="p" rel="prev">Top</a>, Up: <a href="#Top" accesskey="u" rel="up">Top</a> &nbsp; </p>
762b15cb3dSCy Schubert</div>
77a466cc55SCy Schubert<span id="Description"></span><h2 class="chapter">1 Description</h2>
782b15cb3dSCy Schubert
792b15cb3dSCy Schubert<p>The behavior of  <code>ntpd</code> can be changed by a configuration file,
802b15cb3dSCy Schubertby default <code>ntp.conf</code>.
81052d159aSCy Schubert</p>
82052d159aSCy Schubert<table class="menu" border="0" cellspacing="0">
83a466cc55SCy Schubert<tr><td align="left" valign="top">&bull; <a href="#ntp_002econf-Notes" accesskey="1">Notes about ntp.conf</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
84052d159aSCy Schubert</td></tr>
85052d159aSCy Schubert</table>
862b15cb3dSCy Schubert
87052d159aSCy Schubert<hr>
88a466cc55SCy Schubert<span id="ntp_002econf-Notes"></span><div class="header">
89052d159aSCy Schubert<p>
90052d159aSCy 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>
912b15cb3dSCy Schubert</div>
92a466cc55SCy Schubert<span id="Notes-about-ntp_002econf"></span><h3 class="section">1.1 Notes about ntp.conf</h3>
93a466cc55SCy Schubert<span id="index-ntp_002econf"></span>
94a466cc55SCy Schubert<span id="index-Network-Time-Protocol-_0028NTP_0029-daemon-configuration-file-format"></span>
952b15cb3dSCy Schubert
962b15cb3dSCy Schubert
972b15cb3dSCy Schubert
982b15cb3dSCy Schubert<p>The
992b15cb3dSCy Schubert<code>ntp.conf</code>
1002b15cb3dSCy Schubertconfiguration file is read at initial startup by the
1012b15cb3dSCy Schubert<code>ntpd(1ntpdmdoc)</code>
1022b15cb3dSCy Schubertdaemon in order to specify the synchronization sources,
1032b15cb3dSCy Schubertmodes and other related information.
1042b15cb3dSCy SchubertUsually, it is installed in the
105052d159aSCy Schubert<samp>/etc</samp>
1062b15cb3dSCy Schubertdirectory,
1072b15cb3dSCy Schubertbut could be installed elsewhere
108052d159aSCy Schubert(see the daemon&rsquo;s
1092b15cb3dSCy Schubert<code>-c</code>
1102b15cb3dSCy Schubertcommand line option).
111052d159aSCy Schubert</p>
1122b15cb3dSCy Schubert<p>The file format is similar to other
113052d159aSCy Schubert<small>UNIX</small>
1142b15cb3dSCy Schubertconfiguration files.
1152b15cb3dSCy SchubertComments begin with a
116052d159aSCy Schubert&lsquo;#&rsquo;
1172b15cb3dSCy Schubertcharacter and extend to the end of the line;
1182b15cb3dSCy Schubertblank lines are ignored.
1192b15cb3dSCy SchubertConfiguration commands consist of an initial keyword
1202b15cb3dSCy Schubertfollowed by a list of arguments,
1212b15cb3dSCy Schubertsome of which may be optional, separated by whitespace.
1222b15cb3dSCy SchubertCommands may not be continued over multiple lines.
1232b15cb3dSCy SchubertArguments may be host names,
1242b15cb3dSCy Schuberthost addresses written in numeric, dotted-quad form,
1252b15cb3dSCy Schubertintegers, floating point numbers (when specifying times in seconds)
1262b15cb3dSCy Schubertand text strings.
127052d159aSCy Schubert</p>
1282b15cb3dSCy Schubert<p>The rest of this page describes the configuration and control options.
1292b15cb3dSCy SchubertThe
130052d159aSCy Schubert&quot;Notes on Configuring NTP and Setting up an NTP Subnet&quot;
1312b15cb3dSCy Schubertpage
1322b15cb3dSCy Schubert(available as part of the HTML documentation
1332b15cb3dSCy Schubertprovided in
134052d159aSCy Schubert<samp>/usr/share/doc/ntp</samp>)
1352b15cb3dSCy Schubertcontains an extended discussion of these options.
1362b15cb3dSCy SchubertIn addition to the discussion of general
137052d159aSCy Schubert&lsquo;Configuration Options&rsquo;,
1382b15cb3dSCy Schubertthere are sections describing the following supported functionality
1392b15cb3dSCy Schubertand the options used to control it:
140052d159aSCy Schubert</p><ul>
1412b15cb3dSCy Schubert<li> <a href="#Authentication-Support">Authentication Support</a>
142052d159aSCy Schubert</li><li> <a href="#Monitoring-Support">Monitoring Support</a>
143052d159aSCy Schubert</li><li> <a href="#Access-Control-Support">Access Control Support</a>
144052d159aSCy Schubert</li><li> <a href="#Automatic-NTP-Configuration-Options">Automatic NTP Configuration Options</a>
145052d159aSCy Schubert</li><li> <a href="#Reference-Clock-Support">Reference Clock Support</a>
146052d159aSCy Schubert</li><li> <a href="#Miscellaneous-Options">Miscellaneous Options</a>
147052d159aSCy Schubert</li></ul>
1482b15cb3dSCy Schubert
1492b15cb3dSCy Schubert<p>Following these is a section describing
1502b15cb3dSCy Schubert<a href="#Miscellaneous-Options">Miscellaneous Options</a>.
1512b15cb3dSCy SchubertWhile there is a rich set of options available,
1522b15cb3dSCy Schubertthe only required option is one or more
1532b15cb3dSCy Schubert<code>pool</code>,
1542b15cb3dSCy Schubert<code>server</code>,
1552b15cb3dSCy Schubert<code>peer</code>,
1562b15cb3dSCy Schubert<code>broadcast</code>
1572b15cb3dSCy Schubertor
1582b15cb3dSCy Schubert<code>manycastclient</code>
1592b15cb3dSCy Schubertcommands.
160052d159aSCy Schubert</p><table class="menu" border="0" cellspacing="0">
161a466cc55SCy 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">
162052d159aSCy Schubert</td></tr>
163a466cc55SCy 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">
164052d159aSCy Schubert</td></tr>
165a466cc55SCy 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">
166052d159aSCy Schubert</td></tr>
167a466cc55SCy 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">
168052d159aSCy Schubert</td></tr>
169a466cc55SCy 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">
170052d159aSCy Schubert</td></tr>
171a466cc55SCy 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">
172052d159aSCy Schubert</td></tr>
173a466cc55SCy 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">
174052d159aSCy Schubert</td></tr>
175a466cc55SCy 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">
176052d159aSCy Schubert</td></tr>
177a466cc55SCy 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">
178052d159aSCy Schubert</td></tr>
179a466cc55SCy 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">
180052d159aSCy Schubert</td></tr>
181a466cc55SCy Schubert<tr><td align="left" valign="top">&bull; ntp.conf Notes</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
182052d159aSCy Schubert</td></tr>
183052d159aSCy Schubert</table>
184052d159aSCy Schubert
185052d159aSCy Schubert<hr>
186a466cc55SCy Schubert<span id="Configuration-Support"></span><div class="header">
187052d159aSCy Schubert<p>
188052d159aSCy 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>
1892b15cb3dSCy Schubert</div>
190a466cc55SCy Schubert<span id="Configuration-Support-1"></span><h4 class="subsection">1.1.1 Configuration Support</h4>
1912b15cb3dSCy Schubert<p>Following is a description of the configuration commands in
1922b15cb3dSCy SchubertNTPv4.
1932b15cb3dSCy SchubertThese commands have the same basic functions as in NTPv3 and
1942b15cb3dSCy Schubertin some cases new functions and new arguments.
1952b15cb3dSCy SchubertThere are two
1962b15cb3dSCy Schubertclasses of commands, configuration commands that configure a
1972b15cb3dSCy Schubertpersistent association with a remote server or peer or reference
1982b15cb3dSCy Schubertclock, and auxiliary commands that specify environmental variables
1992b15cb3dSCy Schubertthat control various related operations.
200a466cc55SCy Schubert</p><span id="Configuration-Commands"></span><h4 class="subsubsection">1.1.1.1 Configuration Commands</h4>
2012b15cb3dSCy Schubert<p>The various modes are determined by the command keyword and the
2022b15cb3dSCy Schuberttype of the required IP address.
2032b15cb3dSCy SchubertAddresses are classed by type as
2042b15cb3dSCy Schubert(s) a remote server or peer (IPv4 class A, B and C), (b) the
2052b15cb3dSCy Schubertbroadcast address of a local interface, (m) a multicast address (IPv4
2062b15cb3dSCy Schubertclass D), or (r) a reference clock address (127.127.x.x).
2072b15cb3dSCy SchubertNote that
2082b15cb3dSCy Schubertonly those options applicable to each command are listed below.
2092b15cb3dSCy SchubertUse
2102b15cb3dSCy Schubertof options not listed may not be caught as an error, but may result
2112b15cb3dSCy Schubertin some weird and even destructive behavior.
212052d159aSCy Schubert</p>
2132b15cb3dSCy Schubert<p>If the Basic Socket Interface Extensions for IPv6 (RFC-2553)
2142b15cb3dSCy Schubertis detected, support for the IPv6 address family is generated
2152b15cb3dSCy Schubertin addition to the default support of the IPv4 address family.
216e27abb66SXin LIIn a few cases, including the
217e27abb66SXin LI<code>reslist</code>
218e27abb66SXin LIbillboard generated
219e27abb66SXin LIby
220e27abb66SXin LI<code>ntpq(1ntpqmdoc)</code>
221e27abb66SXin LIor
222e27abb66SXin LI<code>ntpdc(1ntpdcmdoc)</code>,
223e27abb66SXin LIIPv6 addresses are automatically generated.
2242b15cb3dSCy SchubertIPv6 addresses can be identified by the presence of colons
225052d159aSCy Schubert&ldquo;:&rdquo;
2262b15cb3dSCy Schubertin the address field.
2272b15cb3dSCy SchubertIPv6 addresses can be used almost everywhere where
2282b15cb3dSCy SchubertIPv4 addresses can be used,
2292b15cb3dSCy Schubertwith the exception of reference clock addresses,
2302b15cb3dSCy Schubertwhich are always IPv4.
231052d159aSCy Schubert</p>
2322b15cb3dSCy Schubert<p>Note that in contexts where a host name is expected, a
2332b15cb3dSCy Schubert<code>-4</code>
2342b15cb3dSCy Schubertqualifier preceding
2352b15cb3dSCy Schubertthe host name forces DNS resolution to the IPv4 namespace,
2362b15cb3dSCy Schubertwhile a
2372b15cb3dSCy Schubert<code>-6</code>
2382b15cb3dSCy Schubertqualifier forces DNS resolution to the IPv6 namespace.
2392b15cb3dSCy SchubertSee IPv6 references for the
2402b15cb3dSCy Schubertequivalent classes for that address family.
241052d159aSCy Schubert</p><dl compact="compact">
2422d4e511cSCy 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>
2432d4e511cSCy 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>
244052d159aSCy 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>
245052d159aSCy 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>
246052d159aSCy 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>
247052d159aSCy Schubert</dl>
2482b15cb3dSCy Schubert
2492b15cb3dSCy Schubert<p>These five commands specify the time server name or address to
2502b15cb3dSCy Schubertbe used and the mode in which to operate.
2512b15cb3dSCy SchubertThe
2522b15cb3dSCy Schubert<kbd>address</kbd>
2532b15cb3dSCy Schubertcan be
2542b15cb3dSCy Schuberteither a DNS name or an IP address in dotted-quad notation.
2552b15cb3dSCy SchubertAdditional information on association behavior can be found in the
256052d159aSCy Schubert&quot;Association Management&quot;
2572b15cb3dSCy Schubertpage
2582b15cb3dSCy Schubert(available as part of the HTML documentation
2592b15cb3dSCy Schubertprovided in
260052d159aSCy Schubert<samp>/usr/share/doc/ntp</samp>).
261052d159aSCy Schubert</p><dl compact="compact">
262052d159aSCy Schubert<dt><code>pool</code></dt>
263052d159aSCy Schubert<dd><p>For type s addresses, this command mobilizes a persistent
2642b15cb3dSCy Schubertclient mode association with a number of remote servers.
2652b15cb3dSCy SchubertIn this mode the local clock can synchronized to the
2662b15cb3dSCy Schubertremote server, but the remote server can never be synchronized to
2672b15cb3dSCy Schubertthe local clock.
268052d159aSCy Schubert</p></dd>
269052d159aSCy Schubert<dt><code>server</code></dt>
270052d159aSCy Schubert<dd><p>For type s and r addresses, this command mobilizes a persistent
2712b15cb3dSCy Schubertclient mode association with the specified remote server or local
2722b15cb3dSCy Schubertradio clock.
2732b15cb3dSCy SchubertIn this mode the local clock can synchronized to the
2742b15cb3dSCy Schubertremote server, but the remote server can never be synchronized to
2752b15cb3dSCy Schubertthe local clock.
2762b15cb3dSCy SchubertThis command should
2772b15cb3dSCy Schubert<em>not</em>
2782b15cb3dSCy Schubertbe used for type
2792b15cb3dSCy Schubertb or m addresses.
280052d159aSCy Schubert</p></dd>
281052d159aSCy Schubert<dt><code>peer</code></dt>
282052d159aSCy Schubert<dd><p>For type s addresses (only), this command mobilizes a
2832b15cb3dSCy Schubertpersistent symmetric-active mode association with the specified
2842b15cb3dSCy Schubertremote peer.
2852b15cb3dSCy SchubertIn this mode the local clock can be synchronized to
2862b15cb3dSCy Schubertthe remote peer or the remote peer can be synchronized to the local
2872b15cb3dSCy Schubertclock.
2882b15cb3dSCy SchubertThis is useful in a network of servers where, depending on
2892b15cb3dSCy Schubertvarious failure scenarios, either the local or remote peer may be
2902b15cb3dSCy Schubertthe better source of time.
2912b15cb3dSCy SchubertThis command should NOT be used for type
2922b15cb3dSCy Schubertb, m or r addresses.
293052d159aSCy Schubert</p></dd>
294052d159aSCy Schubert<dt><code>broadcast</code></dt>
295052d159aSCy Schubert<dd><p>For type b and m addresses (only), this
2962b15cb3dSCy Schubertcommand mobilizes a persistent broadcast mode association.
2972b15cb3dSCy SchubertMultiple
2982b15cb3dSCy Schubertcommands can be used to specify multiple local broadcast interfaces
2992b15cb3dSCy Schubert(subnets) and/or multiple multicast groups.
3002b15cb3dSCy SchubertNote that local
3012b15cb3dSCy Schubertbroadcast messages go only to the interface associated with the
3022b15cb3dSCy Schubertsubnet specified, but multicast messages go to all interfaces.
3032b15cb3dSCy SchubertIn broadcast mode the local server sends periodic broadcast
3042b15cb3dSCy Schubertmessages to a client population at the
3052b15cb3dSCy Schubert<kbd>address</kbd>
3062b15cb3dSCy Schubertspecified, which is usually the broadcast address on (one of) the
3072b15cb3dSCy Schubertlocal network(s) or a multicast address assigned to NTP.
3082b15cb3dSCy SchubertThe IANA
3092b15cb3dSCy Schuberthas assigned the multicast group address IPv4 224.0.1.1 and
3102b15cb3dSCy SchubertIPv6 ff05::101 (site local) exclusively to
3112b15cb3dSCy SchubertNTP, but other nonconflicting addresses can be used to contain the
3122b15cb3dSCy Schubertmessages within administrative boundaries.
3132b15cb3dSCy SchubertOrdinarily, this
3142b15cb3dSCy Schubertspecification applies only to the local server operating as a
3152b15cb3dSCy Schubertsender; for operation as a broadcast client, see the
3162b15cb3dSCy Schubert<code>broadcastclient</code>
3172b15cb3dSCy Schubertor
3182b15cb3dSCy Schubert<code>multicastclient</code>
3192b15cb3dSCy Schubertcommands
3202b15cb3dSCy Schubertbelow.
321052d159aSCy Schubert</p></dd>
322052d159aSCy Schubert<dt><code>manycastclient</code></dt>
323052d159aSCy Schubert<dd><p>For type m addresses (only), this command mobilizes a
3242b15cb3dSCy Schubertmanycast client mode association for the multicast address
3252b15cb3dSCy Schubertspecified.
3262b15cb3dSCy SchubertIn this case a specific address must be supplied which
3272b15cb3dSCy Schubertmatches the address used on the
3282b15cb3dSCy Schubert<code>manycastserver</code>
3292b15cb3dSCy Schubertcommand for
3302b15cb3dSCy Schubertthe designated manycast servers.
3312b15cb3dSCy SchubertThe NTP multicast address
3322b15cb3dSCy Schubert224.0.1.1 assigned by the IANA should NOT be used, unless specific
3332b15cb3dSCy Schubertmeans are taken to avoid spraying large areas of the Internet with
3342b15cb3dSCy Schubertthese messages and causing a possibly massive implosion of replies
3352b15cb3dSCy Schubertat the sender.
3362b15cb3dSCy SchubertThe
3372b15cb3dSCy Schubert<code>manycastserver</code>
3382b15cb3dSCy Schubertcommand specifies that the local server
3392b15cb3dSCy Schubertis to operate in client mode with the remote servers that are
3402b15cb3dSCy Schubertdiscovered as the result of broadcast/multicast messages.
3412b15cb3dSCy SchubertThe
3422b15cb3dSCy Schubertclient broadcasts a request message to the group address associated
3432b15cb3dSCy Schubertwith the specified
3442b15cb3dSCy Schubert<kbd>address</kbd>
3452b15cb3dSCy Schubertand specifically enabled
3462b15cb3dSCy Schubertservers respond to these messages.
3472b15cb3dSCy SchubertThe client selects the servers
3482b15cb3dSCy Schubertproviding the best time and continues as with the
3492b15cb3dSCy Schubert<code>server</code>
3502b15cb3dSCy Schubertcommand.
3512b15cb3dSCy SchubertThe remaining servers are discarded as if never
3522b15cb3dSCy Schubertheard.
353052d159aSCy Schubert</p></dd>
3542b15cb3dSCy Schubert</dl>
3552b15cb3dSCy Schubert
3562b15cb3dSCy Schubert<p>Options:
357052d159aSCy Schubert</p><dl compact="compact">
358052d159aSCy Schubert<dt><code>autokey</code></dt>
359052d159aSCy Schubert<dd><p>All packets sent to and received from the server or peer are to
3602b15cb3dSCy Schubertinclude authentication fields encrypted using the autokey scheme
3612b15cb3dSCy Schubertdescribed in
362052d159aSCy Schubert&lsquo;Authentication Options&rsquo;.
363052d159aSCy Schubert</p></dd>
364052d159aSCy Schubert<dt><code>burst</code></dt>
365*f5f40dd6SCy Schubert<dd><p>when the server is reachable, send a burst of six packets
366*f5f40dd6SCy Schubertinstead of the usual one. The packet spacing is 2 s.
367*f5f40dd6SCy SchubertThis is designed to improve timekeeping quality with the
3682b15cb3dSCy Schubert<code>server</code>
3692b15cb3dSCy Schubertcommand and s addresses.
370052d159aSCy Schubert</p></dd>
371052d159aSCy Schubert<dt><code>iburst</code></dt>
372052d159aSCy Schubert<dd><p>When the server is unreachable, send a burst of eight packets
3732b15cb3dSCy Schubertinstead of the usual one.
374*f5f40dd6SCy SchubertThe packet spacing is 2 s.
3752b15cb3dSCy SchubertThis is designed to speed the initial synchronization
3762b15cb3dSCy Schubertacquisition with the
3772b15cb3dSCy Schubert<code>server</code>
3782b15cb3dSCy Schubertcommand and s addresses and when
3792b15cb3dSCy Schubert<code>ntpd(1ntpdmdoc)</code>
3802b15cb3dSCy Schubertis started with the
3812b15cb3dSCy Schubert<code>-q</code>
3822b15cb3dSCy Schubertoption.
383052d159aSCy Schubert</p></dd>
384052d159aSCy Schubert<dt><code>key</code> <kbd>key</kbd></dt>
385052d159aSCy Schubert<dd><p>All packets sent to and received from the server or peer are to
3862b15cb3dSCy Schubertinclude authentication fields encrypted using the specified
3872b15cb3dSCy Schubert<kbd>key</kbd>
3884e1ef62aSXin LIidentifier with values from 1 to 65535, inclusive.
3892b15cb3dSCy SchubertThe
3902b15cb3dSCy Schubertdefault is to include no encryption field.
391052d159aSCy Schubert</p></dd>
392052d159aSCy Schubert<dt><code>minpoll</code> <kbd>minpoll</kbd></dt>
393052d159aSCy Schubert<dt><code>maxpoll</code> <kbd>maxpoll</kbd></dt>
394052d159aSCy Schubert<dd><p>These options specify the minimum and maximum poll intervals
3952b15cb3dSCy Schubertfor NTP messages, as a power of 2 in seconds
3962b15cb3dSCy SchubertThe maximum poll
3972b15cb3dSCy Schubertinterval defaults to 10 (1,024 s), but can be increased by the
3982b15cb3dSCy Schubert<code>maxpoll</code>
3992b15cb3dSCy Schubertoption to an upper limit of 17 (36.4 h).
4002b15cb3dSCy SchubertThe
4012b15cb3dSCy Schubertminimum poll interval defaults to 6 (64 s), but can be decreased by
4022b15cb3dSCy Schubertthe
4032b15cb3dSCy Schubert<code>minpoll</code>
4042b15cb3dSCy Schubertoption to a lower limit of 4 (16 s).
405052d159aSCy Schubert</p></dd>
406052d159aSCy Schubert<dt><code>noselect</code></dt>
407052d159aSCy Schubert<dd><p>Marks the server as unused, except for display purposes.
4082b15cb3dSCy SchubertThe server is discarded by the selection algroithm.
409052d159aSCy Schubert</p></dd>
410052d159aSCy Schubert<dt><code>preempt</code></dt>
411052d159aSCy Schubert<dd><p>Says the association can be preempted.
412052d159aSCy Schubert</p></dd>
413052d159aSCy Schubert<dt><code>prefer</code></dt>
414052d159aSCy Schubert<dd><p>Marks the server as preferred.
4152b15cb3dSCy SchubertAll other things being equal,
4162b15cb3dSCy Schubertthis host will be chosen for synchronization among a set of
4172b15cb3dSCy Schubertcorrectly operating hosts.
4182b15cb3dSCy SchubertSee the
419052d159aSCy Schubert&quot;Mitigation Rules and the prefer Keyword&quot;
4202b15cb3dSCy Schubertpage
4212b15cb3dSCy Schubert(available as part of the HTML documentation
4222b15cb3dSCy Schubertprovided in
423052d159aSCy Schubert<samp>/usr/share/doc/ntp</samp>)
4242b15cb3dSCy Schubertfor further information.
425052d159aSCy Schubert</p></dd>
426052d159aSCy Schubert<dt><code>true</code></dt>
4272d4e511cSCy Schubert<dd><p>Marks the server as a truechimer,
4282d4e511cSCy Schubertforcing the association to always survive the selection and clustering algorithms.
429e27abb66SXin LIThis option should almost certainly
430e27abb66SXin LI<em>only</em>
431e27abb66SXin LIbe used while testing an association.
432052d159aSCy Schubert</p></dd>
433052d159aSCy Schubert<dt><code>ttl</code> <kbd>ttl</kbd></dt>
434052d159aSCy Schubert<dd><p>This option is used only with broadcast server and manycast
4352b15cb3dSCy Schubertclient modes.
4362b15cb3dSCy SchubertIt specifies the time-to-live
4372b15cb3dSCy Schubert<kbd>ttl</kbd>
4382b15cb3dSCy Schubertto
4392b15cb3dSCy Schubertuse on broadcast server and multicast server and the maximum
4402b15cb3dSCy Schubert<kbd>ttl</kbd>
4412b15cb3dSCy Schubertfor the expanding ring search with manycast
4422b15cb3dSCy Schubertclient packets.
4432b15cb3dSCy SchubertSelection of the proper value, which defaults to
4442b15cb3dSCy Schubert127, is something of a black art and should be coordinated with the
4452b15cb3dSCy Schubertnetwork administrator.
446052d159aSCy Schubert</p></dd>
447052d159aSCy Schubert<dt><code>version</code> <kbd>version</kbd></dt>
448052d159aSCy Schubert<dd><p>Specifies the version number to be used for outgoing NTP
4492b15cb3dSCy Schubertpackets.
4502b15cb3dSCy SchubertVersions 1-4 are the choices, with version 4 the
4512b15cb3dSCy Schubertdefault.
452052d159aSCy Schubert</p></dd>
453052d159aSCy Schubert<dt><code>xleave</code></dt>
454052d159aSCy Schubert<dd><p>Valid in
4554990d495SXin LI<code>peer</code>
4564990d495SXin LIand
4574990d495SXin LI<code>broadcast</code>
4584990d495SXin LImodes only, this flag enables interleave mode.
459052d159aSCy Schubert</p></dd>
4602d4e511cSCy Schubert<dt><code>xmtnonce</code></dt>
4612d4e511cSCy Schubert<dd><p>Valid only for
4622d4e511cSCy Schubert<code>server</code>
4632d4e511cSCy Schubertand
4642d4e511cSCy Schubert<code>pool</code>
4652d4e511cSCy Schubertmodes, this flag puts a random number in the packet&rsquo;s transmit timestamp.
4662d4e511cSCy Schubert</p>
4672d4e511cSCy Schubert</dd>
4682b15cb3dSCy Schubert</dl>
469a466cc55SCy Schubert<span id="Auxiliary-Commands"></span><h4 class="subsubsection">1.1.1.2 Auxiliary Commands</h4>
470052d159aSCy Schubert<dl compact="compact">
471052d159aSCy Schubert<dt><code>broadcastclient</code></dt>
472052d159aSCy Schubert<dd><p>This command enables reception of broadcast server messages to
4732b15cb3dSCy Schubertany local interface (type b) address.
4742b15cb3dSCy SchubertUpon receiving a message for
4752b15cb3dSCy Schubertthe first time, the broadcast client measures the nominal server
4762b15cb3dSCy Schubertpropagation delay using a brief client/server exchange with the
4772b15cb3dSCy Schubertserver, then enters the broadcast client mode, in which it
4782b15cb3dSCy Schubertsynchronizes to succeeding broadcast messages.
4792b15cb3dSCy SchubertNote that, in order
4802b15cb3dSCy Schubertto avoid accidental or malicious disruption in this mode, both the
4812b15cb3dSCy Schubertserver and client should operate using symmetric-key or public-key
4822b15cb3dSCy Schubertauthentication as described in
483052d159aSCy Schubert&lsquo;Authentication Options&rsquo;.
484052d159aSCy Schubert</p></dd>
485052d159aSCy Schubert<dt><code>manycastserver</code> <kbd>address</kbd> <kbd>...</kbd></dt>
486052d159aSCy Schubert<dd><p>This command enables reception of manycast client messages to
4872b15cb3dSCy Schubertthe multicast group address(es) (type m) specified.
4882b15cb3dSCy SchubertAt least one
4892b15cb3dSCy Schubertaddress is required, but the NTP multicast address 224.0.1.1
4902b15cb3dSCy Schubertassigned by the IANA should NOT be used, unless specific means are
4912b15cb3dSCy Schuberttaken to limit the span of the reply and avoid a possibly massive
4922b15cb3dSCy Schubertimplosion at the original sender.
4932b15cb3dSCy SchubertNote that, in order to avoid
4942b15cb3dSCy Schubertaccidental or malicious disruption in this mode, both the server
4952b15cb3dSCy Schubertand client should operate using symmetric-key or public-key
4962b15cb3dSCy Schubertauthentication as described in
497052d159aSCy Schubert&lsquo;Authentication Options&rsquo;.
498052d159aSCy Schubert</p></dd>
499052d159aSCy Schubert<dt><code>multicastclient</code> <kbd>address</kbd> <kbd>...</kbd></dt>
500052d159aSCy Schubert<dd><p>This command enables reception of multicast server messages to
5012b15cb3dSCy Schubertthe multicast group address(es) (type m) specified.
5022b15cb3dSCy SchubertUpon receiving
5032b15cb3dSCy Schuberta message for the first time, the multicast client measures the
5042b15cb3dSCy Schubertnominal server propagation delay using a brief client/server
5052b15cb3dSCy Schubertexchange with the server, then enters the broadcast client mode, in
5062b15cb3dSCy Schubertwhich it synchronizes to succeeding multicast messages.
5072b15cb3dSCy SchubertNote that,
5082b15cb3dSCy Schubertin order to avoid accidental or malicious disruption in this mode,
5092b15cb3dSCy Schubertboth the server and client should operate using symmetric-key or
5102b15cb3dSCy Schubertpublic-key authentication as described in
511052d159aSCy Schubert&lsquo;Authentication Options&rsquo;.
512052d159aSCy Schubert</p></dd>
513052d159aSCy Schubert<dt><code>mdnstries</code> <kbd>number</kbd></dt>
514052d159aSCy Schubert<dd><p>If we are participating in mDNS,
5152b15cb3dSCy Schubertafter we have synched for the first time
5162b15cb3dSCy Schubertwe attempt to register with the mDNS system.
5172b15cb3dSCy SchubertIf that registration attempt fails,
5182b15cb3dSCy Schubertwe try again at one minute intervals for up to
5192b15cb3dSCy Schubert<code>mdnstries</code>
5202b15cb3dSCy Schuberttimes.
5212b15cb3dSCy SchubertAfter all,
5222b15cb3dSCy Schubert<code>ntpd</code>
5232b15cb3dSCy Schubertmay be starting before mDNS.
5242b15cb3dSCy SchubertThe default value for
5252b15cb3dSCy Schubert<code>mdnstries</code>
5262b15cb3dSCy Schubertis 5.
527052d159aSCy Schubert</p></dd>
5282b15cb3dSCy Schubert</dl>
529052d159aSCy Schubert<hr>
530a466cc55SCy Schubert<span id="Authentication-Support"></span><div class="header">
531052d159aSCy Schubert<p>
532052d159aSCy 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>
5332b15cb3dSCy Schubert</div>
534a466cc55SCy Schubert<span id="Authentication-Support-1"></span><h4 class="subsection">1.1.2 Authentication Support</h4>
5352b15cb3dSCy Schubert<p>Authentication support allows the NTP client to verify that the
5362b15cb3dSCy Schubertserver is in fact known and trusted and not an intruder intending
5372b15cb3dSCy Schubertaccidentally or on purpose to masquerade as that server.
5382b15cb3dSCy SchubertThe NTPv3
5392b15cb3dSCy Schubertspecification RFC-1305 defines a scheme which provides
5402b15cb3dSCy Schubertcryptographic authentication of received NTP packets.
5412b15cb3dSCy SchubertOriginally,
5422b15cb3dSCy Schubertthis was done using the Data Encryption Standard (DES) algorithm
5432b15cb3dSCy Schubertoperating in Cipher Block Chaining (CBC) mode, commonly called
5442b15cb3dSCy SchubertDES-CBC.
5452b15cb3dSCy SchubertSubsequently, this was replaced by the RSA Message Digest
5462b15cb3dSCy Schubert5 (MD5) algorithm using a private key, commonly called keyed-MD5.
5472b15cb3dSCy SchubertEither algorithm computes a message digest, or one-way hash, which
5482b15cb3dSCy Schubertcan be used to verify the server has the correct private key and
5492b15cb3dSCy Schubertkey identifier.
550052d159aSCy Schubert</p>
5512b15cb3dSCy Schubert<p>NTPv4 retains the NTPv3 scheme, properly described as symmetric key
5522b15cb3dSCy Schubertcryptography and, in addition, provides a new Autokey scheme
5532b15cb3dSCy Schubertbased on public key cryptography.
5542b15cb3dSCy SchubertPublic key cryptography is generally considered more secure
5552b15cb3dSCy Schubertthan symmetric key cryptography, since the security is based
5562b15cb3dSCy Schuberton a private value which is generated by each server and
5572b15cb3dSCy Schubertnever revealed.
5582b15cb3dSCy SchubertWith Autokey all key distribution and
5592b15cb3dSCy Schubertmanagement functions involve only public values, which
5602b15cb3dSCy Schubertconsiderably simplifies key distribution and storage.
5612b15cb3dSCy SchubertPublic key management is based on X.509 certificates,
5622b15cb3dSCy Schubertwhich can be provided by commercial services or
5632b15cb3dSCy Schubertproduced by utility programs in the OpenSSL software library
5642b15cb3dSCy Schubertor the NTPv4 distribution.
565052d159aSCy Schubert</p>
5662b15cb3dSCy Schubert<p>While the algorithms for symmetric key cryptography are
5672b15cb3dSCy Schubertincluded in the NTPv4 distribution, public key cryptography
5682b15cb3dSCy Schubertrequires the OpenSSL software library to be installed
5692b15cb3dSCy Schubertbefore building the NTP distribution.
5702b15cb3dSCy SchubertDirections for doing that
5712b15cb3dSCy Schubertare on the Building and Installing the Distribution page.
572052d159aSCy Schubert</p>
5732b15cb3dSCy Schubert<p>Authentication is configured separately for each association
5742b15cb3dSCy Schubertusing the
5752b15cb3dSCy Schubert<code>key</code>
5762b15cb3dSCy Schubertor
5772b15cb3dSCy Schubert<code>autokey</code>
5782b15cb3dSCy Schubertsubcommand on the
5792b15cb3dSCy Schubert<code>peer</code>,
5802b15cb3dSCy Schubert<code>server</code>,
5812b15cb3dSCy Schubert<code>broadcast</code>
5822b15cb3dSCy Schubertand
5832b15cb3dSCy Schubert<code>manycastclient</code>
5842b15cb3dSCy Schubertconfiguration commands as described in
585052d159aSCy Schubert&lsquo;Configuration Options&rsquo;
5862b15cb3dSCy Schubertpage.
5872b15cb3dSCy SchubertThe authentication
5882b15cb3dSCy Schubertoptions described below specify the locations of the key files,
5892b15cb3dSCy Schubertif other than default, which symmetric keys are trusted
5902b15cb3dSCy Schubertand the interval between various operations, if other than default.
591052d159aSCy Schubert</p>
5922b15cb3dSCy Schubert<p>Authentication is always enabled,
5932b15cb3dSCy Schubertalthough ineffective if not configured as
5942b15cb3dSCy Schubertdescribed below.
5952b15cb3dSCy SchubertIf a NTP packet arrives
5962b15cb3dSCy Schubertincluding a message authentication
5972b15cb3dSCy Schubertcode (MAC), it is accepted only if it
5982b15cb3dSCy Schubertpasses all cryptographic checks.
5992b15cb3dSCy SchubertThe
6002b15cb3dSCy Schubertchecks require correct key ID, key value
6012b15cb3dSCy Schubertand message digest.
6022b15cb3dSCy SchubertIf the packet has
6032b15cb3dSCy Schubertbeen modified in any way or replayed
6042b15cb3dSCy Schubertby an intruder, it will fail one or more
6052b15cb3dSCy Schubertof these checks and be discarded.
6062b15cb3dSCy SchubertFurthermore, the Autokey scheme requires a
6072b15cb3dSCy Schubertpreliminary protocol exchange to obtain
6082b15cb3dSCy Schubertthe server certificate, verify its
6092b15cb3dSCy Schubertcredentials and initialize the protocol
610052d159aSCy Schubert</p>
6112b15cb3dSCy Schubert<p>The
6122b15cb3dSCy Schubert<code>auth</code>
6132b15cb3dSCy Schubertflag controls whether new associations or
6142b15cb3dSCy Schubertremote configuration commands require cryptographic authentication.
6152b15cb3dSCy SchubertThis flag can be set or reset by the
6162b15cb3dSCy Schubert<code>enable</code>
6172b15cb3dSCy Schubertand
6182b15cb3dSCy Schubert<code>disable</code>
6192b15cb3dSCy Schubertcommands and also by remote
6202b15cb3dSCy Schubertconfiguration commands sent by a
6212b15cb3dSCy Schubert<code>ntpdc(1ntpdcmdoc)</code>
622e27abb66SXin LIprogram running on
6232b15cb3dSCy Schubertanother machine.
6242b15cb3dSCy SchubertIf this flag is enabled, which is the default
6252b15cb3dSCy Schubertcase, new broadcast client and symmetric passive associations and
6262b15cb3dSCy Schubertremote configuration commands must be cryptographically
6272b15cb3dSCy Schubertauthenticated using either symmetric key or public key cryptography.
6282b15cb3dSCy SchubertIf this
6292b15cb3dSCy Schubertflag is disabled, these operations are effective
6302b15cb3dSCy Schuberteven if not cryptographic
6312b15cb3dSCy Schubertauthenticated.
6322b15cb3dSCy SchubertIt should be understood
6332b15cb3dSCy Schubertthat operating with the
6342b15cb3dSCy Schubert<code>auth</code>
6352b15cb3dSCy Schubertflag disabled invites a significant vulnerability
6362b15cb3dSCy Schubertwhere a rogue hacker can
6372b15cb3dSCy Schubertmasquerade as a falseticker and seriously
6382b15cb3dSCy Schubertdisrupt system timekeeping.
6392b15cb3dSCy SchubertIt is
6402b15cb3dSCy Schubertimportant to note that this flag has no purpose
6412b15cb3dSCy Schubertother than to allow or disallow
6422b15cb3dSCy Schuberta new association in response to new broadcast
6432b15cb3dSCy Schubertand symmetric active messages
6442b15cb3dSCy Schubertand remote configuration commands and, in particular,
6452b15cb3dSCy Schubertthe flag has no effect on
6462b15cb3dSCy Schubertthe authentication process itself.
647052d159aSCy Schubert</p>
6482b15cb3dSCy Schubert<p>An attractive alternative where multicast support is available
6492b15cb3dSCy Schubertis manycast mode, in which clients periodically troll
6502b15cb3dSCy Schubertfor servers as described in the
6512b15cb3dSCy Schubert<a href="#Automatic-NTP-Configuration-Options">Automatic NTP Configuration Options</a>
6522b15cb3dSCy Schubertpage.
6532b15cb3dSCy SchubertEither symmetric key or public key
6542b15cb3dSCy Schubertcryptographic authentication can be used in this mode.
6552b15cb3dSCy SchubertThe principle advantage
6562b15cb3dSCy Schubertof manycast mode is that potential servers need not be
6572b15cb3dSCy Schubertconfigured in advance,
6582b15cb3dSCy Schubertsince the client finds them during regular operation,
6592b15cb3dSCy Schubertand the configuration
6602b15cb3dSCy Schubertfiles for all clients can be identical.
661052d159aSCy Schubert</p>
6622b15cb3dSCy Schubert<p>The security model and protocol schemes for
6632b15cb3dSCy Schubertboth symmetric key and public key
6642b15cb3dSCy Schubertcryptography are summarized below;
6652b15cb3dSCy Schubertfurther details are in the briefings, papers
6662b15cb3dSCy Schubertand reports at the NTP project page linked from
6672b15cb3dSCy Schubert<code>http://www.ntp.org/</code>.
668a466cc55SCy Schubert</p><span id="Symmetric_002dKey-Cryptography"></span><h4 class="subsubsection">1.1.2.1 Symmetric-Key Cryptography</h4>
6692b15cb3dSCy Schubert<p>The original RFC-1305 specification allows any one of possibly
6704e1ef62aSXin LI65,535 keys, each distinguished by a 32-bit key identifier, to
6712b15cb3dSCy Schubertauthenticate an association.
6722b15cb3dSCy SchubertThe servers and clients involved must
6732b15cb3dSCy Schubertagree on the key and key identifier to
6742b15cb3dSCy Schubertauthenticate NTP packets.
6752b15cb3dSCy SchubertKeys and
6762b15cb3dSCy Schubertrelated information are specified in a key
6772b15cb3dSCy Schubertfile, usually called
678052d159aSCy Schubert<samp>ntp.keys</samp>,
6792b15cb3dSCy Schubertwhich must be distributed and stored using
6802b15cb3dSCy Schubertsecure means beyond the scope of the NTP protocol itself.
6812b15cb3dSCy SchubertBesides the keys used
6822b15cb3dSCy Schubertfor ordinary NTP associations,
6832b15cb3dSCy Schubertadditional keys can be used as passwords for the
6842b15cb3dSCy Schubert<code>ntpq(1ntpqmdoc)</code>
6852b15cb3dSCy Schubertand
6862b15cb3dSCy Schubert<code>ntpdc(1ntpdcmdoc)</code>
6872b15cb3dSCy Schubertutility programs.
688052d159aSCy Schubert</p>
6892b15cb3dSCy Schubert<p>When
6902b15cb3dSCy Schubert<code>ntpd(1ntpdmdoc)</code>
6912b15cb3dSCy Schubertis first started, it reads the key file specified in the
6922b15cb3dSCy Schubert<code>keys</code>
6932b15cb3dSCy Schubertconfiguration command and installs the keys
6942b15cb3dSCy Schubertin the key cache.
6952b15cb3dSCy SchubertHowever,
6962b15cb3dSCy Schubertindividual keys must be activated with the
6972b15cb3dSCy Schubert<code>trusted</code>
6982b15cb3dSCy Schubertcommand before use.
6992b15cb3dSCy SchubertThis
7002b15cb3dSCy Schubertallows, for instance, the installation of possibly
7012b15cb3dSCy Schubertseveral batches of keys and
7022b15cb3dSCy Schubertthen activating or deactivating each batch
7032b15cb3dSCy Schubertremotely using
7042b15cb3dSCy Schubert<code>ntpdc(1ntpdcmdoc)</code>.
7052b15cb3dSCy SchubertThis also provides a revocation capability that can be used
7062b15cb3dSCy Schubertif a key becomes compromised.
7072b15cb3dSCy SchubertThe
7082b15cb3dSCy Schubert<code>requestkey</code>
7092b15cb3dSCy Schubertcommand selects the key used as the password for the
7102b15cb3dSCy Schubert<code>ntpdc(1ntpdcmdoc)</code>
7112b15cb3dSCy Schubertutility, while the
7122b15cb3dSCy Schubert<code>controlkey</code>
7132b15cb3dSCy Schubertcommand selects the key used as the password for the
7142b15cb3dSCy Schubert<code>ntpq(1ntpqmdoc)</code>
7152b15cb3dSCy Schubertutility.
716a466cc55SCy Schubert</p><span id="Public-Key-Cryptography"></span><h4 class="subsubsection">1.1.2.2 Public Key Cryptography</h4>
7172b15cb3dSCy Schubert<p>NTPv4 supports the original NTPv3 symmetric key scheme
7182b15cb3dSCy Schubertdescribed in RFC-1305 and in addition the Autokey protocol,
7192b15cb3dSCy Schubertwhich is based on public key cryptography.
7202b15cb3dSCy SchubertThe Autokey Version 2 protocol described on the Autokey Protocol
7212b15cb3dSCy Schubertpage verifies packet integrity using MD5 message digests
7222b15cb3dSCy Schubertand verifies the source with digital signatures and any of several
7232b15cb3dSCy Schubertdigest/signature schemes.
7242b15cb3dSCy SchubertOptional identity schemes described on the Identity Schemes
7252b15cb3dSCy Schubertpage and based on cryptographic challenge/response algorithms
7262b15cb3dSCy Schubertare also available.
7272b15cb3dSCy SchubertUsing all of these schemes provides strong security against
7282b15cb3dSCy Schubertreplay with or without modification, spoofing, masquerade
7292b15cb3dSCy Schubertand most forms of clogging attacks.
730052d159aSCy Schubert</p>
7312b15cb3dSCy Schubert<p>The Autokey protocol has several modes of operation
7322b15cb3dSCy Schubertcorresponding to the various NTP modes supported.
7332b15cb3dSCy SchubertMost modes use a special cookie which can be
7342b15cb3dSCy Schubertcomputed independently by the client and server,
7352b15cb3dSCy Schubertbut encrypted in transmission.
7362b15cb3dSCy SchubertAll modes use in addition a variant of the S-KEY scheme,
7372b15cb3dSCy Schubertin which a pseudo-random key list is generated and used
7382b15cb3dSCy Schubertin reverse order.
7392b15cb3dSCy SchubertThese schemes are described along with an executive summary,
7402b15cb3dSCy Schubertcurrent status, briefing slides and reading list on the
741052d159aSCy Schubert&lsquo;Autonomous Authentication&rsquo;
7422b15cb3dSCy Schubertpage.
743052d159aSCy Schubert</p>
7442b15cb3dSCy Schubert<p>The specific cryptographic environment used by Autokey servers
7452b15cb3dSCy Schubertand clients is determined by a set of files
7462b15cb3dSCy Schubertand soft links generated by the
7472b15cb3dSCy Schubert<code>ntp-keygen(1ntpkeygenmdoc)</code>
7482b15cb3dSCy Schubertprogram.
7492b15cb3dSCy SchubertThis includes a required host key file,
7502b15cb3dSCy Schubertrequired certificate file and optional sign key file,
7512b15cb3dSCy Schubertleapsecond file and identity scheme files.
7522b15cb3dSCy SchubertThe
7532b15cb3dSCy Schubertdigest/signature scheme is specified in the X.509 certificate
7542b15cb3dSCy Schubertalong with the matching sign key.
7552b15cb3dSCy SchubertThere are several schemes
7562b15cb3dSCy Schubertavailable in the OpenSSL software library, each identified
7572b15cb3dSCy Schubertby a specific string such as
7582b15cb3dSCy Schubert<code>md5WithRSAEncryption</code>,
7592b15cb3dSCy Schubertwhich stands for the MD5 message digest with RSA
7602b15cb3dSCy Schubertencryption scheme.
7612b15cb3dSCy SchubertThe current NTP distribution supports
7622b15cb3dSCy Schubertall the schemes in the OpenSSL library, including
7632b15cb3dSCy Schubertthose based on RSA and DSA digital signatures.
764052d159aSCy Schubert</p>
7652b15cb3dSCy Schubert<p>NTP secure groups can be used to define cryptographic compartments
7662b15cb3dSCy Schubertand security hierarchies.
7672b15cb3dSCy SchubertIt is important that every host
7682b15cb3dSCy Schubertin the group be able to construct a certificate trail to one
7692b15cb3dSCy Schubertor more trusted hosts in the same group.
7702b15cb3dSCy SchubertEach group
7712b15cb3dSCy Schuberthost runs the Autokey protocol to obtain the certificates
7722b15cb3dSCy Schubertfor all hosts along the trail to one or more trusted hosts.
7732b15cb3dSCy SchubertThis requires the configuration file in all hosts to be
7742b15cb3dSCy Schubertengineered so that, even under anticipated failure conditions,
7752b15cb3dSCy Schubertthe NTP subnet will form such that every group host can find
7762b15cb3dSCy Schuberta trail to at least one trusted host.
777a466cc55SCy Schubert</p><span id="Naming-and-Addressing"></span><h4 class="subsubsection">1.1.2.3 Naming and Addressing</h4>
7782b15cb3dSCy Schubert<p>It is important to note that Autokey does not use DNS to
779052d159aSCy Schubertresolve addresses, since DNS can&rsquo;t be completely trusted
7802b15cb3dSCy Schubertuntil the name servers have synchronized clocks.
7812b15cb3dSCy SchubertThe cryptographic name used by Autokey to bind the host identity
7822b15cb3dSCy Schubertcredentials and cryptographic values must be independent
7832b15cb3dSCy Schubertof interface, network and any other naming convention.
7842b15cb3dSCy SchubertThe name appears in the host certificate in either or both
7852b15cb3dSCy Schubertthe subject and issuer fields, so protection against
7862b15cb3dSCy SchubertDNS compromise is essential.
787052d159aSCy Schubert</p>
7882b15cb3dSCy Schubert<p>By convention, the name of an Autokey host is the name returned
7892b15cb3dSCy Schubertby the Unix
7902b15cb3dSCy Schubert<code>gethostname(2)</code>
7912b15cb3dSCy Schubertsystem call or equivalent in other systems.
7922b15cb3dSCy SchubertBy the system design
7932b15cb3dSCy Schubertmodel, there are no provisions to allow alternate names or aliases.
7942b15cb3dSCy SchubertHowever, this is not to say that DNS aliases, different names
7952b15cb3dSCy Schubertfor each interface, etc., are constrained in any way.
796052d159aSCy Schubert</p>
7972b15cb3dSCy Schubert<p>It is also important to note that Autokey verifies authenticity
7982b15cb3dSCy Schubertusing the host name, network address and public keys,
7992b15cb3dSCy Schubertall of which are bound together by the protocol specifically
8002b15cb3dSCy Schubertto deflect masquerade attacks.
8012b15cb3dSCy SchubertFor this reason Autokey
802e27abb66SXin LIincludes the source and destination IP addresses in message digest
8032b15cb3dSCy Schubertcomputations and so the same addresses must be available
8042b15cb3dSCy Schubertat both the server and client.
8052b15cb3dSCy SchubertFor this reason operation
8062b15cb3dSCy Schubertwith network address translation schemes is not possible.
8072b15cb3dSCy SchubertThis reflects the intended robust security model where government
8082b15cb3dSCy Schubertand corporate NTP servers are operated outside firewall perimeters.
809a466cc55SCy Schubert</p><span id="Operation"></span><h4 class="subsubsection">1.1.2.4 Operation</h4>
8102b15cb3dSCy Schubert<p>A specific combination of authentication scheme (none,
8112b15cb3dSCy Schubertsymmetric key, public key) and identity scheme is called
8122b15cb3dSCy Schuberta cryptotype, although not all combinations are compatible.
8132b15cb3dSCy SchubertThere may be management configurations where the clients,
8142b15cb3dSCy Schubertservers and peers may not all support the same cryptotypes.
8152b15cb3dSCy SchubertA secure NTPv4 subnet can be configured in many ways while
8162b15cb3dSCy Schubertkeeping in mind the principles explained above and
8172b15cb3dSCy Schubertin this section.
8182b15cb3dSCy SchubertNote however that some cryptotype
8192b15cb3dSCy Schubertcombinations may successfully interoperate with each other,
8202b15cb3dSCy Schubertbut may not represent good security practice.
821052d159aSCy Schubert</p>
8222b15cb3dSCy Schubert<p>The cryptotype of an association is determined at the time
8232b15cb3dSCy Schubertof mobilization, either at configuration time or some time
8242b15cb3dSCy Schubertlater when a message of appropriate cryptotype arrives.
8252b15cb3dSCy SchubertWhen mobilized by a
8262b15cb3dSCy Schubert<code>server</code>
8272b15cb3dSCy Schubertor
8282b15cb3dSCy Schubert<code>peer</code>
8292b15cb3dSCy Schubertconfiguration command and no
8302b15cb3dSCy Schubert<code>key</code>
8312b15cb3dSCy Schubertor
8322b15cb3dSCy Schubert<code>autokey</code>
8332b15cb3dSCy Schubertsubcommands are present, the association is not
8342b15cb3dSCy Schubertauthenticated; if the
8352b15cb3dSCy Schubert<code>key</code>
8362b15cb3dSCy Schubertsubcommand is present, the association is authenticated
8372b15cb3dSCy Schubertusing the symmetric key ID specified; if the
8382b15cb3dSCy Schubert<code>autokey</code>
8392b15cb3dSCy Schubertsubcommand is present, the association is authenticated
8402b15cb3dSCy Schubertusing Autokey.
841052d159aSCy Schubert</p>
8422b15cb3dSCy Schubert<p>When multiple identity schemes are supported in the Autokey
8432b15cb3dSCy Schubertprotocol, the first message exchange determines which one is used.
8442b15cb3dSCy SchubertThe client request message contains bits corresponding
8452b15cb3dSCy Schubertto which schemes it has available.
8462b15cb3dSCy SchubertThe server response message
8472b15cb3dSCy Schubertcontains bits corresponding to which schemes it has available.
8482b15cb3dSCy SchubertBoth server and client match the received bits with their own
8492b15cb3dSCy Schubertand select a common scheme.
850052d159aSCy Schubert</p>
8512b15cb3dSCy Schubert<p>Following the principle that time is a public value,
8522b15cb3dSCy Schuberta server responds to any client packet that matches
8532b15cb3dSCy Schubertits cryptotype capabilities.
8542b15cb3dSCy SchubertThus, a server receiving
8552b15cb3dSCy Schubertan unauthenticated packet will respond with an unauthenticated
8562b15cb3dSCy Schubertpacket, while the same server receiving a packet of a cryptotype
8572b15cb3dSCy Schubertit supports will respond with packets of that cryptotype.
8582b15cb3dSCy SchubertHowever, unconfigured broadcast or manycast client
8592b15cb3dSCy Schubertassociations or symmetric passive associations will not be
8602b15cb3dSCy Schubertmobilized unless the server supports a cryptotype compatible
8612b15cb3dSCy Schubertwith the first packet received.
8622b15cb3dSCy SchubertBy default, unauthenticated associations will not be mobilized
8632b15cb3dSCy Schubertunless overridden in a decidedly dangerous way.
864052d159aSCy Schubert</p>
8652b15cb3dSCy Schubert<p>Some examples may help to reduce confusion.
8662b15cb3dSCy SchubertClient Alice has no specific cryptotype selected.
8672b15cb3dSCy SchubertServer Bob has both a symmetric key file and minimal Autokey files.
868052d159aSCy SchubertAlice&rsquo;s unauthenticated messages arrive at Bob, who replies with
8692b15cb3dSCy Schubertunauthenticated messages.
870052d159aSCy SchubertCathy has a copy of Bob&rsquo;s symmetric
8712b15cb3dSCy Schubertkey file and has selected key ID 4 in messages to Bob.
8722b15cb3dSCy SchubertBob verifies the message with his key ID 4.
873052d159aSCy SchubertIf it&rsquo;s the
8742b15cb3dSCy Schubertsame key and the message is verified, Bob sends Cathy a reply
8752b15cb3dSCy Schubertauthenticated with that key.
8762b15cb3dSCy SchubertIf verification fails,
8772b15cb3dSCy SchubertBob sends Cathy a thing called a crypto-NAK, which tells her
8782b15cb3dSCy Schubertsomething broke.
8792b15cb3dSCy SchubertShe can see the evidence using the
8802b15cb3dSCy Schubert<code>ntpq(1ntpqmdoc)</code>
8812b15cb3dSCy Schubertprogram.
882052d159aSCy Schubert</p>
8832b15cb3dSCy Schubert<p>Denise has rolled her own host key and certificate.
8842b15cb3dSCy SchubertShe also uses one of the identity schemes as Bob.
8852b15cb3dSCy SchubertShe sends the first Autokey message to Bob and they
8862b15cb3dSCy Schubertboth dance the protocol authentication and identity steps.
8872b15cb3dSCy SchubertIf all comes out okay, Denise and Bob continue as described above.
888052d159aSCy Schubert</p>
8892b15cb3dSCy Schubert<p>It should be clear from the above that Bob can support
8902b15cb3dSCy Schubertall the girls at the same time, as long as he has compatible
8912b15cb3dSCy Schubertauthentication and identity credentials.
8922b15cb3dSCy SchubertNow, Bob can act just like the girls in his own choice of servers;
8932b15cb3dSCy Schuberthe can run multiple configured associations with multiple different
8942b15cb3dSCy Schubertservers (or the same server, although that might not be useful).
8952b15cb3dSCy SchubertBut, wise security policy might preclude some cryptotype
8962b15cb3dSCy Schubertcombinations; for instance, running an identity scheme
8972b15cb3dSCy Schubertwith one server and no authentication with another might not be wise.
898a466cc55SCy Schubert</p><span id="Key-Management"></span><h4 class="subsubsection">1.1.2.5 Key Management</h4>
8992b15cb3dSCy Schubert<p>The cryptographic values used by the Autokey protocol are
9002b15cb3dSCy Schubertincorporated as a set of files generated by the
9012b15cb3dSCy Schubert<code>ntp-keygen(1ntpkeygenmdoc)</code>
9022b15cb3dSCy Schubertutility program, including symmetric key, host key and
9032b15cb3dSCy Schubertpublic certificate files, as well as sign key, identity parameters
9042b15cb3dSCy Schubertand leapseconds files.
9052b15cb3dSCy SchubertAlternatively, host and sign keys and
9062b15cb3dSCy Schubertcertificate files can be generated by the OpenSSL utilities
9072b15cb3dSCy Schubertand certificates can be imported from public certificate
9082b15cb3dSCy Schubertauthorities.
9092b15cb3dSCy SchubertNote that symmetric keys are necessary for the
9102b15cb3dSCy Schubert<code>ntpq(1ntpqmdoc)</code>
9112b15cb3dSCy Schubertand
9122b15cb3dSCy Schubert<code>ntpdc(1ntpdcmdoc)</code>
9132b15cb3dSCy Schubertutility programs.
9142b15cb3dSCy SchubertThe remaining files are necessary only for the
9152b15cb3dSCy SchubertAutokey protocol.
916052d159aSCy Schubert</p>
9172b15cb3dSCy Schubert<p>Certificates imported from OpenSSL or public certificate
9182b15cb3dSCy Schubertauthorities have certian limitations.
9192b15cb3dSCy SchubertThe certificate should be in ASN.1 syntax, X.509 Version 3
9202b15cb3dSCy Schubertformat and encoded in PEM, which is the same format
9212b15cb3dSCy Schubertused by OpenSSL.
9222b15cb3dSCy SchubertThe overall length of the certificate encoded
9232b15cb3dSCy Schubertin ASN.1 must not exceed 1024 bytes.
9242b15cb3dSCy SchubertThe subject distinguished
9252b15cb3dSCy Schubertname field (CN) is the fully qualified name of the host
9262b15cb3dSCy Schuberton which it is used; the remaining subject fields are ignored.
9272b15cb3dSCy SchubertThe certificate extension fields must not contain either
9282b15cb3dSCy Schuberta subject key identifier or a issuer key identifier field;
9292b15cb3dSCy Schuberthowever, an extended key usage field for a trusted host must
9302b15cb3dSCy Schubertcontain the value
9312b15cb3dSCy Schubert<code>trustRoot</code>;.
9322b15cb3dSCy SchubertOther extension fields are ignored.
933a466cc55SCy Schubert</p><span id="Authentication-Commands"></span><h4 class="subsubsection">1.1.2.6 Authentication Commands</h4>
934052d159aSCy Schubert<dl compact="compact">
935052d159aSCy Schubert<dt><code>autokey</code> <code>[<kbd>logsec</kbd>]</code></dt>
936052d159aSCy Schubert<dd><p>Specifies the interval between regenerations of the session key
9372b15cb3dSCy Schubertlist used with the Autokey protocol.
9382b15cb3dSCy SchubertNote that the size of the key
9392b15cb3dSCy Schubertlist for each association depends on this interval and the current
9402b15cb3dSCy Schubertpoll interval.
9412b15cb3dSCy SchubertThe default value is 12 (4096 s or about 1.1 hours).
9422b15cb3dSCy SchubertFor poll intervals above the specified interval, a session key list
9432b15cb3dSCy Schubertwith a single entry will be regenerated for every message
9442b15cb3dSCy Schubertsent.
945052d159aSCy Schubert</p></dd>
946052d159aSCy Schubert<dt><code>controlkey</code> <kbd>key</kbd></dt>
947052d159aSCy Schubert<dd><p>Specifies the key identifier to use with the
9482b15cb3dSCy Schubert<code>ntpq(1ntpqmdoc)</code>
9492b15cb3dSCy Schubertutility, which uses the standard
9502b15cb3dSCy Schubertprotocol defined in RFC-1305.
9512b15cb3dSCy SchubertThe
9522b15cb3dSCy Schubert<kbd>key</kbd>
9532b15cb3dSCy Schubertargument is
9542b15cb3dSCy Schubertthe key identifier for a trusted key, where the value can be in the
9554e1ef62aSXin LIrange 1 to 65,535, inclusive.
956052d159aSCy Schubert</p></dd>
957*f5f40dd6SCy 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>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>
958052d159aSCy Schubert<dd><p>This command requires the OpenSSL library.
9592b15cb3dSCy SchubertIt activates public key
9602b15cb3dSCy Schubertcryptography, selects the message digest and signature
9612b15cb3dSCy Schubertencryption scheme and loads the required private and public
9622b15cb3dSCy Schubertvalues described above.
9632b15cb3dSCy SchubertIf one or more files are left unspecified,
9642b15cb3dSCy Schubertthe default names are used as described above.
9652b15cb3dSCy SchubertUnless the complete path and name of the file are specified, the
9662b15cb3dSCy Schubertlocation of a file is relative to the keys directory specified
9672b15cb3dSCy Schubertin the
9682b15cb3dSCy Schubert<code>keysdir</code>
9692b15cb3dSCy Schubertcommand or default
970052d159aSCy Schubert<samp>/usr/local/etc</samp>.
9712b15cb3dSCy SchubertFollowing are the subcommands:
972052d159aSCy Schubert</p><dl compact="compact">
973052d159aSCy Schubert<dt><code>cert</code> <kbd>file</kbd></dt>
974052d159aSCy Schubert<dd><p>Specifies the location of the required host public certificate file.
9752b15cb3dSCy SchubertThis overrides the link
976052d159aSCy Schubert<samp>ntpkey_cert_</samp><kbd>hostname</kbd>
9772b15cb3dSCy Schubertin the keys directory.
978052d159aSCy Schubert</p></dd>
979052d159aSCy Schubert<dt><code>gqpar</code> <kbd>file</kbd></dt>
980052d159aSCy Schubert<dd><p>Specifies the location of the optional GQ parameters file.
9812b15cb3dSCy SchubertThis
9822b15cb3dSCy Schubertoverrides the link
983052d159aSCy Schubert<samp>ntpkey_gq_</samp><kbd>hostname</kbd>
9842b15cb3dSCy Schubertin the keys directory.
985052d159aSCy Schubert</p></dd>
986052d159aSCy Schubert<dt><code>host</code> <kbd>file</kbd></dt>
987052d159aSCy Schubert<dd><p>Specifies the location of the required host key file.
9882b15cb3dSCy SchubertThis overrides
9892b15cb3dSCy Schubertthe link
990052d159aSCy Schubert<samp>ntpkey_key_</samp><kbd>hostname</kbd>
9912b15cb3dSCy Schubertin the keys directory.
992052d159aSCy Schubert</p></dd>
993052d159aSCy Schubert<dt><code>iffpar</code> <kbd>file</kbd></dt>
994052d159aSCy Schubert<dd><p>Specifies the location of the optional IFF parameters file.
995e27abb66SXin LIThis overrides the link
996052d159aSCy Schubert<samp>ntpkey_iff_</samp><kbd>hostname</kbd>
9972b15cb3dSCy Schubertin the keys directory.
998052d159aSCy Schubert</p></dd>
999052d159aSCy Schubert<dt><code>leap</code> <kbd>file</kbd></dt>
1000052d159aSCy Schubert<dd><p>Specifies the location of the optional leapsecond file.
10012b15cb3dSCy SchubertThis overrides the link
1002052d159aSCy Schubert<samp>ntpkey_leap</samp>
10032b15cb3dSCy Schubertin the keys directory.
1004052d159aSCy Schubert</p></dd>
1005052d159aSCy Schubert<dt><code>mvpar</code> <kbd>file</kbd></dt>
1006052d159aSCy Schubert<dd><p>Specifies the location of the optional MV parameters file.
1007e27abb66SXin LIThis overrides the link
1008052d159aSCy Schubert<samp>ntpkey_mv_</samp><kbd>hostname</kbd>
10092b15cb3dSCy Schubertin the keys directory.
1010052d159aSCy Schubert</p></dd>
1011052d159aSCy Schubert<dt><code>pw</code> <kbd>password</kbd></dt>
1012052d159aSCy Schubert<dd><p>Specifies the password to decrypt files containing private keys and
10132b15cb3dSCy Schubertidentity parameters.
10142b15cb3dSCy SchubertThis is required only if these files have been
10152b15cb3dSCy Schubertencrypted.
1016052d159aSCy Schubert</p></dd>
1017052d159aSCy Schubert<dt><code>randfile</code> <kbd>file</kbd></dt>
1018052d159aSCy Schubert<dd><p>Specifies the location of the random seed file used by the OpenSSL
10192b15cb3dSCy Schubertlibrary.
10202b15cb3dSCy SchubertThe defaults are described in the main text above.
1021052d159aSCy Schubert</p></dd>
10222b15cb3dSCy Schubert</dl>
1023052d159aSCy Schubert</dd>
1024052d159aSCy Schubert<dt><code>keys</code> <kbd>keyfile</kbd></dt>
1025052d159aSCy Schubert<dd><p>Specifies the complete path and location of the MD5 key file
10262b15cb3dSCy Schubertcontaining the keys and key identifiers used by
10272b15cb3dSCy Schubert<code>ntpd(1ntpdmdoc)</code>,
10282b15cb3dSCy Schubert<code>ntpq(1ntpqmdoc)</code>
10292b15cb3dSCy Schubertand
10302b15cb3dSCy Schubert<code>ntpdc(1ntpdcmdoc)</code>
10312b15cb3dSCy Schubertwhen operating with symmetric key cryptography.
10322b15cb3dSCy SchubertThis is the same operation as the
10332b15cb3dSCy Schubert<code>-k</code>
10342b15cb3dSCy Schubertcommand line option.
1035052d159aSCy Schubert</p></dd>
1036052d159aSCy Schubert<dt><code>keysdir</code> <kbd>path</kbd></dt>
1037052d159aSCy Schubert<dd><p>This command specifies the default directory path for
10382b15cb3dSCy Schubertcryptographic keys, parameters and certificates.
10392b15cb3dSCy SchubertThe default is
1040052d159aSCy Schubert<samp>/usr/local/etc/</samp>.
1041052d159aSCy Schubert</p></dd>
1042052d159aSCy Schubert<dt><code>requestkey</code> <kbd>key</kbd></dt>
1043052d159aSCy Schubert<dd><p>Specifies the key identifier to use with the
10442b15cb3dSCy Schubert<code>ntpdc(1ntpdcmdoc)</code>
10452b15cb3dSCy Schubertutility program, which uses a
10462b15cb3dSCy Schubertproprietary protocol specific to this implementation of
10472b15cb3dSCy Schubert<code>ntpd(1ntpdmdoc)</code>.
10482b15cb3dSCy SchubertThe
10492b15cb3dSCy Schubert<kbd>key</kbd>
10502b15cb3dSCy Schubertargument is a key identifier
10512b15cb3dSCy Schubertfor the trusted key, where the value can be in the range 1 to
10524e1ef62aSXin LI65,535, inclusive.
1053052d159aSCy Schubert</p></dd>
1054052d159aSCy Schubert<dt><code>revoke</code> <kbd>logsec</kbd></dt>
1055052d159aSCy Schubert<dd><p>Specifies the interval between re-randomization of certain
10562b15cb3dSCy Schubertcryptographic values used by the Autokey scheme, as a power of 2 in
10572b15cb3dSCy Schubertseconds.
10582b15cb3dSCy SchubertThese values need to be updated frequently in order to
10592b15cb3dSCy Schubertdeflect brute-force attacks on the algorithms of the scheme;
10602b15cb3dSCy Schuberthowever, updating some values is a relatively expensive operation.
10612b15cb3dSCy SchubertThe default interval is 16 (65,536 s or about 18 hours).
10622b15cb3dSCy SchubertFor poll
10632b15cb3dSCy Schubertintervals above the specified interval, the values will be updated
10642b15cb3dSCy Schubertfor every message sent.
1065052d159aSCy Schubert</p></dd>
1066052d159aSCy Schubert<dt><code>trustedkey</code> <kbd>key</kbd> <kbd>...</kbd></dt>
1067052d159aSCy Schubert<dd><p>Specifies the key identifiers which are trusted for the
10682b15cb3dSCy Schubertpurposes of authenticating peers with symmetric key cryptography,
10692b15cb3dSCy Schubertas well as keys used by the
10702b15cb3dSCy Schubert<code>ntpq(1ntpqmdoc)</code>
10712b15cb3dSCy Schubertand
10722b15cb3dSCy Schubert<code>ntpdc(1ntpdcmdoc)</code>
10732b15cb3dSCy Schubertprograms.
10742b15cb3dSCy SchubertThe authentication procedures require that both the local
10752b15cb3dSCy Schubertand remote servers share the same key and key identifier for this
10762b15cb3dSCy Schubertpurpose, although different keys can be used with different
10772b15cb3dSCy Schubertservers.
10782b15cb3dSCy SchubertThe
10792b15cb3dSCy Schubert<kbd>key</kbd>
10802b15cb3dSCy Schubertarguments are 32-bit unsigned
10814e1ef62aSXin LIintegers with values from 1 to 65,535.
1082052d159aSCy Schubert</p></dd>
10832b15cb3dSCy Schubert</dl>
1084a466cc55SCy Schubert<span id="Error-Codes"></span><h4 class="subsubsection">1.1.2.7 Error Codes</h4>
10852b15cb3dSCy Schubert<p>The following error codes are reported via the NTP control
10862b15cb3dSCy Schubertand monitoring protocol trap mechanism.
1087052d159aSCy Schubert</p><dl compact="compact">
1088052d159aSCy Schubert<dt>101</dt>
1089052d159aSCy Schubert<dd><p>(bad field format or length)
10902b15cb3dSCy SchubertThe packet has invalid version, length or format.
1091052d159aSCy Schubert</p></dd>
1092052d159aSCy Schubert<dt>102</dt>
1093052d159aSCy Schubert<dd><p>(bad timestamp)
10942b15cb3dSCy SchubertThe packet timestamp is the same or older than the most recent received.
10952b15cb3dSCy SchubertThis could be due to a replay or a server clock time step.
1096052d159aSCy Schubert</p></dd>
1097052d159aSCy Schubert<dt>103</dt>
1098052d159aSCy Schubert<dd><p>(bad filestamp)
10992b15cb3dSCy SchubertThe packet filestamp is the same or older than the most recent received.
11002b15cb3dSCy SchubertThis could be due to a replay or a key file generation error.
1101052d159aSCy Schubert</p></dd>
1102052d159aSCy Schubert<dt>104</dt>
1103052d159aSCy Schubert<dd><p>(bad or missing public key)
11042b15cb3dSCy SchubertThe public key is missing, has incorrect format or is an unsupported type.
1105052d159aSCy Schubert</p></dd>
1106052d159aSCy Schubert<dt>105</dt>
1107052d159aSCy Schubert<dd><p>(unsupported digest type)
11082b15cb3dSCy SchubertThe server requires an unsupported digest/signature scheme.
1109052d159aSCy Schubert</p></dd>
1110052d159aSCy Schubert<dt>106</dt>
1111052d159aSCy Schubert<dd><p>(mismatched digest types)
11122b15cb3dSCy SchubertNot used.
1113052d159aSCy Schubert</p></dd>
1114052d159aSCy Schubert<dt>107</dt>
1115052d159aSCy Schubert<dd><p>(bad signature length)
11162b15cb3dSCy SchubertThe signature length does not match the current public key.
1117052d159aSCy Schubert</p></dd>
1118052d159aSCy Schubert<dt>108</dt>
1119052d159aSCy Schubert<dd><p>(signature not verified)
11202b15cb3dSCy SchubertThe message fails the signature check.
11212b15cb3dSCy SchubertIt could be bogus or signed by a
11222b15cb3dSCy Schubertdifferent private key.
1123052d159aSCy Schubert</p></dd>
1124052d159aSCy Schubert<dt>109</dt>
1125052d159aSCy Schubert<dd><p>(certificate not verified)
11262b15cb3dSCy SchubertThe certificate is invalid or signed with the wrong key.
1127052d159aSCy Schubert</p></dd>
1128052d159aSCy Schubert<dt>110</dt>
1129052d159aSCy Schubert<dd><p>(certificate not verified)
11302b15cb3dSCy SchubertThe certificate is not yet valid or has expired or the signature could not
11312b15cb3dSCy Schubertbe verified.
1132052d159aSCy Schubert</p></dd>
1133052d159aSCy Schubert<dt>111</dt>
1134052d159aSCy Schubert<dd><p>(bad or missing cookie)
11352b15cb3dSCy SchubertThe cookie is missing, corrupted or bogus.
1136052d159aSCy Schubert</p></dd>
1137052d159aSCy Schubert<dt>112</dt>
1138052d159aSCy Schubert<dd><p>(bad or missing leapseconds table)
11392b15cb3dSCy SchubertThe leapseconds table is missing, corrupted or bogus.
1140052d159aSCy Schubert</p></dd>
1141052d159aSCy Schubert<dt>113</dt>
1142052d159aSCy Schubert<dd><p>(bad or missing certificate)
11432b15cb3dSCy SchubertThe certificate is missing, corrupted or bogus.
1144052d159aSCy Schubert</p></dd>
1145052d159aSCy Schubert<dt>114</dt>
1146052d159aSCy Schubert<dd><p>(bad or missing identity)
11472b15cb3dSCy SchubertThe identity key is missing, corrupt or bogus.
1148052d159aSCy Schubert</p></dd>
11492b15cb3dSCy Schubert</dl>
1150052d159aSCy Schubert<hr>
1151a466cc55SCy Schubert<span id="Monitoring-Support"></span><div class="header">
1152052d159aSCy Schubert<p>
1153052d159aSCy 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>
11542b15cb3dSCy Schubert</div>
1155a466cc55SCy Schubert<span id="Monitoring-Support-1"></span><h4 class="subsection">1.1.3 Monitoring Support</h4>
11562b15cb3dSCy Schubert<p><code>ntpd(1ntpdmdoc)</code>
11572b15cb3dSCy Schubertincludes a comprehensive monitoring facility suitable
11582b15cb3dSCy Schubertfor continuous, long term recording of server and client
11592b15cb3dSCy Schuberttimekeeping performance.
11602b15cb3dSCy SchubertSee the
11612b15cb3dSCy Schubert<code>statistics</code>
11622b15cb3dSCy Schubertcommand below
11632b15cb3dSCy Schubertfor a listing and example of each type of statistics currently
11642b15cb3dSCy Schubertsupported.
11652b15cb3dSCy SchubertStatistic files are managed using file generation sets
11662b15cb3dSCy Schubertand scripts in the
1167052d159aSCy Schubert<samp>./scripts</samp>
1168e27abb66SXin LIdirectory of the source code distribution.
11692b15cb3dSCy SchubertUsing
11702b15cb3dSCy Schubertthese facilities and
1171052d159aSCy Schubert<small>UNIX</small>
11722b15cb3dSCy Schubert<code>cron(8)</code>
11732b15cb3dSCy Schubertjobs, the data can be
11742b15cb3dSCy Schubertautomatically summarized and archived for retrospective analysis.
1175a466cc55SCy Schubert</p><span id="Monitoring-Commands"></span><h4 class="subsubsection">1.1.3.1 Monitoring Commands</h4>
1176052d159aSCy Schubert<dl compact="compact">
1177052d159aSCy Schubert<dt><code>statistics</code> <kbd>name</kbd> <kbd>...</kbd></dt>
1178052d159aSCy Schubert<dd><p>Enables writing of statistics records.
11792b15cb3dSCy SchubertCurrently, eight kinds of
11802b15cb3dSCy Schubert<kbd>name</kbd>
11812b15cb3dSCy Schubertstatistics are supported.
1182052d159aSCy Schubert</p><dl compact="compact">
1183052d159aSCy Schubert<dt><code>clockstats</code></dt>
1184052d159aSCy Schubert<dd><p>Enables recording of clock driver statistics information.
11852b15cb3dSCy SchubertEach update
11862b15cb3dSCy Schubertreceived from a clock driver appends a line of the following form to
11872b15cb3dSCy Schubertthe file generation set named
11882b15cb3dSCy Schubert<code>clockstats</code>:
1189052d159aSCy Schubert</p><pre class="verbatim">49213 525.624 127.127.4.1 93 226 00:08:29.606 D
11902b15cb3dSCy Schubert</pre>
11912b15cb3dSCy Schubert<p>The first two fields show the date (Modified Julian Day) and time
11922b15cb3dSCy Schubert(seconds and fraction past UTC midnight).
11932b15cb3dSCy SchubertThe next field shows the
11942b15cb3dSCy Schubertclock address in dotted-quad notation.
11952b15cb3dSCy SchubertThe final field shows the last
11962b15cb3dSCy Schuberttimecode received from the clock in decoded ASCII format, where
11972b15cb3dSCy Schubertmeaningful.
11982b15cb3dSCy SchubertIn some clock drivers a good deal of additional information
11992b15cb3dSCy Schubertcan be gathered and displayed as well.
12002b15cb3dSCy SchubertSee information specific to each
12012b15cb3dSCy Schubertclock for further details.
1202052d159aSCy Schubert</p></dd>
1203052d159aSCy Schubert<dt><code>cryptostats</code></dt>
1204052d159aSCy Schubert<dd><p>This option requires the OpenSSL cryptographic software library.
12052b15cb3dSCy SchubertIt
12062b15cb3dSCy Schubertenables recording of cryptographic public key protocol information.
12072b15cb3dSCy SchubertEach message received by the protocol module appends a line of the
12082b15cb3dSCy Schubertfollowing form to the file generation set named
12092b15cb3dSCy Schubert<code>cryptostats</code>:
1210052d159aSCy Schubert</p><pre class="verbatim">49213 525.624 127.127.4.1 message
12112b15cb3dSCy Schubert</pre>
12122b15cb3dSCy Schubert<p>The first two fields show the date (Modified Julian Day) and time
12132b15cb3dSCy Schubert(seconds and fraction past UTC midnight).
12142b15cb3dSCy SchubertThe next field shows the peer
12152b15cb3dSCy Schubertaddress in dotted-quad notation, The final message field includes the
12162b15cb3dSCy Schubertmessage type and certain ancillary information.
12172b15cb3dSCy SchubertSee the
1218052d159aSCy Schubert&lsquo;Authentication Options&rsquo;
12192b15cb3dSCy Schubertsection for further information.
1220052d159aSCy Schubert</p></dd>
1221052d159aSCy Schubert<dt><code>loopstats</code></dt>
1222052d159aSCy Schubert<dd><p>Enables recording of loop filter statistics information.
12232b15cb3dSCy SchubertEach
12242b15cb3dSCy Schubertupdate of the local clock outputs a line of the following form to
12252b15cb3dSCy Schubertthe file generation set named
12262b15cb3dSCy Schubert<code>loopstats</code>:
1227052d159aSCy Schubert</p><pre class="verbatim">50935 75440.031 0.000006019 13.778190 0.000351733 0.0133806
12282b15cb3dSCy Schubert</pre>
12292b15cb3dSCy Schubert<p>The first two fields show the date (Modified Julian Day) and
12302b15cb3dSCy Schuberttime (seconds and fraction past UTC midnight).
12312b15cb3dSCy SchubertThe next five fields
12322b15cb3dSCy Schubertshow time offset (seconds), frequency offset (parts per million -
12332b15cb3dSCy SchubertPPM), RMS jitter (seconds), Allan deviation (PPM) and clock
12342b15cb3dSCy Schubertdiscipline time constant.
1235052d159aSCy Schubert</p></dd>
1236052d159aSCy Schubert<dt><code>peerstats</code></dt>
1237052d159aSCy Schubert<dd><p>Enables recording of peer statistics information.
12382b15cb3dSCy SchubertThis includes
12392b15cb3dSCy Schubertstatistics records of all peers of a NTP server and of special
12402b15cb3dSCy Schubertsignals, where present and configured.
12412b15cb3dSCy SchubertEach valid update appends a
12422b15cb3dSCy Schubertline of the following form to the current element of a file
12432b15cb3dSCy Schubertgeneration set named
12442b15cb3dSCy Schubert<code>peerstats</code>:
1245052d159aSCy Schubert</p><pre class="verbatim">48773 10847.650 127.127.4.1 9714 -0.001605376 0.000000000 0.001424877 0.000958674
12462b15cb3dSCy Schubert</pre>
12472b15cb3dSCy Schubert<p>The first two fields show the date (Modified Julian Day) and
12482b15cb3dSCy Schuberttime (seconds and fraction past UTC midnight).
12492b15cb3dSCy SchubertThe next two fields
12502b15cb3dSCy Schubertshow the peer address in dotted-quad notation and status,
12512b15cb3dSCy Schubertrespectively.
12522b15cb3dSCy SchubertThe status field is encoded in hex in the format
12532b15cb3dSCy Schubertdescribed in Appendix A of the NTP specification RFC 1305.
12542b15cb3dSCy SchubertThe final four fields show the offset,
12552b15cb3dSCy Schubertdelay, dispersion and RMS jitter, all in seconds.
1256052d159aSCy Schubert</p></dd>
1257052d159aSCy Schubert<dt><code>rawstats</code></dt>
1258052d159aSCy Schubert<dd><p>Enables recording of raw-timestamp statistics information.
12592b15cb3dSCy SchubertThis
12602b15cb3dSCy Schubertincludes statistics records of all peers of a NTP server and of
12612b15cb3dSCy Schubertspecial signals, where present and configured.
12622b15cb3dSCy SchubertEach NTP message
12632b15cb3dSCy Schubertreceived from a peer or clock driver appends a line of the
12642b15cb3dSCy Schubertfollowing form to the file generation set named
12652b15cb3dSCy Schubert<code>rawstats</code>:
1266052d159aSCy Schubert</p><pre class="verbatim">50928 2132.543 128.4.1.1 128.4.1.20 3102453281.584327000 3102453281.58622800031 02453332.540806000 3102453332.541458000
12672b15cb3dSCy Schubert</pre>
12682b15cb3dSCy Schubert<p>The first two fields show the date (Modified Julian Day) and
12692b15cb3dSCy Schuberttime (seconds and fraction past UTC midnight).
12702b15cb3dSCy SchubertThe next two fields
12712b15cb3dSCy Schubertshow the remote peer or clock address followed by the local address
12722b15cb3dSCy Schubertin dotted-quad notation.
12732b15cb3dSCy SchubertThe final four fields show the originate,
12742b15cb3dSCy Schubertreceive, transmit and final NTP timestamps in order.
12752b15cb3dSCy SchubertThe timestamp
12762b15cb3dSCy Schubertvalues are as received and before processing by the various data
12772b15cb3dSCy Schubertsmoothing and mitigation algorithms.
1278052d159aSCy Schubert</p></dd>
1279052d159aSCy Schubert<dt><code>sysstats</code></dt>
1280052d159aSCy Schubert<dd><p>Enables recording of ntpd statistics counters on a periodic basis.
12812b15cb3dSCy SchubertEach
12822b15cb3dSCy Schuberthour a line of the following form is appended to the file generation
12832b15cb3dSCy Schubertset named
12842b15cb3dSCy Schubert<code>sysstats</code>:
1285052d159aSCy Schubert</p><pre class="verbatim">50928 2132.543 36000 81965 0 9546 56 71793 512 540 10 147
12862b15cb3dSCy Schubert</pre>
12872b15cb3dSCy Schubert<p>The first two fields show the date (Modified Julian Day) and time
12882b15cb3dSCy Schubert(seconds and fraction past UTC midnight).
12892b15cb3dSCy SchubertThe remaining ten fields show
12902b15cb3dSCy Schubertthe statistics counter values accumulated since the last generated
12912b15cb3dSCy Schubertline.
1292052d159aSCy Schubert</p><dl compact="compact">
1293052d159aSCy Schubert<dt>Time since restart <code>36000</code></dt>
1294052d159aSCy Schubert<dd><p>Time in hours since the system was last rebooted.
1295052d159aSCy Schubert</p></dd>
1296052d159aSCy Schubert<dt>Packets received <code>81965</code></dt>
1297052d159aSCy Schubert<dd><p>Total number of packets received.
1298052d159aSCy Schubert</p></dd>
1299052d159aSCy Schubert<dt>Packets processed <code>0</code></dt>
1300052d159aSCy Schubert<dd><p>Number of packets received in response to previous packets sent
1301052d159aSCy Schubert</p></dd>
1302052d159aSCy Schubert<dt>Current version <code>9546</code></dt>
1303052d159aSCy Schubert<dd><p>Number of packets matching the current NTP version.
1304052d159aSCy Schubert</p></dd>
1305052d159aSCy Schubert<dt>Previous version <code>56</code></dt>
1306052d159aSCy Schubert<dd><p>Number of packets matching the previous NTP version.
1307052d159aSCy Schubert</p></dd>
1308052d159aSCy Schubert<dt>Bad version <code>71793</code></dt>
1309052d159aSCy Schubert<dd><p>Number of packets matching neither NTP version.
1310052d159aSCy Schubert</p></dd>
1311052d159aSCy Schubert<dt>Access denied <code>512</code></dt>
1312052d159aSCy Schubert<dd><p>Number of packets denied access for any reason.
1313052d159aSCy Schubert</p></dd>
1314052d159aSCy Schubert<dt>Bad length or format <code>540</code></dt>
1315052d159aSCy Schubert<dd><p>Number of packets with invalid length, format or port number.
1316052d159aSCy Schubert</p></dd>
1317052d159aSCy Schubert<dt>Bad authentication <code>10</code></dt>
1318052d159aSCy Schubert<dd><p>Number of packets not verified as authentic.
1319052d159aSCy Schubert</p></dd>
1320052d159aSCy Schubert<dt>Rate exceeded <code>147</code></dt>
1321052d159aSCy Schubert<dd><p>Number of packets discarded due to rate limitation.
1322052d159aSCy Schubert</p></dd>
13232b15cb3dSCy Schubert</dl>
1324052d159aSCy Schubert</dd>
1325052d159aSCy Schubert<dt><code>statsdir</code> <kbd>directory_path</kbd></dt>
1326052d159aSCy Schubert<dd><p>Indicates the full path of a directory where statistics files
13272b15cb3dSCy Schubertshould be created (see below).
13282b15cb3dSCy SchubertThis keyword allows
13292b15cb3dSCy Schubertthe (otherwise constant)
13302b15cb3dSCy Schubert<code>filegen</code>
13312b15cb3dSCy Schubertfilename prefix to be modified for file generation sets, which
13322b15cb3dSCy Schubertis useful for handling statistics logs.
1333052d159aSCy Schubert</p></dd>
1334052d159aSCy 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>
1335052d159aSCy Schubert<dd><p>Configures setting of generation file set name.
13362b15cb3dSCy SchubertGeneration
13372b15cb3dSCy Schubertfile sets provide a means for handling files that are
13382b15cb3dSCy Schubertcontinuously growing during the lifetime of a server.
13392b15cb3dSCy SchubertServer statistics are a typical example for such files.
13402b15cb3dSCy SchubertGeneration file sets provide access to a set of files used
13412b15cb3dSCy Schubertto store the actual data.
13422b15cb3dSCy SchubertAt any time at most one element
13432b15cb3dSCy Schubertof the set is being written to.
13442b15cb3dSCy SchubertThe type given specifies
13452b15cb3dSCy Schubertwhen and how data will be directed to a new element of the set.
13462b15cb3dSCy SchubertThis way, information stored in elements of a file set
13472b15cb3dSCy Schubertthat are currently unused are available for administrational
13482b15cb3dSCy Schubertoperations without the risk of disturbing the operation of ntpd.
13492b15cb3dSCy Schubert(Most important: they can be removed to free space for new data
13502b15cb3dSCy Schubertproduced.)
1351052d159aSCy Schubert</p>
13522b15cb3dSCy Schubert<p>Note that this command can be sent from the
13532b15cb3dSCy Schubert<code>ntpdc(1ntpdcmdoc)</code>
13542b15cb3dSCy Schubertprogram running at a remote location.
1355052d159aSCy Schubert</p><dl compact="compact">
1356052d159aSCy Schubert<dt><code>name</code></dt>
1357052d159aSCy Schubert<dd><p>This is the type of the statistics records, as shown in the
13582b15cb3dSCy Schubert<code>statistics</code>
13592b15cb3dSCy Schubertcommand.
1360052d159aSCy Schubert</p></dd>
1361052d159aSCy Schubert<dt><code>file</code> <kbd>filename</kbd></dt>
1362052d159aSCy Schubert<dd><p>This is the file name for the statistics records.
13632b15cb3dSCy SchubertFilenames of set
13642b15cb3dSCy Schubertmembers are built from three concatenated elements
13652b15cb3dSCy Schubert<code>prefix</code>,
13662b15cb3dSCy Schubert<code>filename</code>
13672b15cb3dSCy Schubertand
13682b15cb3dSCy Schubert<code>suffix</code>:
1369052d159aSCy Schubert</p><dl compact="compact">
1370052d159aSCy Schubert<dt><code>prefix</code></dt>
1371052d159aSCy Schubert<dd><p>This is a constant filename path.
13722b15cb3dSCy SchubertIt is not subject to
13732b15cb3dSCy Schubertmodifications via the
13742b15cb3dSCy Schubert<kbd>filegen</kbd>
13752b15cb3dSCy Schubertoption.
13762b15cb3dSCy SchubertIt is defined by the
13772b15cb3dSCy Schubertserver, usually specified as a compile-time constant.
13782b15cb3dSCy SchubertIt may,
13792b15cb3dSCy Schuberthowever, be configurable for individual file generation sets
13802b15cb3dSCy Schubertvia other commands.
13812b15cb3dSCy SchubertFor example, the prefix used with
13822b15cb3dSCy Schubert<kbd>loopstats</kbd>
13832b15cb3dSCy Schubertand
13842b15cb3dSCy Schubert<kbd>peerstats</kbd>
13852b15cb3dSCy Schubertgeneration can be configured using the
13862b15cb3dSCy Schubert<kbd>statsdir</kbd>
13872b15cb3dSCy Schubertoption explained above.
1388052d159aSCy Schubert</p></dd>
1389052d159aSCy Schubert<dt><code>filename</code></dt>
1390052d159aSCy Schubert<dd><p>This string is directly concatenated to the prefix mentioned
13912b15cb3dSCy Schubertabove (no intervening
1392052d159aSCy Schubert&lsquo;/&rsquo;).
13932b15cb3dSCy SchubertThis can be modified using
13942b15cb3dSCy Schubertthe file argument to the
13952b15cb3dSCy Schubert<kbd>filegen</kbd>
13962b15cb3dSCy Schubertstatement.
13972b15cb3dSCy SchubertNo
1398052d159aSCy Schubert<samp>..</samp>
13992b15cb3dSCy Schubertelements are
14002b15cb3dSCy Schubertallowed in this component to prevent filenames referring to
14012b15cb3dSCy Schubertparts outside the filesystem hierarchy denoted by
14022b15cb3dSCy Schubert<kbd>prefix</kbd>.
1403052d159aSCy Schubert</p></dd>
1404052d159aSCy Schubert<dt><code>suffix</code></dt>
1405052d159aSCy Schubert<dd><p>This part is reflects individual elements of a file set.
14062b15cb3dSCy SchubertIt is
14072b15cb3dSCy Schubertgenerated according to the type of a file set.
1408052d159aSCy Schubert</p></dd>
14092b15cb3dSCy Schubert</dl>
1410052d159aSCy Schubert</dd>
1411052d159aSCy Schubert<dt><code>type</code> <kbd>typename</kbd></dt>
1412052d159aSCy Schubert<dd><p>A file generation set is characterized by its type.
14132b15cb3dSCy SchubertThe following
14142b15cb3dSCy Schuberttypes are supported:
1415052d159aSCy Schubert</p><dl compact="compact">
1416052d159aSCy Schubert<dt><code>none</code></dt>
1417052d159aSCy Schubert<dd><p>The file set is actually a single plain file.
1418052d159aSCy Schubert</p></dd>
1419052d159aSCy Schubert<dt><code>pid</code></dt>
1420052d159aSCy Schubert<dd><p>One element of file set is used per incarnation of a ntpd
14212b15cb3dSCy Schubertserver.
14222b15cb3dSCy SchubertThis type does not perform any changes to file set
14232b15cb3dSCy Schubertmembers during runtime, however it provides an easy way of
14242b15cb3dSCy Schubertseparating files belonging to different
14252b15cb3dSCy Schubert<code>ntpd(1ntpdmdoc)</code>
14262b15cb3dSCy Schubertserver incarnations.
14272b15cb3dSCy SchubertThe set member filename is built by appending a
1428052d159aSCy Schubert&lsquo;.&rsquo;
14292b15cb3dSCy Schubertto concatenated
14302b15cb3dSCy Schubert<kbd>prefix</kbd>
14312b15cb3dSCy Schubertand
14322b15cb3dSCy Schubert<kbd>filename</kbd>
14332b15cb3dSCy Schubertstrings, and
14342b15cb3dSCy Schubertappending the decimal representation of the process ID of the
14352b15cb3dSCy Schubert<code>ntpd(1ntpdmdoc)</code>
14362b15cb3dSCy Schubertserver process.
1437052d159aSCy Schubert</p></dd>
1438052d159aSCy Schubert<dt><code>day</code></dt>
1439052d159aSCy Schubert<dd><p>One file generation set element is created per day.
14402b15cb3dSCy SchubertA day is
14412b15cb3dSCy Schubertdefined as the period between 00:00 and 24:00 UTC.
14422b15cb3dSCy SchubertThe file set
14432b15cb3dSCy Schubertmember suffix consists of a
1444052d159aSCy Schubert&lsquo;.&rsquo;
14452b15cb3dSCy Schubertand a day specification in
14462b15cb3dSCy Schubertthe form
14472b15cb3dSCy Schubert<code>YYYYMMdd</code>.
14482b15cb3dSCy Schubert<code>YYYY</code>
14492b15cb3dSCy Schubertis a 4-digit year number (e.g., 1992).
14502b15cb3dSCy Schubert<code>MM</code>
14512b15cb3dSCy Schubertis a two digit month number.
14522b15cb3dSCy Schubert<code>dd</code>
14532b15cb3dSCy Schubertis a two digit day number.
14542b15cb3dSCy SchubertThus, all information written at 10 December 1992 would end up
14552b15cb3dSCy Schubertin a file named
14562b15cb3dSCy Schubert<kbd>prefix</kbd>
14572b15cb3dSCy Schubert<kbd>filename</kbd>.19921210.
1458052d159aSCy Schubert</p></dd>
1459052d159aSCy Schubert<dt><code>week</code></dt>
1460052d159aSCy Schubert<dd><p>Any file set member contains data related to a certain week of
14612b15cb3dSCy Schuberta year.
14622b15cb3dSCy SchubertThe term week is defined by computing day-of-year
14632b15cb3dSCy Schubertmodulo 7.
14642b15cb3dSCy SchubertElements of such a file generation set are
14652b15cb3dSCy Schubertdistinguished by appending the following suffix to the file set
14662b15cb3dSCy Schubertfilename base: A dot, a 4-digit year number, the letter
14672b15cb3dSCy Schubert<code>W</code>,
14682b15cb3dSCy Schubertand a 2-digit week number.
14692b15cb3dSCy SchubertFor example, information from January,
14702b15cb3dSCy Schubert10th 1992 would end up in a file with suffix
14712b15cb3dSCy Schubert.No . Ns Ar 1992W1 .
1472052d159aSCy Schubert</p></dd>
1473052d159aSCy Schubert<dt><code>month</code></dt>
1474052d159aSCy Schubert<dd><p>One generation file set element is generated per month.
14752b15cb3dSCy SchubertThe
14762b15cb3dSCy Schubertfile name suffix consists of a dot, a 4-digit year number, and
14772b15cb3dSCy Schuberta 2-digit month.
1478052d159aSCy Schubert</p></dd>
1479052d159aSCy Schubert<dt><code>year</code></dt>
1480052d159aSCy Schubert<dd><p>One generation file element is generated per year.
14812b15cb3dSCy SchubertThe filename
14822b15cb3dSCy Schubertsuffix consists of a dot and a 4 digit year number.
1483052d159aSCy Schubert</p></dd>
1484052d159aSCy Schubert<dt><code>age</code></dt>
1485052d159aSCy Schubert<dd><p>This type of file generation sets changes to a new element of
14862b15cb3dSCy Schubertthe file set every 24 hours of server operation.
14872b15cb3dSCy SchubertThe filename
14882b15cb3dSCy Schubertsuffix consists of a dot, the letter
14892b15cb3dSCy Schubert<code>a</code>,
14902b15cb3dSCy Schubertand an 8-digit number.
14912b15cb3dSCy SchubertThis number is taken to be the number of seconds the server is
14922b15cb3dSCy Schubertrunning at the start of the corresponding 24-hour period.
14932b15cb3dSCy SchubertInformation is only written to a file generation by specifying
14942b15cb3dSCy Schubert<code>enable</code>;
14952b15cb3dSCy Schubertoutput is prevented by specifying
14962b15cb3dSCy Schubert<code>disable</code>.
1497052d159aSCy Schubert</p></dd>
14982b15cb3dSCy Schubert</dl>
1499052d159aSCy Schubert</dd>
1500052d159aSCy Schubert<dt><code>link</code> | <code>nolink</code></dt>
1501052d159aSCy Schubert<dd><p>It is convenient to be able to access the current element of a file
15022b15cb3dSCy Schubertgeneration set by a fixed name.
15032b15cb3dSCy SchubertThis feature is enabled by
15042b15cb3dSCy Schubertspecifying
15052b15cb3dSCy Schubert<code>link</code>
15062b15cb3dSCy Schubertand disabled using
15072b15cb3dSCy Schubert<code>nolink</code>.
15082b15cb3dSCy SchubertIf link is specified, a
15092b15cb3dSCy Schuberthard link from the current file set element to a file without
15102b15cb3dSCy Schubertsuffix is created.
15112b15cb3dSCy SchubertWhen there is already a file with this name and
15122b15cb3dSCy Schubertthe number of links of this file is one, it is renamed appending a
15132b15cb3dSCy Schubertdot, the letter
15142b15cb3dSCy Schubert<code>C</code>,
1515e27abb66SXin LIand the pid of the
1516e27abb66SXin LI<code>ntpd(1ntpdmdoc)</code>
1517e27abb66SXin LIserver process.
15182b15cb3dSCy SchubertWhen the
15192b15cb3dSCy Schubertnumber of links is greater than one, the file is unlinked.
15202b15cb3dSCy SchubertThis
15212b15cb3dSCy Schubertallows the current file to be accessed by a constant name.
1522052d159aSCy Schubert</p></dd>
1523052d159aSCy Schubert<dt><code>enable</code> <code>|</code> <code>disable</code></dt>
1524052d159aSCy Schubert<dd><p>Enables or disables the recording function.
1525052d159aSCy Schubert</p></dd>
15262b15cb3dSCy Schubert</dl>
1527052d159aSCy Schubert</dd>
15282b15cb3dSCy Schubert</dl>
1529052d159aSCy Schubert</dd>
15302b15cb3dSCy Schubert</dl>
1531052d159aSCy Schubert<hr>
1532a466cc55SCy Schubert<span id="Access-Control-Support"></span><div class="header">
1533052d159aSCy Schubert<p>
1534052d159aSCy 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>
15352b15cb3dSCy Schubert</div>
1536a466cc55SCy Schubert<span id="Access-Control-Support-1"></span><h4 class="subsection">1.1.4 Access Control Support</h4>
15372b15cb3dSCy Schubert<p>The
15382b15cb3dSCy Schubert<code>ntpd(1ntpdmdoc)</code>
15392b15cb3dSCy Schubertdaemon implements a general purpose address/mask based restriction
15402b15cb3dSCy Schubertlist.
15412b15cb3dSCy SchubertThe list contains address/match entries sorted first
15422b15cb3dSCy Schubertby increasing address values and and then by increasing mask values.
15432b15cb3dSCy SchubertA match occurs when the bitwise AND of the mask and the packet
15442b15cb3dSCy Schubertsource address is equal to the bitwise AND of the mask and
15452b15cb3dSCy Schubertaddress in the list.
15462b15cb3dSCy SchubertThe list is searched in order with the
15472b15cb3dSCy Schubertlast match found defining the restriction flags associated
15482b15cb3dSCy Schubertwith the entry.
15492b15cb3dSCy SchubertAdditional information and examples can be found in the
1550052d159aSCy Schubert&quot;Notes on Configuring NTP and Setting up a NTP Subnet&quot;
15512b15cb3dSCy Schubertpage
15522b15cb3dSCy Schubert(available as part of the HTML documentation
15532b15cb3dSCy Schubertprovided in
1554052d159aSCy Schubert<samp>/usr/share/doc/ntp</samp>).
1555052d159aSCy Schubert</p>
15562b15cb3dSCy Schubert<p>The restriction facility was implemented in conformance
15572b15cb3dSCy Schubertwith the access policies for the original NSFnet backbone
15582b15cb3dSCy Schuberttime servers.
15592b15cb3dSCy SchubertLater the facility was expanded to deflect
15602b15cb3dSCy Schubertcryptographic and clogging attacks.
15612b15cb3dSCy SchubertWhile this facility may
15622b15cb3dSCy Schubertbe useful for keeping unwanted or broken or malicious clients
15632b15cb3dSCy Schubertfrom congesting innocent servers, it should not be considered
15642b15cb3dSCy Schubertan alternative to the NTP authentication facilities.
15652b15cb3dSCy SchubertSource address based restrictions are easily circumvented
15662b15cb3dSCy Schubertby a determined cracker.
1567052d159aSCy Schubert</p>
15682b15cb3dSCy Schubert<p>Clients can be denied service because they are explicitly
15694990d495SXin LIincluded in the restrict list created by the
15704990d495SXin LI<code>restrict</code>
15714990d495SXin LIcommand
15722b15cb3dSCy Schubertor implicitly as the result of cryptographic or rate limit
15732b15cb3dSCy Schubertviolations.
15742b15cb3dSCy SchubertCryptographic violations include certificate
15752b15cb3dSCy Schubertor identity verification failure; rate limit violations generally
15762b15cb3dSCy Schubertresult from defective NTP implementations that send packets
15772b15cb3dSCy Schubertat abusive rates.
15782b15cb3dSCy SchubertSome violations cause denied service
15792b15cb3dSCy Schubertonly for the offending packet, others cause denied service
15802b15cb3dSCy Schubertfor a timed period and others cause the denied service for
1581e27abb66SXin LIan indefinite period.
15822b15cb3dSCy SchubertWhen a client or network is denied access
1583e27abb66SXin LIfor an indefinite period, the only way at present to remove
15842b15cb3dSCy Schubertthe restrictions is by restarting the server.
1585a466cc55SCy Schubert</p><span id="The-Kiss_002dof_002dDeath-Packet"></span><h4 class="subsubsection">1.1.4.1 The Kiss-of-Death Packet</h4>
15862b15cb3dSCy Schubert<p>Ordinarily, packets denied service are simply dropped with no
15872b15cb3dSCy Schubertfurther action except incrementing statistics counters.
15882b15cb3dSCy SchubertSometimes a
15892b15cb3dSCy Schubertmore proactive response is needed, such as a server message that
15902b15cb3dSCy Schubertexplicitly requests the client to stop sending and leave a message
15912b15cb3dSCy Schubertfor the system operator.
15922b15cb3dSCy SchubertA special packet format has been created
1593052d159aSCy Schubertfor this purpose called the &quot;kiss-of-death&quot; (KoD) packet.
15942b15cb3dSCy SchubertKoD packets have the leap bits set unsynchronized and stratum set
15952b15cb3dSCy Schubertto zero and the reference identifier field set to a four-byte
15962b15cb3dSCy SchubertASCII code.
15972b15cb3dSCy SchubertIf the
15982b15cb3dSCy Schubert<code>noserve</code>
15992b15cb3dSCy Schubertor
16002b15cb3dSCy Schubert<code>notrust</code>
16012b15cb3dSCy Schubertflag of the matching restrict list entry is set,
1602052d159aSCy Schubertthe code is &quot;DENY&quot;; if the
16032b15cb3dSCy Schubert<code>limited</code>
16042b15cb3dSCy Schubertflag is set and the rate limit
1605052d159aSCy Schubertis exceeded, the code is &quot;RATE&quot;.
1606052d159aSCy SchubertFinally, if a cryptographic violation occurs, the code is &quot;CRYP&quot;.
1607052d159aSCy Schubert</p>
16082b15cb3dSCy Schubert<p>A client receiving a KoD performs a set of sanity checks to
16092b15cb3dSCy Schubertminimize security exposure, then updates the stratum and
16102b15cb3dSCy Schubertreference identifier peer variables, sets the access
16112b15cb3dSCy Schubertdenied (TEST4) bit in the peer flash variable and sends
16122b15cb3dSCy Schuberta message to the log.
16132b15cb3dSCy SchubertAs long as the TEST4 bit is set,
16142b15cb3dSCy Schubertthe client will send no further packets to the server.
16152b15cb3dSCy SchubertThe only way at present to recover from this condition is
16162b15cb3dSCy Schubertto restart the protocol at both the client and server.
16172b15cb3dSCy SchubertThis
16182b15cb3dSCy Schuberthappens automatically at the client when the association times out.
16192b15cb3dSCy SchubertIt will happen at the server only if the server operator cooperates.
1620a466cc55SCy Schubert</p><span id="Access-Control-Commands"></span><h4 class="subsubsection">1.1.4.2 Access Control Commands</h4>
1621052d159aSCy Schubert<dl compact="compact">
1622052d159aSCy 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>
1623052d159aSCy Schubert<dd><p>Set the parameters of the
16242b15cb3dSCy Schubert<code>limited</code>
16252b15cb3dSCy Schubertfacility which protects the server from
16262b15cb3dSCy Schubertclient abuse.
16272b15cb3dSCy SchubertThe
16282b15cb3dSCy Schubert<code>average</code>
16292b15cb3dSCy Schubertsubcommand specifies the minimum average packet
1630a466cc55SCy Schubertspacing in log2 seconds, defaulting to 3 (8s), while the
16312b15cb3dSCy Schubert<code>minimum</code>
1632a466cc55SCy Schubertsubcommand specifies the minimum packet spacing
1633a466cc55SCy Schubertin seconds, defaulting to 2.
16342b15cb3dSCy SchubertPackets that violate these minima are discarded
1635052d159aSCy Schubertand a kiss-o&rsquo;-death packet returned if enabled.
16364990d495SXin LIThe
16374990d495SXin LI<code>monitor</code>
1638a466cc55SCy Schubertsubcommand indirectly specifies the probability of
1639a466cc55SCy Schubertreplacing the oldest entry from the monitor (MRU)
1640a466cc55SCy Schubertlist of recent requests used to enforce rate controls,
1641a466cc55SCy Schubertwhen that list is at its maximum size. The probability
1642a466cc55SCy Schubertof replacing the oldest entry is the age of that entry
1643a466cc55SCy Schubertin seconds divided by the
1644a466cc55SCy Schubert<code>monitor</code>
1645a466cc55SCy Schubertvalue, default 3000. For example, if the oldest entry
1646a466cc55SCy Schubertin the MRU list represents a request 300 seconds ago,
1647a466cc55SCy Schubertby default the probability of replacing it with an
1648a466cc55SCy Schubertentry representing the client request being processed
1649a466cc55SCy Schubertnow is 10%. Conversely, if the oldest entry is more
1650a466cc55SCy Schubertthan 3000 seconds old, the probability is 100%.
1651052d159aSCy Schubert</p></dd>
1652*f5f40dd6SCy Schubert<dt><code>restrict</code> <kbd>address</kbd> <code>[<code>mask</code> <kbd>mask</kbd>]</code> <code>[<code>ippeerlimit</code> <kbd>int</kbd>]</code> <code>[<kbd>flag</kbd> <kbd>...</kbd>]</code></dt>
1653052d159aSCy Schubert<dd><p>The
16542b15cb3dSCy Schubert<kbd>address</kbd>
16552b15cb3dSCy Schubertargument expressed in
1656*f5f40dd6SCy Schubertnumeric form is the address of a host or network.
16572b15cb3dSCy SchubertAlternatively, the
16582b15cb3dSCy Schubert<kbd>address</kbd>
1659*f5f40dd6SCy Schubertargument can be a valid hostname.  When a hostname
1660*f5f40dd6SCy Schubertis provided, a restriction entry is created for each
1661*f5f40dd6SCy Schubertaddress the hostname resolves to, and any provided
1662*f5f40dd6SCy Schubert<kbd>mask</kbd>
1663*f5f40dd6SCy Schubertis ignored and an individual host mask is
1664*f5f40dd6SCy Schubertused for each entry.
16652b15cb3dSCy SchubertThe
16662b15cb3dSCy Schubert<kbd>mask</kbd>
1667*f5f40dd6SCy Schubertargument expressed in numeric form defaults to
1668*f5f40dd6SCy Schubertall bits lit, meaning that the
16692b15cb3dSCy Schubert<kbd>address</kbd>
16702b15cb3dSCy Schubertis treated as the address of an individual host.
1671*f5f40dd6SCy SchubertA default entry with address and mask all zeroes
16722b15cb3dSCy Schubertis always included and is always the first entry in the list.
16732b15cb3dSCy SchubertNote that text string
16742b15cb3dSCy Schubert<code>default</code>,
16752b15cb3dSCy Schubertwith no mask option, may
16762b15cb3dSCy Schubertbe used to indicate the default entry.
167709100258SXin LIThe
167809100258SXin LI<code>ippeerlimit</code>
167909100258SXin LIdirective limits the number of peer requests for each IP to
168009100258SXin LI<kbd>int</kbd>,
1681052d159aSCy Schubertwhere a value of -1 means &quot;unlimited&quot;, the current default.
1682052d159aSCy SchubertA value of 0 means &quot;none&quot;.
168309100258SXin LIThere would usually be at most 1 peering request per IP,
168409100258SXin LIbut if the remote peering requests are behind a proxy
168509100258SXin LIthere could well be more than 1 per IP.
16862b15cb3dSCy SchubertIn the current implementation,
16872b15cb3dSCy Schubert<code>flag</code>
16882b15cb3dSCy Schubertalways
16892b15cb3dSCy Schubertrestricts access, i.e., an entry with no flags indicates that free
16902b15cb3dSCy Schubertaccess to the server is to be given.
16912b15cb3dSCy SchubertThe flags are not orthogonal,
16922b15cb3dSCy Schubertin that more restrictive flags will often make less restrictive
16932b15cb3dSCy Schubertones redundant.
16942b15cb3dSCy SchubertThe flags can generally be classed into two
16952b15cb3dSCy Schubertcategories, those which restrict time service and those which
16962b15cb3dSCy Schubertrestrict informational queries and attempts to do run-time
16972b15cb3dSCy Schubertreconfiguration of the server.
16982b15cb3dSCy SchubertOne or more of the following flags
16992b15cb3dSCy Schubertmay be specified:
1700052d159aSCy Schubert</p><dl compact="compact">
1701052d159aSCy Schubert<dt><code>ignore</code></dt>
1702052d159aSCy Schubert<dd><p>Deny packets of all kinds, including
17032b15cb3dSCy Schubert<code>ntpq(1ntpqmdoc)</code>
17042b15cb3dSCy Schubertand
17052b15cb3dSCy Schubert<code>ntpdc(1ntpdcmdoc)</code>
17062b15cb3dSCy Schubertqueries.
1707052d159aSCy Schubert</p></dd>
1708052d159aSCy Schubert<dt><code>kod</code></dt>
1709*f5f40dd6SCy Schubert<dd><p>If this flag is set when a rate violation occurs, a kiss-o&rsquo;-death
1710*f5f40dd6SCy Schubert(KoD) packet is sometimes sent.
1711*f5f40dd6SCy SchubertKoD packets are rate limited to no more than one per minimum
1712*f5f40dd6SCy Schubertaverage interpacket spacing, set by
1713*f5f40dd6SCy Schubert<code>discard</code> <code>average</code>
1714*f5f40dd6SCy Schubertdefaulting to 8s.  Otherwise, no response is sent.
1715052d159aSCy Schubert</p></dd>
1716052d159aSCy Schubert<dt><code>limited</code></dt>
1717052d159aSCy Schubert<dd><p>Deny service if the packet spacing violates the lower limits specified
17184990d495SXin LIin the
17194990d495SXin LI<code>discard</code>
17204990d495SXin LIcommand.
17212b15cb3dSCy SchubertA history of clients is kept using the
17222b15cb3dSCy Schubertmonitoring capability of
17232b15cb3dSCy Schubert<code>ntpd(1ntpdmdoc)</code>.
17242b15cb3dSCy SchubertThus, monitoring is always active as
17252b15cb3dSCy Schubertlong as there is a restriction entry with the
17262b15cb3dSCy Schubert<code>limited</code>
17272b15cb3dSCy Schubertflag.
1728052d159aSCy Schubert</p></dd>
1729052d159aSCy Schubert<dt><code>lowpriotrap</code></dt>
1730052d159aSCy Schubert<dd><p>Declare traps set by matching hosts to be low priority.
17312b15cb3dSCy SchubertThe
17322b15cb3dSCy Schubertnumber of traps a server can maintain is limited (the current limit
17332b15cb3dSCy Schubertis 3).
17342b15cb3dSCy SchubertTraps are usually assigned on a first come, first served
17352b15cb3dSCy Schubertbasis, with later trap requestors being denied service.
17362b15cb3dSCy SchubertThis flag
17372b15cb3dSCy Schubertmodifies the assignment algorithm by allowing low priority traps to
17382b15cb3dSCy Schubertbe overridden by later requests for normal priority traps.
1739052d159aSCy Schubert</p></dd>
1740052d159aSCy Schubert<dt><code>noepeer</code></dt>
1741052d159aSCy Schubert<dd><p>Deny ephemeral peer requests,
174209100258SXin LIeven if they come from an authenticated source.
174309100258SXin LINote that the ability to use a symmetric key for authentication may be restricted to
174409100258SXin LIone or more IPs or subnets via the third field of the
1745052d159aSCy Schubert<samp>ntp.keys</samp>
174609100258SXin LIfile.
174709100258SXin LIThis restriction is not enabled by default,
174809100258SXin LIto maintain backward compatability.
174909100258SXin LIExpect
175009100258SXin LI<code>noepeer</code>
175109100258SXin LIto become the default in ntp-4.4.
1752052d159aSCy Schubert</p></dd>
1753052d159aSCy Schubert<dt><code>nomodify</code></dt>
1754052d159aSCy Schubert<dd><p>Deny
17552b15cb3dSCy Schubert<code>ntpq(1ntpqmdoc)</code>
17562b15cb3dSCy Schubertand
17572b15cb3dSCy Schubert<code>ntpdc(1ntpdcmdoc)</code>
17582b15cb3dSCy Schubertqueries which attempt to modify the state of the
17592b15cb3dSCy Schubertserver (i.e., run time reconfiguration).
17602b15cb3dSCy SchubertQueries which return
17612b15cb3dSCy Schubertinformation are permitted.
1762052d159aSCy Schubert</p></dd>
1763052d159aSCy Schubert<dt><code>noquery</code></dt>
1764052d159aSCy Schubert<dd><p>Deny
17652b15cb3dSCy Schubert<code>ntpq(1ntpqmdoc)</code>
17662b15cb3dSCy Schubertand
17672b15cb3dSCy Schubert<code>ntpdc(1ntpdcmdoc)</code>
17682b15cb3dSCy Schubertqueries.
17692b15cb3dSCy SchubertTime service is not affected.
1770052d159aSCy Schubert</p></dd>
1771052d159aSCy Schubert<dt><code>nopeer</code></dt>
1772052d159aSCy Schubert<dd><p>Deny unauthenticated packets which would result in mobilizing a new association.
177309100258SXin LIThis includes
177409100258SXin LIbroadcast and symmetric active packets
177509100258SXin LIwhen a configured association does not exist.
17762b15cb3dSCy SchubertIt also includes
17772b15cb3dSCy Schubert<code>pool</code>
17782b15cb3dSCy Schubertassociations, so if you want to use servers from a
17792b15cb3dSCy Schubert<code>pool</code>
17802b15cb3dSCy Schubertdirective and also want to use
17812b15cb3dSCy Schubert<code>nopeer</code>
1782052d159aSCy Schubertby default, you&rsquo;ll want a
178309100258SXin LI<code>restrict source ...</code>
178409100258SXin LIline as well that does
178509100258SXin LI<em>not</em>
178609100258SXin LIinclude the
17872b15cb3dSCy Schubert<code>nopeer</code>
17882b15cb3dSCy Schubertdirective.
1789052d159aSCy Schubert</p></dd>
1790052d159aSCy Schubert<dt><code>noserve</code></dt>
1791052d159aSCy Schubert<dd><p>Deny all packets except
17922b15cb3dSCy Schubert<code>ntpq(1ntpqmdoc)</code>
17932b15cb3dSCy Schubertand
17942b15cb3dSCy Schubert<code>ntpdc(1ntpdcmdoc)</code>
17952b15cb3dSCy Schubertqueries.
1796052d159aSCy Schubert</p></dd>
1797052d159aSCy Schubert<dt><code>notrap</code></dt>
1798052d159aSCy Schubert<dd><p>Decline to provide mode 6 control message trap service to matching
17992b15cb3dSCy Schuberthosts.
1800e27abb66SXin LIThe trap service is a subsystem of the
1801e27abb66SXin LI<code>ntpq(1ntpqmdoc)</code>
1802e27abb66SXin LIcontrol message
18032b15cb3dSCy Schubertprotocol which is intended for use by remote event logging programs.
1804052d159aSCy Schubert</p></dd>
1805052d159aSCy Schubert<dt><code>notrust</code></dt>
1806052d159aSCy Schubert<dd><p>Deny service unless the packet is cryptographically authenticated.
1807052d159aSCy Schubert</p></dd>
1808052d159aSCy Schubert<dt><code>ntpport</code></dt>
1809052d159aSCy Schubert<dd><p>This is actually a match algorithm modifier, rather than a
18102b15cb3dSCy Schubertrestriction flag.
18112b15cb3dSCy SchubertIts presence causes the restriction entry to be
18122b15cb3dSCy Schubertmatched only if the source port in the packet is the standard NTP
18132b15cb3dSCy SchubertUDP port (123).
1814*f5f40dd6SCy SchubertThere can be two restriction entries with the same IP address if
1815*f5f40dd6SCy Schubertone specifies
18162b15cb3dSCy Schubert<code>ntpport</code>
1817*f5f40dd6SCy Schubertand the other does not.
18182b15cb3dSCy SchubertThe
18192b15cb3dSCy Schubert<code>ntpport</code>
1820*f5f40dd6SCy Schubertentry is considered more specific and
18212b15cb3dSCy Schubertis sorted later in the list.
1822052d159aSCy Schubert</p></dd>
18232d4e511cSCy Schubert<dt><code>serverresponse fuzz</code></dt>
18242d4e511cSCy Schubert<dd><p>When reponding to server requests,
18252d4e511cSCy Schubertfuzz the low order bits of the
18262d4e511cSCy Schubert<code>reftime</code>.
18272d4e511cSCy Schubert</p></dd>
1828052d159aSCy Schubert<dt><code>version</code></dt>
1829052d159aSCy Schubert<dd><p>Deny packets that do not match the current NTP version.
1830052d159aSCy Schubert</p></dd>
18312b15cb3dSCy Schubert</dl>
18322b15cb3dSCy Schubert
18332b15cb3dSCy Schubert<p>Default restriction list entries with the flags ignore, interface,
1834052d159aSCy Schubertntpport, for each of the local host&rsquo;s interface addresses are
1835*f5f40dd6SCy Schubertinserted into the table at startup to prevent ntpd
1836*f5f40dd6SCy Schubertfrom attempting to synchronize to itself, such as with
1837*f5f40dd6SCy Schubert<code>manycastclient</code>
1838*f5f40dd6SCy Schubertwhen
1839*f5f40dd6SCy Schubert<code>manycast</code>
1840*f5f40dd6SCy Schubertis also specified with the same multicast address.
18412b15cb3dSCy SchubertA default entry is also always present, though if it is
18422b15cb3dSCy Schubertotherwise unconfigured; no flags are associated
18432b15cb3dSCy Schubertwith the default entry (i.e., everything besides your own
18442b15cb3dSCy SchubertNTP server is unrestricted).
1845052d159aSCy Schubert</p></dd>
1846*f5f40dd6SCy Schubert<dt><code>delrestrict</code> <code>[source]</code> <kbd>address</kbd></dt>
1847*f5f40dd6SCy Schubert<dd><p>Remove a previously-set restriction.  This is useful for
1848*f5f40dd6SCy Schubertruntime configuration via
1849*f5f40dd6SCy Schubert<code>ntpq(1ntpqmdoc)</code>
1850*f5f40dd6SCy Schubert.  If
1851*f5f40dd6SCy Schubert<code>source</code>
1852*f5f40dd6SCy Schubertis specified, a dynamic restriction created from the
1853*f5f40dd6SCy Schubert<code>restrict</code> <code>source</code>
1854*f5f40dd6SCy Schuberttemplate at the time
1855*f5f40dd6SCy Schubertan association was added is removed.  Without
1856*f5f40dd6SCy Schubert<code>source</code>
1857*f5f40dd6SCy Schuberta static restriction is removed.
1858*f5f40dd6SCy Schubert</p></dd>
18592b15cb3dSCy Schubert</dl>
1860052d159aSCy Schubert<hr>
1861a466cc55SCy Schubert<span id="Automatic-NTP-Configuration-Options"></span><div class="header">
1862052d159aSCy Schubert<p>
1863052d159aSCy 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>
18642b15cb3dSCy Schubert</div>
1865a466cc55SCy Schubert<span id="Automatic-NTP-Configuration-Options-1"></span><h4 class="subsection">1.1.5 Automatic NTP Configuration Options</h4>
1866a466cc55SCy Schubert<span id="Manycasting"></span><h4 class="subsubsection">1.1.5.1 Manycasting</h4>
18672b15cb3dSCy Schubert<p>Manycasting is a automatic discovery and configuration paradigm
18682b15cb3dSCy Schubertnew to NTPv4.
18692b15cb3dSCy SchubertIt is intended as a means for a multicast client
18702b15cb3dSCy Schubertto troll the nearby network neighborhood to find cooperating
18712b15cb3dSCy Schubertmanycast servers, validate them using cryptographic means
18722b15cb3dSCy Schubertand evaluate their time values with respect to other servers
18732b15cb3dSCy Schubertthat might be lurking in the vicinity.
18742b15cb3dSCy SchubertThe intended result is that each manycast client mobilizes
1875052d159aSCy Schubertclient associations with some number of the &quot;best&quot;
18762b15cb3dSCy Schubertof the nearby manycast servers, yet automatically reconfigures
18772b15cb3dSCy Schubertto sustain this number of servers should one or another fail.
1878052d159aSCy Schubert</p>
18792b15cb3dSCy Schubert<p>Note that the manycasting paradigm does not coincide
18802b15cb3dSCy Schubertwith the anycast paradigm described in RFC-1546,
18812b15cb3dSCy Schubertwhich is designed to find a single server from a clique
18822b15cb3dSCy Schubertof servers providing the same service.
18832b15cb3dSCy SchubertThe manycast paradigm is designed to find a plurality
18842b15cb3dSCy Schubertof redundant servers satisfying defined optimality criteria.
1885052d159aSCy Schubert</p>
18862b15cb3dSCy Schubert<p>Manycasting can be used with either symmetric key
18872b15cb3dSCy Schubertor public key cryptography.
18882b15cb3dSCy SchubertThe public key infrastructure (PKI)
18892b15cb3dSCy Schubertoffers the best protection against compromised keys
18902b15cb3dSCy Schubertand is generally considered stronger, at least with relatively
18912b15cb3dSCy Schubertlarge key sizes.
18922b15cb3dSCy SchubertIt is implemented using the Autokey protocol and
18932b15cb3dSCy Schubertthe OpenSSL cryptographic library available from
18942b15cb3dSCy Schubert<code>http://www.openssl.org/</code>.
18952b15cb3dSCy SchubertThe library can also be used with other NTPv4 modes
18962b15cb3dSCy Schubertas well and is highly recommended, especially for broadcast modes.
1897052d159aSCy Schubert</p>
18982b15cb3dSCy Schubert<p>A persistent manycast client association is configured
18994990d495SXin LIusing the
19004990d495SXin LI<code>manycastclient</code>
19014990d495SXin LIcommand, which is similar to the
19024990d495SXin LI<code>server</code>
19034990d495SXin LIcommand but with a multicast (IPv4 class
19042b15cb3dSCy Schubert<code>D</code>
19052b15cb3dSCy Schubertor IPv6 prefix
19062b15cb3dSCy Schubert<code>FF</code>)
19072b15cb3dSCy Schubertgroup address.
19082b15cb3dSCy SchubertThe IANA has designated IPv4 address 224.1.1.1
19092b15cb3dSCy Schubertand IPv6 address FF05::101 (site local) for NTP.
19102b15cb3dSCy SchubertWhen more servers are needed, it broadcasts manycast
19112b15cb3dSCy Schubertclient messages to this address at the minimum feasible rate
19122b15cb3dSCy Schubertand minimum feasible time-to-live (TTL) hops, depending
19132b15cb3dSCy Schuberton how many servers have already been found.
19142b15cb3dSCy SchubertThere can be as many manycast client associations
19152b15cb3dSCy Schubertas different group address, each one serving as a template
19162b15cb3dSCy Schubertfor a future ephemeral unicast client/server association.
1917052d159aSCy Schubert</p>
19182b15cb3dSCy Schubert<p>Manycast servers configured with the
19192b15cb3dSCy Schubert<code>manycastserver</code>
19202b15cb3dSCy Schubertcommand listen on the specified group address for manycast
19212b15cb3dSCy Schubertclient messages.
19222b15cb3dSCy SchubertNote the distinction between manycast client,
19232b15cb3dSCy Schubertwhich actively broadcasts messages, and manycast server,
19242b15cb3dSCy Schubertwhich passively responds to them.
19252b15cb3dSCy SchubertIf a manycast server is
19262b15cb3dSCy Schubertin scope of the current TTL and is itself synchronized
19272b15cb3dSCy Schubertto a valid source and operating at a stratum level equal
19282b15cb3dSCy Schubertto or lower than the manycast client, it replies to the
19292b15cb3dSCy Schubertmanycast client message with an ordinary unicast server message.
1930052d159aSCy Schubert</p>
19312b15cb3dSCy Schubert<p>The manycast client receiving this message mobilizes
19322b15cb3dSCy Schubertan ephemeral client/server association according to the
19332b15cb3dSCy Schubertmatching manycast client template, but only if cryptographically
19342b15cb3dSCy Schubertauthenticated and the server stratum is less than or equal
19352b15cb3dSCy Schubertto the client stratum.
19362b15cb3dSCy SchubertAuthentication is explicitly required
19372b15cb3dSCy Schubertand either symmetric key or public key (Autokey) can be used.
19382b15cb3dSCy SchubertThen, the client polls the server at its unicast address
19392b15cb3dSCy Schubertin burst mode in order to reliably set the host clock
19402b15cb3dSCy Schubertand validate the source.
19412b15cb3dSCy SchubertThis normally results
19422b15cb3dSCy Schubertin a volley of eight client/server at 2-s intervals
19432b15cb3dSCy Schubertduring which both the synchronization and cryptographic
19442b15cb3dSCy Schubertprotocols run concurrently.
19452b15cb3dSCy SchubertFollowing the volley,
19462b15cb3dSCy Schubertthe client runs the NTP intersection and clustering
1947052d159aSCy Schubertalgorithms, which act to discard all but the &quot;best&quot;
19482b15cb3dSCy Schubertassociations according to stratum and synchronization
19492b15cb3dSCy Schubertdistance.
19502b15cb3dSCy SchubertThe surviving associations then continue
19512b15cb3dSCy Schubertin ordinary client/server mode.
1952052d159aSCy Schubert</p>
19532b15cb3dSCy Schubert<p>The manycast client polling strategy is designed to reduce
19542b15cb3dSCy Schubertas much as possible the volume of manycast client messages
19552b15cb3dSCy Schubertand the effects of implosion due to near-simultaneous
19562b15cb3dSCy Schubertarrival of manycast server messages.
19572b15cb3dSCy SchubertThe strategy is determined by the
19582b15cb3dSCy Schubert<code>manycastclient</code>,
19592b15cb3dSCy Schubert<code>tos</code>
19602b15cb3dSCy Schubertand
19612b15cb3dSCy Schubert<code>ttl</code>
19622b15cb3dSCy Schubertconfiguration commands.
19632b15cb3dSCy SchubertThe manycast poll interval is
19642b15cb3dSCy Schubertnormally eight times the system poll interval,
19652b15cb3dSCy Schubertwhich starts out at the
19662b15cb3dSCy Schubert<code>minpoll</code>
19672b15cb3dSCy Schubertvalue specified in the
19682b15cb3dSCy Schubert<code>manycastclient</code>,
19692b15cb3dSCy Schubertcommand and, under normal circumstances, increments to the
19702b15cb3dSCy Schubert<code>maxpolll</code>
19712b15cb3dSCy Schubertvalue specified in this command.
19722b15cb3dSCy SchubertInitially, the TTL is
19734990d495SXin LIset at the minimum hops specified by the
19744990d495SXin LI<code>ttl</code>
19754990d495SXin LIcommand.
19762b15cb3dSCy SchubertAt each retransmission the TTL is increased until reaching
19772b15cb3dSCy Schubertthe maximum hops specified by this command or a sufficient
19782b15cb3dSCy Schubertnumber client associations have been found.
19792b15cb3dSCy SchubertFurther retransmissions use the same TTL.
1980052d159aSCy Schubert</p>
19812b15cb3dSCy Schubert<p>The quality and reliability of the suite of associations
19822b15cb3dSCy Schubertdiscovered by the manycast client is determined by the NTP
19832b15cb3dSCy Schubertmitigation algorithms and the
19842b15cb3dSCy Schubert<code>minclock</code>
19852b15cb3dSCy Schubertand
19862b15cb3dSCy Schubert<code>minsane</code>
19872b15cb3dSCy Schubertvalues specified in the
19882b15cb3dSCy Schubert<code>tos</code>
19892b15cb3dSCy Schubertconfiguration command.
19902b15cb3dSCy SchubertAt least
19912b15cb3dSCy Schubert<code>minsane</code>
19922b15cb3dSCy Schubertcandidate servers must be available and the mitigation
19932b15cb3dSCy Schubertalgorithms produce at least
19942b15cb3dSCy Schubert<code>minclock</code>
19952b15cb3dSCy Schubertsurvivors in order to synchronize the clock.
19962b15cb3dSCy SchubertByzantine agreement principles require at least four
19972b15cb3dSCy Schubertcandidates in order to correctly discard a single falseticker.
19982b15cb3dSCy SchubertFor legacy purposes,
19992b15cb3dSCy Schubert<code>minsane</code>
20002b15cb3dSCy Schubertdefaults to 1 and
20012b15cb3dSCy Schubert<code>minclock</code>
20022b15cb3dSCy Schubertdefaults to 3.
20032b15cb3dSCy SchubertFor manycast service
20042b15cb3dSCy Schubert<code>minsane</code>
20052b15cb3dSCy Schubertshould be explicitly set to 4, assuming at least that
20062b15cb3dSCy Schubertnumber of servers are available.
2007052d159aSCy Schubert</p>
20082b15cb3dSCy Schubert<p>If at least
20092b15cb3dSCy Schubert<code>minclock</code>
20102b15cb3dSCy Schubertservers are found, the manycast poll interval is immediately
20112b15cb3dSCy Schubertset to eight times
20122b15cb3dSCy Schubert<code>maxpoll</code>.
20132b15cb3dSCy SchubertIf less than
20142b15cb3dSCy Schubert<code>minclock</code>
20152b15cb3dSCy Schubertservers are found when the TTL has reached the maximum hops,
20162b15cb3dSCy Schubertthe manycast poll interval is doubled.
20172b15cb3dSCy SchubertFor each transmission
20182b15cb3dSCy Schubertafter that, the poll interval is doubled again until
20192b15cb3dSCy Schubertreaching the maximum of eight times
20202b15cb3dSCy Schubert<code>maxpoll</code>.
20212b15cb3dSCy SchubertFurther transmissions use the same poll interval and
20222b15cb3dSCy SchubertTTL values.
20232b15cb3dSCy SchubertNote that while all this is going on,
20242b15cb3dSCy Schuberteach client/server association found is operating normally
20252b15cb3dSCy Schubertit the system poll interval.
2026052d159aSCy Schubert</p>
20272b15cb3dSCy Schubert<p>Administratively scoped multicast boundaries are normally
20282b15cb3dSCy Schubertspecified by the network router configuration and,
20292b15cb3dSCy Schubertin the case of IPv6, the link/site scope prefix.
20302b15cb3dSCy SchubertBy default, the increment for TTL hops is 32 starting
20312b15cb3dSCy Schubertfrom 31; however, the
20322b15cb3dSCy Schubert<code>ttl</code>
20332b15cb3dSCy Schubertconfiguration command can be
20342b15cb3dSCy Schubertused to modify the values to match the scope rules.
2035052d159aSCy Schubert</p>
20362b15cb3dSCy Schubert<p>It is often useful to narrow the range of acceptable
20372b15cb3dSCy Schubertservers which can be found by manycast client associations.
20382b15cb3dSCy SchubertBecause manycast servers respond only when the client
20392b15cb3dSCy Schubertstratum is equal to or greater than the server stratum,
20402b15cb3dSCy Schubertprimary (stratum 1) servers fill find only primary servers
20412b15cb3dSCy Schubertin TTL range, which is probably the most common objective.
20422b15cb3dSCy SchubertHowever, unless configured otherwise, all manycast clients
20432b15cb3dSCy Schubertin TTL range will eventually find all primary servers
20442b15cb3dSCy Schubertin TTL range, which is probably not the most common
20452b15cb3dSCy Schubertobjective in large networks.
20462b15cb3dSCy SchubertThe
20472b15cb3dSCy Schubert<code>tos</code>
20482b15cb3dSCy Schubertcommand can be used to modify this behavior.
20492b15cb3dSCy SchubertServers with stratum below
20502b15cb3dSCy Schubert<code>floor</code>
20512b15cb3dSCy Schubertor above
20522b15cb3dSCy Schubert<code>ceiling</code>
20532b15cb3dSCy Schubertspecified in the
20542b15cb3dSCy Schubert<code>tos</code>
20552b15cb3dSCy Schubertcommand are strongly discouraged during the selection
20562b15cb3dSCy Schubertprocess; however, these servers may be temporally
20572b15cb3dSCy Schubertaccepted if the number of servers within TTL range is
20582b15cb3dSCy Schubertless than
20592b15cb3dSCy Schubert<code>minclock</code>.
2060052d159aSCy Schubert</p>
20612b15cb3dSCy Schubert<p>The above actions occur for each manycast client message,
20622b15cb3dSCy Schubertwhich repeats at the designated poll interval.
20632b15cb3dSCy SchubertHowever, once the ephemeral client association is mobilized,
20642b15cb3dSCy Schubertsubsequent manycast server replies are discarded,
20652b15cb3dSCy Schubertsince that would result in a duplicate association.
20662b15cb3dSCy SchubertIf during a poll interval the number of client associations
20672b15cb3dSCy Schubertfalls below
20682b15cb3dSCy Schubert<code>minclock</code>,
20692b15cb3dSCy Schubertall manycast client prototype associations are reset
20702b15cb3dSCy Schubertto the initial poll interval and TTL hops and operation
20712b15cb3dSCy Schubertresumes from the beginning.
20722b15cb3dSCy SchubertIt is important to avoid
20732b15cb3dSCy Schubertfrequent manycast client messages, since each one requires
20742b15cb3dSCy Schubertall manycast servers in TTL range to respond.
20752b15cb3dSCy SchubertThe result could well be an implosion, either minor or major,
20762b15cb3dSCy Schubertdepending on the number of servers in range.
20772b15cb3dSCy SchubertThe recommended value for
20782b15cb3dSCy Schubert<code>maxpoll</code>
20792b15cb3dSCy Schubertis 12 (4,096 s).
2080052d159aSCy Schubert</p>
20812b15cb3dSCy Schubert<p>It is possible and frequently useful to configure a host
20822b15cb3dSCy Schubertas both manycast client and manycast server.
20832b15cb3dSCy SchubertA number of hosts configured this way and sharing a common
20842b15cb3dSCy Schubertgroup address will automatically organize themselves
20852b15cb3dSCy Schubertin an optimum configuration based on stratum and
20862b15cb3dSCy Schubertsynchronization distance.
20872b15cb3dSCy SchubertFor example, consider an NTP
20882b15cb3dSCy Schubertsubnet of two primary servers and a hundred or more
20892b15cb3dSCy Schubertdependent clients.
20902b15cb3dSCy SchubertWith two exceptions, all servers
20912b15cb3dSCy Schubertand clients have identical configuration files including both
20922b15cb3dSCy Schubert<code>multicastclient</code>
20932b15cb3dSCy Schubertand
20942b15cb3dSCy Schubert<code>multicastserver</code>
20952b15cb3dSCy Schubertcommands using, for instance, multicast group address
20962b15cb3dSCy Schubert239.1.1.1.
20972b15cb3dSCy SchubertThe only exception is that each primary server
20982b15cb3dSCy Schubertconfiguration file must include commands for the primary
20992b15cb3dSCy Schubertreference source such as a GPS receiver.
2100052d159aSCy Schubert</p>
21012b15cb3dSCy Schubert<p>The remaining configuration files for all secondary
21022b15cb3dSCy Schubertservers and clients have the same contents, except for the
21032b15cb3dSCy Schubert<code>tos</code>
21042b15cb3dSCy Schubertcommand, which is specific for each stratum level.
21052b15cb3dSCy SchubertFor stratum 1 and stratum 2 servers, that command is
21062b15cb3dSCy Schubertnot necessary.
21072b15cb3dSCy SchubertFor stratum 3 and above servers the
21082b15cb3dSCy Schubert<code>floor</code>
21092b15cb3dSCy Schubertvalue is set to the intended stratum number.
21102b15cb3dSCy SchubertThus, all stratum 3 configuration files are identical,
21112b15cb3dSCy Schubertall stratum 4 files are identical and so forth.
2112052d159aSCy Schubert</p>
21132b15cb3dSCy Schubert<p>Once operations have stabilized in this scenario,
21142b15cb3dSCy Schubertthe primary servers will find the primary reference source
21152b15cb3dSCy Schubertand each other, since they both operate at the same
21162b15cb3dSCy Schubertstratum (1), but not with any secondary server or client,
21172b15cb3dSCy Schubertsince these operate at a higher stratum.
21182b15cb3dSCy SchubertThe secondary
21192b15cb3dSCy Schubertservers will find the servers at the same stratum level.
21202b15cb3dSCy SchubertIf one of the primary servers loses its GPS receiver,
21212b15cb3dSCy Schubertit will continue to operate as a client and other clients
21222b15cb3dSCy Schubertwill time out the corresponding association and
21232b15cb3dSCy Schubertre-associate accordingly.
2124052d159aSCy Schubert</p>
21252b15cb3dSCy Schubert<p>Some administrators prefer to avoid running
21262b15cb3dSCy Schubert<code>ntpd(1ntpdmdoc)</code>
21272b15cb3dSCy Schubertcontinuously and run either
21289034852cSGleb Smirnoff<code>sntp(1sntpmdoc)</code>
21292b15cb3dSCy Schubertor
21302b15cb3dSCy Schubert<code>ntpd(1ntpdmdoc)</code>
21312b15cb3dSCy Schubert<code>-q</code>
21322b15cb3dSCy Schubertas a cron job.
21332b15cb3dSCy SchubertIn either case the servers must be
21342b15cb3dSCy Schubertconfigured in advance and the program fails if none are
21352b15cb3dSCy Schubertavailable when the cron job runs.
21362b15cb3dSCy SchubertA really slick
21372b15cb3dSCy Schubertapplication of manycast is with
21382b15cb3dSCy Schubert<code>ntpd(1ntpdmdoc)</code>
21392b15cb3dSCy Schubert<code>-q</code>.
21402b15cb3dSCy SchubertThe program wakes up, scans the local landscape looking
21412b15cb3dSCy Schubertfor the usual suspects, selects the best from among
21422b15cb3dSCy Schubertthe rascals, sets the clock and then departs.
21432b15cb3dSCy SchubertServers do not have to be configured in advance and
21442b15cb3dSCy Schubertall clients throughout the network can have the same
21452b15cb3dSCy Schubertconfiguration file.
2146a466cc55SCy Schubert</p><span id="Manycast-Interactions-with-Autokey"></span><h4 class="subsubsection">1.1.5.2 Manycast Interactions with Autokey</h4>
21472b15cb3dSCy Schubert<p>Each time a manycast client sends a client mode packet
21482b15cb3dSCy Schubertto a multicast group address, all manycast servers
21492b15cb3dSCy Schubertin scope generate a reply including the host name
21502b15cb3dSCy Schubertand status word.
21512b15cb3dSCy SchubertThe manycast clients then run
21522b15cb3dSCy Schubertthe Autokey protocol, which collects and verifies
21532b15cb3dSCy Schubertall certificates involved.
21542b15cb3dSCy SchubertFollowing the burst interval
21552b15cb3dSCy Schubertall but three survivors are cast off,
21562b15cb3dSCy Schubertbut the certificates remain in the local cache.
21572b15cb3dSCy SchubertIt often happens that several complete signing trails
21582b15cb3dSCy Schubertfrom the client to the primary servers are collected in this way.
2159052d159aSCy Schubert</p>
21602b15cb3dSCy Schubert<p>About once an hour or less often if the poll interval
21612b15cb3dSCy Schubertexceeds this, the client regenerates the Autokey key list.
21622b15cb3dSCy SchubertThis is in general transparent in client/server mode.
21632b15cb3dSCy SchubertHowever, about once per day the server private value
21642b15cb3dSCy Schubertused to generate cookies is refreshed along with all
21652b15cb3dSCy Schubertmanycast client associations.
21662b15cb3dSCy SchubertIn this case all
21672b15cb3dSCy Schubertcryptographic values including certificates is refreshed.
21682b15cb3dSCy SchubertIf a new certificate has been generated since
21692b15cb3dSCy Schubertthe last refresh epoch, it will automatically revoke
21702b15cb3dSCy Schubertall prior certificates that happen to be in the
21712b15cb3dSCy Schubertcertificate cache.
21722b15cb3dSCy SchubertAt the same time, the manycast
21732b15cb3dSCy Schubertscheme starts all over from the beginning and
21742b15cb3dSCy Schubertthe expanding ring shrinks to the minimum and increments
21752b15cb3dSCy Schubertfrom there while collecting all servers in scope.
2176a466cc55SCy Schubert</p><span id="Broadcast-Options"></span><h4 class="subsubsection">1.1.5.3 Broadcast Options</h4>
2177052d159aSCy Schubert<dl compact="compact">
2178052d159aSCy Schubert<dt><code>tos</code> <code>[<code>bcpollbstep</code> <kbd>gate</kbd>]</code></dt>
2179052d159aSCy Schubert<dd><p>This command provides a way to delay,
2180f391d6bcSXin LIby the specified number of broadcast poll intervals,
2181f391d6bcSXin LIbelieving backward time steps from a broadcast server.
2182f391d6bcSXin LIBroadcast time networks are expected to be trusted.
2183052d159aSCy SchubertIn the event a broadcast server&rsquo;s time is stepped backwards,
2184f391d6bcSXin LIthere is clear benefit to having the clients notice this change
2185f391d6bcSXin LIas soon as possible.
2186f391d6bcSXin LIAttacks such as replay attacks can happen, however,
2187f391d6bcSXin LIand even though there are a number of protections built in to
2188f391d6bcSXin LIbroadcast mode, attempts to perform a replay attack are possible.
2189f391d6bcSXin LIThis value defaults to 0, but can be changed
2190f391d6bcSXin LIto any number of poll intervals between 0 and 4.
2191052d159aSCy Schubert</p></dd>
219209100258SXin LI</dl>
2193a466cc55SCy Schubert<span id="Manycast-Options"></span><h4 class="subsubsection">1.1.5.4 Manycast Options</h4>
2194052d159aSCy Schubert<dl compact="compact">
2195052d159aSCy 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>
2196052d159aSCy Schubert<dd><p>This command affects the clock selection and clustering
21972b15cb3dSCy Schubertalgorithms.
21982b15cb3dSCy SchubertIt can be used to select the quality and
21992b15cb3dSCy Schubertquantity of peers used to synchronize the system clock
22002b15cb3dSCy Schubertand is most useful in manycast mode.
22012b15cb3dSCy SchubertThe variables operate
22022b15cb3dSCy Schubertas follows:
2203052d159aSCy Schubert</p><dl compact="compact">
2204052d159aSCy Schubert<dt><code>ceiling</code> <kbd>ceiling</kbd></dt>
2205052d159aSCy Schubert<dd><p>Peers with strata above
22062b15cb3dSCy Schubert<code>ceiling</code>
22072b15cb3dSCy Schubertwill be discarded if there are at least
22082b15cb3dSCy Schubert<code>minclock</code>
22092b15cb3dSCy Schubertpeers remaining.
22102b15cb3dSCy SchubertThis value defaults to 15, but can be changed
22112b15cb3dSCy Schubertto any number from 1 to 15.
2212052d159aSCy Schubert</p></dd>
2213052d159aSCy Schubert<dt><code>cohort</code> <code>{0 | 1}</code></dt>
2214052d159aSCy Schubert<dd><p>This is a binary flag which enables (0) or disables (1)
22152b15cb3dSCy Schubertmanycast server replies to manycast clients with the same
22162b15cb3dSCy Schubertstratum level.
22172b15cb3dSCy SchubertThis is useful to reduce implosions where
22182b15cb3dSCy Schubertlarge numbers of clients with the same stratum level
22192b15cb3dSCy Schubertare present.
22202b15cb3dSCy SchubertThe default is to enable these replies.
2221052d159aSCy Schubert</p></dd>
2222052d159aSCy Schubert<dt><code>floor</code> <kbd>floor</kbd></dt>
2223052d159aSCy Schubert<dd><p>Peers with strata below
22242b15cb3dSCy Schubert<code>floor</code>
22252b15cb3dSCy Schubertwill be discarded if there are at least
22262b15cb3dSCy Schubert<code>minclock</code>
22272b15cb3dSCy Schubertpeers remaining.
22282b15cb3dSCy SchubertThis value defaults to 1, but can be changed
22292b15cb3dSCy Schubertto any number from 1 to 15.
2230052d159aSCy Schubert</p></dd>
2231052d159aSCy Schubert<dt><code>minclock</code> <kbd>minclock</kbd></dt>
2232052d159aSCy Schubert<dd><p>The clustering algorithm repeatedly casts out outlier
22332b15cb3dSCy Schubertassociations until no more than
22342b15cb3dSCy Schubert<code>minclock</code>
22352b15cb3dSCy Schubertassociations remain.
22362b15cb3dSCy SchubertThis value defaults to 3,
22372b15cb3dSCy Schubertbut can be changed to any number from 1 to the number of
22382b15cb3dSCy Schubertconfigured sources.
2239052d159aSCy Schubert</p></dd>
2240052d159aSCy Schubert<dt><code>minsane</code> <kbd>minsane</kbd></dt>
2241052d159aSCy Schubert<dd><p>This is the minimum number of candidates available
22422b15cb3dSCy Schubertto the clock selection algorithm in order to produce
22432b15cb3dSCy Schubertone or more truechimers for the clustering algorithm.
22442b15cb3dSCy SchubertIf fewer than this number are available, the clock is
22452b15cb3dSCy Schubertundisciplined and allowed to run free.
22462b15cb3dSCy SchubertThe default is 1
22472b15cb3dSCy Schubertfor legacy purposes.
22482b15cb3dSCy SchubertHowever, according to principles of
22492b15cb3dSCy SchubertByzantine agreement,
22502b15cb3dSCy Schubert<code>minsane</code>
22512b15cb3dSCy Schubertshould be at least 4 in order to detect and discard
22522b15cb3dSCy Schuberta single falseticker.
2253052d159aSCy Schubert</p></dd>
22542b15cb3dSCy Schubert</dl>
2255052d159aSCy Schubert</dd>
2256052d159aSCy Schubert<dt><code>ttl</code> <kbd>hop</kbd> <kbd>...</kbd></dt>
2257052d159aSCy Schubert<dd><p>This command specifies a list of TTL values in increasing
22582b15cb3dSCy Schubertorder, up to 8 values can be specified.
22592b15cb3dSCy SchubertIn manycast mode these values are used in turn
22602b15cb3dSCy Schubertin an expanding-ring search.
22612b15cb3dSCy SchubertThe default is eight
22622b15cb3dSCy Schubertmultiples of 32 starting at 31.
2263052d159aSCy Schubert</p></dd>
22642b15cb3dSCy Schubert</dl>
2265052d159aSCy Schubert<hr>
2266a466cc55SCy Schubert<span id="Reference-Clock-Support"></span><div class="header">
2267052d159aSCy Schubert<p>
2268052d159aSCy 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>
22692b15cb3dSCy Schubert</div>
2270a466cc55SCy Schubert<span id="Reference-Clock-Support-1"></span><h4 class="subsection">1.1.6 Reference Clock Support</h4>
22712b15cb3dSCy Schubert<p>The NTP Version 4 daemon supports some three dozen different radio,
22722b15cb3dSCy Schubertsatellite and modem reference clocks plus a special pseudo-clock
22732b15cb3dSCy Schubertused for backup or when no other clock source is available.
22742b15cb3dSCy SchubertDetailed descriptions of individual device drivers and options can
22752b15cb3dSCy Schubertbe found in the
2276052d159aSCy Schubert&quot;Reference Clock Drivers&quot;
22772b15cb3dSCy Schubertpage
22782b15cb3dSCy Schubert(available as part of the HTML documentation
22792b15cb3dSCy Schubertprovided in
2280052d159aSCy Schubert<samp>/usr/share/doc/ntp</samp>).
22812b15cb3dSCy SchubertAdditional information can be found in the pages linked
22822b15cb3dSCy Schubertthere, including the
2283052d159aSCy Schubert&quot;Debugging Hints for Reference Clock Drivers&quot;
22842b15cb3dSCy Schubertand
2285052d159aSCy Schubert&quot;How To Write a Reference Clock Driver&quot;
22862b15cb3dSCy Schubertpages
22872b15cb3dSCy Schubert(available as part of the HTML documentation
22882b15cb3dSCy Schubertprovided in
2289052d159aSCy Schubert<samp>/usr/share/doc/ntp</samp>).
22902b15cb3dSCy SchubertIn addition, support for a PPS
22912b15cb3dSCy Schubertsignal is available as described in the
2292052d159aSCy Schubert&quot;Pulse-per-second (PPS) Signal Interfacing&quot;
22932b15cb3dSCy Schubertpage
22942b15cb3dSCy Schubert(available as part of the HTML documentation
22952b15cb3dSCy Schubertprovided in
2296052d159aSCy Schubert<samp>/usr/share/doc/ntp</samp>).
22972b15cb3dSCy SchubertMany
22982b15cb3dSCy Schubertdrivers support special line discipline/streams modules which can
22992b15cb3dSCy Schubertsignificantly improve the accuracy using the driver.
23002b15cb3dSCy SchubertThese are
23012b15cb3dSCy Schubertdescribed in the
2302052d159aSCy Schubert&quot;Line Disciplines and Streams Drivers&quot;
23032b15cb3dSCy Schubertpage
23042b15cb3dSCy Schubert(available as part of the HTML documentation
23052b15cb3dSCy Schubertprovided in
2306052d159aSCy Schubert<samp>/usr/share/doc/ntp</samp>).
2307052d159aSCy Schubert</p>
23082b15cb3dSCy Schubert<p>A reference clock will generally (though not always) be a radio
23092b15cb3dSCy Schuberttimecode receiver which is synchronized to a source of standard
23102b15cb3dSCy Schuberttime such as the services offered by the NRC in Canada and NIST and
23112b15cb3dSCy SchubertUSNO in the US.
23122b15cb3dSCy SchubertThe interface between the computer and the timecode
23132b15cb3dSCy Schubertreceiver is device dependent, but is usually a serial port.
23142b15cb3dSCy SchubertA
23152b15cb3dSCy Schubertdevice driver specific to each reference clock must be selected and
23162b15cb3dSCy Schubertcompiled in the distribution; however, most common radio, satellite
23172b15cb3dSCy Schubertand modem clocks are included by default.
23182b15cb3dSCy SchubertNote that an attempt to
23192b15cb3dSCy Schubertconfigure a reference clock when the driver has not been compiled
23202b15cb3dSCy Schubertor the hardware port has not been appropriately configured results
23212b15cb3dSCy Schubertin a scalding remark to the system log file, but is otherwise non
23222b15cb3dSCy Schuberthazardous.
2323052d159aSCy Schubert</p>
23242b15cb3dSCy Schubert<p>For the purposes of configuration,
23252b15cb3dSCy Schubert<code>ntpd(1ntpdmdoc)</code>
23262b15cb3dSCy Schuberttreats
23272b15cb3dSCy Schubertreference clocks in a manner analogous to normal NTP peers as much
23282b15cb3dSCy Schubertas possible.
23292b15cb3dSCy SchubertReference clocks are identified by a syntactically
23302b15cb3dSCy Schubertcorrect but invalid IP address, in order to distinguish them from
23312b15cb3dSCy Schubertnormal NTP peers.
23322b15cb3dSCy SchubertReference clock addresses are of the form
23332b15cb3dSCy Schubert<code>127.127.</code><kbd>t</kbd>.<kbd>u</kbd>,
23342b15cb3dSCy Schubertwhere
23352b15cb3dSCy Schubert<kbd>t</kbd>
23362b15cb3dSCy Schubertis an integer
23372b15cb3dSCy Schubertdenoting the clock type and
23382b15cb3dSCy Schubert<kbd>u</kbd>
23392b15cb3dSCy Schubertindicates the unit
23402b15cb3dSCy Schubertnumber in the range 0-3.
23412b15cb3dSCy SchubertWhile it may seem overkill, it is in fact
23422b15cb3dSCy Schubertsometimes useful to configure multiple reference clocks of the same
23432b15cb3dSCy Schuberttype, in which case the unit numbers must be unique.
2344052d159aSCy Schubert</p>
23452b15cb3dSCy Schubert<p>The
23462b15cb3dSCy Schubert<code>server</code>
23472b15cb3dSCy Schubertcommand is used to configure a reference
23482b15cb3dSCy Schubertclock, where the
23492b15cb3dSCy Schubert<kbd>address</kbd>
23502b15cb3dSCy Schubertargument in that command
23512b15cb3dSCy Schubertis the clock address.
23522b15cb3dSCy SchubertThe
23532b15cb3dSCy Schubert<code>key</code>,
23542b15cb3dSCy Schubert<code>version</code>
23552b15cb3dSCy Schubertand
23562b15cb3dSCy Schubert<code>ttl</code>
23572b15cb3dSCy Schubertoptions are not used for reference clock support.
23582b15cb3dSCy SchubertThe
23592b15cb3dSCy Schubert<code>mode</code>
23602b15cb3dSCy Schubertoption is added for reference clock support, as
23612b15cb3dSCy Schubertdescribed below.
23622b15cb3dSCy SchubertThe
23632b15cb3dSCy Schubert<code>prefer</code>
23642b15cb3dSCy Schubertoption can be useful to
23652b15cb3dSCy Schubertpersuade the server to cherish a reference clock with somewhat more
23662b15cb3dSCy Schubertenthusiasm than other reference clocks or peers.
23672b15cb3dSCy SchubertFurther
23682b15cb3dSCy Schubertinformation on this option can be found in the
2369052d159aSCy Schubert&quot;Mitigation Rules and the prefer Keyword&quot;
23702b15cb3dSCy Schubert(available as part of the HTML documentation
23712b15cb3dSCy Schubertprovided in
2372052d159aSCy Schubert<samp>/usr/share/doc/ntp</samp>)
23732b15cb3dSCy Schubertpage.
23742b15cb3dSCy SchubertThe
23752b15cb3dSCy Schubert<code>minpoll</code>
23762b15cb3dSCy Schubertand
23772b15cb3dSCy Schubert<code>maxpoll</code>
23782b15cb3dSCy Schubertoptions have
23792b15cb3dSCy Schubertmeaning only for selected clock drivers.
23802b15cb3dSCy SchubertSee the individual clock
23812b15cb3dSCy Schubertdriver document pages for additional information.
2382052d159aSCy Schubert</p>
23832b15cb3dSCy Schubert<p>The
23842b15cb3dSCy Schubert<code>fudge</code>
23852b15cb3dSCy Schubertcommand is used to provide additional
23862b15cb3dSCy Schubertinformation for individual clock drivers and normally follows
23872b15cb3dSCy Schubertimmediately after the
23882b15cb3dSCy Schubert<code>server</code>
23892b15cb3dSCy Schubertcommand.
23902b15cb3dSCy SchubertThe
23912b15cb3dSCy Schubert<kbd>address</kbd>
23922b15cb3dSCy Schubertargument specifies the clock address.
23932b15cb3dSCy SchubertThe
23942b15cb3dSCy Schubert<code>refid</code>
23952b15cb3dSCy Schubertand
23962b15cb3dSCy Schubert<code>stratum</code>
23972b15cb3dSCy Schubertoptions can be used to
23982b15cb3dSCy Schubertoverride the defaults for the device.
23992b15cb3dSCy SchubertThere are two optional
24002b15cb3dSCy Schubertdevice-dependent time offsets and four flags that can be included
24012b15cb3dSCy Schubertin the
24022b15cb3dSCy Schubert<code>fudge</code>
24032b15cb3dSCy Schubertcommand as well.
2404052d159aSCy Schubert</p>
24052b15cb3dSCy Schubert<p>The stratum number of a reference clock is by default zero.
24062b15cb3dSCy SchubertSince the
24072b15cb3dSCy Schubert<code>ntpd(1ntpdmdoc)</code>
24082b15cb3dSCy Schubertdaemon adds one to the stratum of each
24092b15cb3dSCy Schubertpeer, a primary server ordinarily displays an external stratum of
24102b15cb3dSCy Schubertone.
24112b15cb3dSCy SchubertIn order to provide engineered backups, it is often useful to
24122b15cb3dSCy Schubertspecify the reference clock stratum as greater than zero.
24132b15cb3dSCy SchubertThe
24142b15cb3dSCy Schubert<code>stratum</code>
24152b15cb3dSCy Schubertoption is used for this purpose.
24162b15cb3dSCy SchubertAlso, in cases
24172b15cb3dSCy Schubertinvolving both a reference clock and a pulse-per-second (PPS)
24182b15cb3dSCy Schubertdiscipline signal, it is useful to specify the reference clock
24192b15cb3dSCy Schubertidentifier as other than the default, depending on the driver.
24202b15cb3dSCy SchubertThe
24212b15cb3dSCy Schubert<code>refid</code>
24222b15cb3dSCy Schubertoption is used for this purpose.
24232b15cb3dSCy SchubertExcept where noted,
24242b15cb3dSCy Schubertthese options apply to all clock drivers.
2425a466cc55SCy Schubert</p><span id="Reference-Clock-Commands"></span><h4 class="subsubsection">1.1.6.1 Reference Clock Commands</h4>
2426052d159aSCy Schubert<dl compact="compact">
2427052d159aSCy 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>
2428052d159aSCy Schubert<dd><p>This command can be used to configure reference clocks in
24292b15cb3dSCy Schubertspecial ways.
24302b15cb3dSCy SchubertThe options are interpreted as follows:
2431052d159aSCy Schubert</p><dl compact="compact">
2432052d159aSCy Schubert<dt><code>prefer</code></dt>
2433052d159aSCy Schubert<dd><p>Marks the reference clock as preferred.
24342b15cb3dSCy SchubertAll other things being
24352b15cb3dSCy Schubertequal, this host will be chosen for synchronization among a set of
24362b15cb3dSCy Schubertcorrectly operating hosts.
24372b15cb3dSCy SchubertSee the
2438052d159aSCy Schubert&quot;Mitigation Rules and the prefer Keyword&quot;
24392b15cb3dSCy Schubertpage
24402b15cb3dSCy Schubert(available as part of the HTML documentation
24412b15cb3dSCy Schubertprovided in
2442052d159aSCy Schubert<samp>/usr/share/doc/ntp</samp>)
24432b15cb3dSCy Schubertfor further information.
2444052d159aSCy Schubert</p></dd>
2445052d159aSCy Schubert<dt><code>mode</code> <kbd>int</kbd></dt>
2446052d159aSCy Schubert<dd><p>Specifies a mode number which is interpreted in a
24472b15cb3dSCy Schubertdevice-specific fashion.
24482b15cb3dSCy SchubertFor instance, it selects a dialing
24492b15cb3dSCy Schubertprotocol in the ACTS driver and a device subtype in the
24502b15cb3dSCy Schubertparse
24512b15cb3dSCy Schubertdrivers.
2452052d159aSCy Schubert</p></dd>
2453052d159aSCy Schubert<dt><code>minpoll</code> <kbd>int</kbd></dt>
2454052d159aSCy Schubert<dt><code>maxpoll</code> <kbd>int</kbd></dt>
2455052d159aSCy Schubert<dd><p>These options specify the minimum and maximum polling interval
24562b15cb3dSCy Schubertfor reference clock messages, as a power of 2 in seconds
24572b15cb3dSCy SchubertFor
24582b15cb3dSCy Schubertmost directly connected reference clocks, both
24592b15cb3dSCy Schubert<code>minpoll</code>
24602b15cb3dSCy Schubertand
24612b15cb3dSCy Schubert<code>maxpoll</code>
24622b15cb3dSCy Schubertdefault to 6 (64 s).
24632b15cb3dSCy SchubertFor modem reference clocks,
24642b15cb3dSCy Schubert<code>minpoll</code>
24652b15cb3dSCy Schubertdefaults to 10 (17.1 m) and
24662b15cb3dSCy Schubert<code>maxpoll</code>
24672b15cb3dSCy Schubertdefaults to 14 (4.5 h).
24682b15cb3dSCy SchubertThe allowable range is 4 (16 s) to 17 (36.4 h) inclusive.
2469052d159aSCy Schubert</p></dd>
24702b15cb3dSCy Schubert</dl>
2471052d159aSCy Schubert</dd>
2472052d159aSCy 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>
2473052d159aSCy Schubert<dd><p>This command can be used to configure reference clocks in
24742b15cb3dSCy Schubertspecial ways.
24752b15cb3dSCy SchubertIt must immediately follow the
24762b15cb3dSCy Schubert<code>server</code>
24772b15cb3dSCy Schubertcommand which configures the driver.
24782b15cb3dSCy SchubertNote that the same capability
24792b15cb3dSCy Schubertis possible at run time using the
24802b15cb3dSCy Schubert<code>ntpdc(1ntpdcmdoc)</code>
24812b15cb3dSCy Schubertprogram.
24822b15cb3dSCy SchubertThe options are interpreted as
24832b15cb3dSCy Schubertfollows:
2484052d159aSCy Schubert</p><dl compact="compact">
2485052d159aSCy Schubert<dt><code>time1</code> <kbd>sec</kbd></dt>
2486052d159aSCy Schubert<dd><p>Specifies a constant to be added to the time offset produced by
24872b15cb3dSCy Schubertthe driver, a fixed-point decimal number in seconds.
24882b15cb3dSCy SchubertThis is used
24892b15cb3dSCy Schubertas a calibration constant to adjust the nominal time offset of a
24902b15cb3dSCy Schubertparticular clock to agree with an external standard, such as a
24912b15cb3dSCy Schubertprecision PPS signal.
24922b15cb3dSCy SchubertIt also provides a way to correct a
24932b15cb3dSCy Schubertsystematic error or bias due to serial port or operating system
24942b15cb3dSCy Schubertlatencies, different cable lengths or receiver internal delay.
24952b15cb3dSCy SchubertThe
24962b15cb3dSCy Schubertspecified offset is in addition to the propagation delay provided
24972b15cb3dSCy Schubertby other means, such as internal DIPswitches.
24982b15cb3dSCy SchubertWhere a calibration
24992b15cb3dSCy Schubertfor an individual system and driver is available, an approximate
25002b15cb3dSCy Schubertcorrection is noted in the driver documentation pages.
25012b15cb3dSCy SchubertNote: in order to facilitate calibration when more than one
25022b15cb3dSCy Schubertradio clock or PPS signal is supported, a special calibration
25032b15cb3dSCy Schubertfeature is available.
25042b15cb3dSCy SchubertIt takes the form of an argument to the
25052b15cb3dSCy Schubert<code>enable</code>
25062b15cb3dSCy Schubertcommand described in
25072b15cb3dSCy Schubert<a href="#Miscellaneous-Options">Miscellaneous Options</a>
25082b15cb3dSCy Schubertpage and operates as described in the
2509052d159aSCy Schubert&quot;Reference Clock Drivers&quot;
25102b15cb3dSCy Schubertpage
25112b15cb3dSCy Schubert(available as part of the HTML documentation
25122b15cb3dSCy Schubertprovided in
2513052d159aSCy Schubert<samp>/usr/share/doc/ntp</samp>).
2514052d159aSCy Schubert</p></dd>
2515052d159aSCy Schubert<dt><code>time2</code> <kbd>secs</kbd></dt>
2516052d159aSCy Schubert<dd><p>Specifies a fixed-point decimal number in seconds, which is
25172b15cb3dSCy Schubertinterpreted in a driver-dependent way.
25182b15cb3dSCy SchubertSee the descriptions of
25192b15cb3dSCy Schubertspecific drivers in the
2520052d159aSCy Schubert&quot;Reference Clock Drivers&quot;
25212b15cb3dSCy Schubertpage
25222b15cb3dSCy Schubert(available as part of the HTML documentation
25232b15cb3dSCy Schubertprovided in
2524052d159aSCy Schubert<samp>/usr/share/doc/ntp</samp> <samp>).</samp>
2525052d159aSCy Schubert</p></dd>
2526052d159aSCy Schubert<dt><code>stratum</code> <kbd>int</kbd></dt>
2527052d159aSCy Schubert<dd><p>Specifies the stratum number assigned to the driver, an integer
25282b15cb3dSCy Schubertbetween 0 and 15.
25292b15cb3dSCy SchubertThis number overrides the default stratum number
25302b15cb3dSCy Schubertordinarily assigned by the driver itself, usually zero.
2531052d159aSCy Schubert</p></dd>
2532052d159aSCy Schubert<dt><code>refid</code> <kbd>string</kbd></dt>
2533052d159aSCy Schubert<dd><p>Specifies an ASCII string of from one to four characters which
25342b15cb3dSCy Schubertdefines the reference identifier used by the driver.
25352b15cb3dSCy SchubertThis string
25362b15cb3dSCy Schubertoverrides the default identifier ordinarily assigned by the driver
25372b15cb3dSCy Schubertitself.
2538052d159aSCy Schubert</p></dd>
2539052d159aSCy Schubert<dt><code>mode</code> <kbd>int</kbd></dt>
2540052d159aSCy Schubert<dd><p>Specifies a mode number which is interpreted in a
25412b15cb3dSCy Schubertdevice-specific fashion.
25422b15cb3dSCy SchubertFor instance, it selects a dialing
25432b15cb3dSCy Schubertprotocol in the ACTS driver and a device subtype in the
25442b15cb3dSCy Schubertparse
25452b15cb3dSCy Schubertdrivers.
2546052d159aSCy Schubert</p></dd>
2547052d159aSCy Schubert<dt><code>flag1</code> <code>0</code> <code>|</code> <code>1</code></dt>
2548052d159aSCy Schubert<dt><code>flag2</code> <code>0</code> <code>|</code> <code>1</code></dt>
2549052d159aSCy Schubert<dt><code>flag3</code> <code>0</code> <code>|</code> <code>1</code></dt>
2550052d159aSCy Schubert<dt><code>flag4</code> <code>0</code> <code>|</code> <code>1</code></dt>
2551052d159aSCy Schubert<dd><p>These four flags are used for customizing the clock driver.
25522b15cb3dSCy SchubertThe
25532b15cb3dSCy Schubertinterpretation of these values, and whether they are used at all,
25542b15cb3dSCy Schubertis a function of the particular clock driver.
25552b15cb3dSCy SchubertHowever, by
25562b15cb3dSCy Schubertconvention
25572b15cb3dSCy Schubert<code>flag4</code>
25582b15cb3dSCy Schubertis used to enable recording monitoring
25592b15cb3dSCy Schubertdata to the
25602b15cb3dSCy Schubert<code>clockstats</code>
25612b15cb3dSCy Schubertfile configured with the
25622b15cb3dSCy Schubert<code>filegen</code>
25632b15cb3dSCy Schubertcommand.
25642b15cb3dSCy SchubertFurther information on the
25652b15cb3dSCy Schubert<code>filegen</code>
25662b15cb3dSCy Schubertcommand can be found in
2567052d159aSCy Schubert&lsquo;Monitoring Options&rsquo;.
2568052d159aSCy Schubert</p></dd>
25692b15cb3dSCy Schubert</dl>
2570052d159aSCy Schubert</dd>
25712b15cb3dSCy Schubert</dl>
2572052d159aSCy Schubert<hr>
2573a466cc55SCy Schubert<span id="Miscellaneous-Options"></span><div class="header">
2574052d159aSCy Schubert<p>
2575052d159aSCy 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>
25762b15cb3dSCy Schubert</div>
2577a466cc55SCy Schubert<span id="Miscellaneous-Options-1"></span><h4 class="subsection">1.1.7 Miscellaneous Options</h4>
2578052d159aSCy Schubert<dl compact="compact">
2579052d159aSCy Schubert<dt><code>broadcastdelay</code> <kbd>seconds</kbd></dt>
2580052d159aSCy Schubert<dd><p>The broadcast and multicast modes require a special calibration
25812b15cb3dSCy Schubertto determine the network delay between the local and remote
25822b15cb3dSCy Schubertservers.
25832b15cb3dSCy SchubertOrdinarily, this is done automatically by the initial
25842b15cb3dSCy Schubertprotocol exchanges between the client and server.
25852b15cb3dSCy SchubertIn some cases,
25862b15cb3dSCy Schubertthe calibration procedure may fail due to network or server access
25872b15cb3dSCy Schubertcontrols, for example.
25882b15cb3dSCy SchubertThis command specifies the default delay to
25892b15cb3dSCy Schubertbe used under these circumstances.
25902b15cb3dSCy SchubertTypically (for Ethernet), a
25912b15cb3dSCy Schubertnumber between 0.003 and 0.007 seconds is appropriate.
25922b15cb3dSCy SchubertThe default
25932b15cb3dSCy Schubertwhen this command is not used is 0.004 seconds.
2594052d159aSCy Schubert</p></dd>
2595052d159aSCy Schubert<dt><code>driftfile</code> <kbd>driftfile</kbd></dt>
2596052d159aSCy Schubert<dd><p>This command specifies the complete path and name of the file used to
25972b15cb3dSCy Schubertrecord the frequency of the local clock oscillator.
25982b15cb3dSCy SchubertThis is the same
25992b15cb3dSCy Schubertoperation as the
26002b15cb3dSCy Schubert<code>-f</code>
26012b15cb3dSCy Schubertcommand line option.
26022b15cb3dSCy SchubertIf the file exists, it is read at
26032b15cb3dSCy Schubertstartup in order to set the initial frequency and then updated once per
26042b15cb3dSCy Schuberthour with the current frequency computed by the daemon.
26052b15cb3dSCy SchubertIf the file name is
26062b15cb3dSCy Schubertspecified, but the file itself does not exist, the starts with an initial
26072b15cb3dSCy Schubertfrequency of zero and creates the file when writing it for the first time.
26082b15cb3dSCy SchubertIf this command is not given, the daemon will always start with an initial
26092b15cb3dSCy Schubertfrequency of zero.
2610052d159aSCy Schubert</p>
26112b15cb3dSCy Schubert<p>The file format consists of a single line containing a single
26122b15cb3dSCy Schubertfloating point number, which records the frequency offset measured
26132b15cb3dSCy Schubertin parts-per-million (PPM).
26142b15cb3dSCy SchubertThe file is updated by first writing
26152b15cb3dSCy Schubertthe current drift value into a temporary file and then renaming
26162b15cb3dSCy Schubertthis file to replace the old version.
26172b15cb3dSCy SchubertThis implies that
26182b15cb3dSCy Schubert<code>ntpd(1ntpdmdoc)</code>
26192b15cb3dSCy Schubertmust have write permission for the directory the
26202b15cb3dSCy Schubertdrift file is located in, and that file system links, symbolic or
26212b15cb3dSCy Schubertotherwise, should be avoided.
2622052d159aSCy Schubert</p></dd>
2623052d159aSCy Schubert<dt><code>dscp</code> <kbd>value</kbd></dt>
2624052d159aSCy Schubert<dd><p>This option specifies the Differentiated Services Control Point (DSCP) value,
2625e27abb66SXin LIa 6-bit code.
2626e27abb66SXin LIThe default value is 46, signifying Expedited Forwarding.
2627052d159aSCy Schubert</p></dd>
2628052d159aSCy 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>
2629052d159aSCy 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>
2630052d159aSCy Schubert<dd><p>Provides a way to enable or disable various server options.
26312b15cb3dSCy SchubertFlags not mentioned are unaffected.
26322b15cb3dSCy SchubertNote that all of these flags
26332b15cb3dSCy Schubertcan be controlled remotely using the
26342b15cb3dSCy Schubert<code>ntpdc(1ntpdcmdoc)</code>
26352b15cb3dSCy Schubertutility program.
2636052d159aSCy Schubert</p><dl compact="compact">
2637052d159aSCy Schubert<dt><code>auth</code></dt>
2638052d159aSCy Schubert<dd><p>Enables the server to synchronize with unconfigured peers only if the
26392b15cb3dSCy Schubertpeer has been correctly authenticated using either public key or
26402b15cb3dSCy Schubertprivate key cryptography.
26412b15cb3dSCy SchubertThe default for this flag is
26422b15cb3dSCy Schubert<code>enable</code>.
2643052d159aSCy Schubert</p></dd>
2644052d159aSCy Schubert<dt><code>bclient</code></dt>
2645052d159aSCy Schubert<dd><p>Enables the server to listen for a message from a broadcast or
26462b15cb3dSCy Schubertmulticast server, as in the
26472b15cb3dSCy Schubert<code>multicastclient</code>
26482b15cb3dSCy Schubertcommand with default
26492b15cb3dSCy Schubertaddress.
26502b15cb3dSCy SchubertThe default for this flag is
26512b15cb3dSCy Schubert<code>disable</code>.
2652052d159aSCy Schubert</p></dd>
2653052d159aSCy Schubert<dt><code>calibrate</code></dt>
2654052d159aSCy Schubert<dd><p>Enables the calibrate feature for reference clocks.
26552b15cb3dSCy SchubertThe default for
26562b15cb3dSCy Schubertthis flag is
26572b15cb3dSCy Schubert<code>disable</code>.
2658052d159aSCy Schubert</p></dd>
2659052d159aSCy Schubert<dt><code>kernel</code></dt>
2660052d159aSCy Schubert<dd><p>Enables the kernel time discipline, if available.
26612b15cb3dSCy SchubertThe default for this
26622b15cb3dSCy Schubertflag is
26632b15cb3dSCy Schubert<code>enable</code>
26642b15cb3dSCy Schubertif support is available, otherwise
26652b15cb3dSCy Schubert<code>disable</code>.
2666052d159aSCy Schubert</p></dd>
2667052d159aSCy Schubert<dt><code>mode7</code></dt>
2668052d159aSCy Schubert<dd><p>Enables processing of NTP mode 7 implementation-specific requests
26692b15cb3dSCy Schubertwhich are used by the deprecated
26702b15cb3dSCy Schubert<code>ntpdc(1ntpdcmdoc)</code>
26712b15cb3dSCy Schubertprogram.
26722b15cb3dSCy SchubertThe default for this flag is disable.
26732b15cb3dSCy SchubertThis flag is excluded from runtime configuration using
26742b15cb3dSCy Schubert<code>ntpq(1ntpqmdoc)</code>.
26752b15cb3dSCy SchubertThe
26762b15cb3dSCy Schubert<code>ntpq(1ntpqmdoc)</code>
26772b15cb3dSCy Schubertprogram provides the same capabilities as
26782b15cb3dSCy Schubert<code>ntpdc(1ntpdcmdoc)</code>
26792b15cb3dSCy Schubertusing standard mode 6 requests.
2680052d159aSCy Schubert</p></dd>
2681052d159aSCy Schubert<dt><code>monitor</code></dt>
2682052d159aSCy Schubert<dd><p>Enables the monitoring facility.
26832b15cb3dSCy SchubertSee the
26842b15cb3dSCy Schubert<code>ntpdc(1ntpdcmdoc)</code>
26852b15cb3dSCy Schubertprogram
26862b15cb3dSCy Schubertand the
26872b15cb3dSCy Schubert<code>monlist</code>
26882b15cb3dSCy Schubertcommand or further information.
26892b15cb3dSCy SchubertThe
26902b15cb3dSCy Schubertdefault for this flag is
26912b15cb3dSCy Schubert<code>enable</code>.
2692052d159aSCy Schubert</p></dd>
2693052d159aSCy Schubert<dt><code>ntp</code></dt>
2694052d159aSCy Schubert<dd><p>Enables time and frequency discipline.
26952b15cb3dSCy SchubertIn effect, this switch opens and
26962b15cb3dSCy Schubertcloses the feedback loop, which is useful for testing.
26972b15cb3dSCy SchubertThe default for
26982b15cb3dSCy Schubertthis flag is
26992b15cb3dSCy Schubert<code>enable</code>.
2700052d159aSCy Schubert</p></dd>
2701052d159aSCy Schubert<dt><code>peer_clear_digest_early</code></dt>
2702052d159aSCy Schubert<dd><p>By default, if
2703e27abb66SXin LI<code>ntpd(1ntpdmdoc)</code>
2704e27abb66SXin LIis using autokey and it
2705e27abb66SXin LIreceives a crypto-NAK packet that
2706e27abb66SXin LIpasses the duplicate packet and origin timestamp checks
2707e27abb66SXin LIthe peer variables are immediately cleared.
2708e27abb66SXin LIWhile this is generally a feature
2709e27abb66SXin LIas it allows for quick recovery if a server key has changed,
2710e27abb66SXin LIa properly forged and appropriately delivered crypto-NAK packet
2711e27abb66SXin LIcan be used in a DoS attack.
2712e27abb66SXin LIIf you have active noticable problems with this type of DoS attack
2713e27abb66SXin LIthen you should consider
2714e27abb66SXin LIdisabling this option.
2715e27abb66SXin LIYou can check your
2716e27abb66SXin LI<code>peerstats</code>
2717e27abb66SXin LIfile for evidence of any of these attacks.
2718e27abb66SXin LIThe
2719e27abb66SXin LIdefault for this flag is
2720e27abb66SXin LI<code>enable</code>.
2721052d159aSCy Schubert</p></dd>
2722052d159aSCy Schubert<dt><code>stats</code></dt>
2723052d159aSCy Schubert<dd><p>Enables the statistics facility.
27242b15cb3dSCy SchubertSee the
2725052d159aSCy Schubert&lsquo;Monitoring Options&rsquo;
27262b15cb3dSCy Schubertsection for further information.
27272b15cb3dSCy SchubertThe default for this flag is
27282b15cb3dSCy Schubert<code>disable</code>.
2729052d159aSCy Schubert</p></dd>
2730052d159aSCy Schubert<dt><code>unpeer_crypto_early</code></dt>
2731052d159aSCy Schubert<dd><p>By default, if
273268ba7e87SXin LI<code>ntpd(1ntpdmdoc)</code>
273368ba7e87SXin LIreceives an autokey packet that fails TEST9,
273468ba7e87SXin LIa crypto failure,
273568ba7e87SXin LIthe association is immediately cleared.
273668ba7e87SXin LIThis is almost certainly a feature,
273768ba7e87SXin LIbut if, in spite of the current recommendation of not using autokey,
273868ba7e87SXin LIyou are
273968ba7e87SXin LI.B still
274068ba7e87SXin LIusing autokey
274168ba7e87SXin LI.B and
274268ba7e87SXin LIyou are seeing this sort of DoS attack
274368ba7e87SXin LIdisabling this flag will delay
274468ba7e87SXin LItearing down the association until the reachability counter
274568ba7e87SXin LIbecomes zero.
274668ba7e87SXin LIYou can check your
274768ba7e87SXin LI<code>peerstats</code>
274868ba7e87SXin LIfile for evidence of any of these attacks.
274968ba7e87SXin LIThe
275068ba7e87SXin LIdefault for this flag is
275168ba7e87SXin LI<code>enable</code>.
2752052d159aSCy Schubert</p></dd>
2753052d159aSCy Schubert<dt><code>unpeer_crypto_nak_early</code></dt>
2754052d159aSCy Schubert<dd><p>By default, if
275568ba7e87SXin LI<code>ntpd(1ntpdmdoc)</code>
275668ba7e87SXin LIreceives a crypto-NAK packet that
275768ba7e87SXin LIpasses the duplicate packet and origin timestamp checks
275868ba7e87SXin LIthe association is immediately cleared.
275968ba7e87SXin LIWhile this is generally a feature
276068ba7e87SXin LIas it allows for quick recovery if a server key has changed,
276168ba7e87SXin LIa properly forged and appropriately delivered crypto-NAK packet
276268ba7e87SXin LIcan be used in a DoS attack.
276368ba7e87SXin LIIf you have active noticable problems with this type of DoS attack
276468ba7e87SXin LIthen you should consider
276568ba7e87SXin LIdisabling this option.
276668ba7e87SXin LIYou can check your
276768ba7e87SXin LI<code>peerstats</code>
276868ba7e87SXin LIfile for evidence of any of these attacks.
276968ba7e87SXin LIThe
277068ba7e87SXin LIdefault for this flag is
277168ba7e87SXin LI<code>enable</code>.
2772052d159aSCy Schubert</p></dd>
2773052d159aSCy Schubert<dt><code>unpeer_digest_early</code></dt>
2774052d159aSCy Schubert<dd><p>By default, if
277568ba7e87SXin LI<code>ntpd(1ntpdmdoc)</code>
277668ba7e87SXin LIreceives what should be an authenticated packet
277768ba7e87SXin LIthat passes other packet sanity checks but
277868ba7e87SXin LIcontains an invalid digest
277968ba7e87SXin LIthe association is immediately cleared.
278068ba7e87SXin LIWhile this is generally a feature
278168ba7e87SXin LIas it allows for quick recovery,
278268ba7e87SXin LIif this type of packet is carefully forged and sent
278368ba7e87SXin LIduring an appropriate window it can be used for a DoS attack.
278468ba7e87SXin LIIf you have active noticable problems with this type of DoS attack
278568ba7e87SXin LIthen you should consider
278668ba7e87SXin LIdisabling this option.
278768ba7e87SXin LIYou can check your
278868ba7e87SXin LI<code>peerstats</code>
278968ba7e87SXin LIfile for evidence of any of these attacks.
279068ba7e87SXin LIThe
279168ba7e87SXin LIdefault for this flag is
279268ba7e87SXin LI<code>enable</code>.
2793052d159aSCy Schubert</p></dd>
27942b15cb3dSCy Schubert</dl>
2795052d159aSCy Schubert</dd>
2796052d159aSCy Schubert<dt><code>includefile</code> <kbd>includefile</kbd></dt>
2797052d159aSCy Schubert<dd><p>This command allows additional configuration commands
27982b15cb3dSCy Schubertto be included from a separate file.
27992b15cb3dSCy SchubertInclude files may
28002b15cb3dSCy Schubertbe nested to a depth of five; upon reaching the end of any
28012b15cb3dSCy Schubertinclude file, command processing resumes in the previous
28022b15cb3dSCy Schubertconfiguration file.
28032b15cb3dSCy SchubertThis option is useful for sites that run
28042b15cb3dSCy Schubert<code>ntpd(1ntpdmdoc)</code>
28052b15cb3dSCy Schuberton multiple hosts, with (mostly) common options (e.g., a
28062b15cb3dSCy Schubertrestriction list).
2807052d159aSCy Schubert</p></dd>
2808052d159aSCy 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>
2809052d159aSCy Schubert<dd><p>The
281009100258SXin LI<code>interface</code>
281109100258SXin LIdirective controls which network addresses
281209100258SXin LI<code>ntpd(1ntpdmdoc)</code>
281309100258SXin LIopens, and whether input is dropped without processing.
281409100258SXin LIThe first parameter determines the action for addresses
281509100258SXin LIwhich match the second parameter.
281609100258SXin LIThe second parameter specifies a class of addresses,
281709100258SXin LIor a specific interface name,
281809100258SXin LIor an address.
281909100258SXin LIIn the address case,
282009100258SXin LI<kbd>prefixlen</kbd>
282109100258SXin LIdetermines how many bits must match for this rule to apply.
282209100258SXin LI<code>ignore</code>
282309100258SXin LIprevents opening matching addresses,
282409100258SXin LI<code>drop</code>
282509100258SXin LIcauses
282609100258SXin LI<code>ntpd(1ntpdmdoc)</code>
282709100258SXin LIto open the address and drop all received packets without examination.
282809100258SXin LIMultiple
282909100258SXin LI<code>interface</code>
283009100258SXin LIdirectives can be used.
283109100258SXin LIThe last rule which matches a particular address determines the action for it.
283209100258SXin LI<code>interface</code>
283309100258SXin LIdirectives are disabled if any
283409100258SXin LI<code>-I</code>,
283509100258SXin LI<code>--interface</code>,
283609100258SXin LI<code>-L</code>,
283709100258SXin LIor
283809100258SXin LI<code>--novirtualips</code>
283909100258SXin LIcommand-line options are specified in the configuration file,
284009100258SXin LIall available network addresses are opened.
284109100258SXin LIThe
284209100258SXin LI<code>nic</code>
284309100258SXin LIdirective is an alias for
284409100258SXin LI<code>interface</code>.
2845052d159aSCy Schubert</p></dd>
2846052d159aSCy Schubert<dt><code>leapfile</code> <kbd>leapfile</kbd></dt>
2847052d159aSCy Schubert<dd><p>This command loads the IERS leapseconds file and initializes the
284809100258SXin LIleapsecond values for the next leapsecond event, leapfile expiration
284909100258SXin LItime, and TAI offset.
285009100258SXin LIThe file can be obtained directly from the IERS at
285109100258SXin LI<code>https://hpiers.obspm.fr/iers/bul/bulc/ntp/leap-seconds.list</code>
285209100258SXin LIor
285309100258SXin LI<code>ftp://hpiers.obspm.fr/iers/bul/bulc/ntp/leap-seconds.list</code>.
285409100258SXin LIThe
285509100258SXin LI<code>leapfile</code>
285609100258SXin LIis scanned when
285709100258SXin LI<code>ntpd(1ntpdmdoc)</code>
285809100258SXin LIprocesses the
285909100258SXin LI<code>leapfile</code> <code>directive</code> <code>or</code> <code>when</code>
286009100258SXin LI<code>ntpd</code> <code>detects</code> <code>that</code> <code>the</code>
286109100258SXin LI<kbd>leapfile</kbd>
286209100258SXin LIhas changed.
286309100258SXin LI<code>ntpd</code>
286409100258SXin LIchecks once a day to see if the
286509100258SXin LI<kbd>leapfile</kbd>
286609100258SXin LIhas changed.
286709100258SXin LIThe
286809100258SXin LI<code>update-leap(1update_leapmdoc)</code>
286909100258SXin LIscript can be run to see if the
287009100258SXin LI<kbd>leapfile</kbd>
287109100258SXin LIshould be updated.
2872052d159aSCy Schubert</p></dd>
2873052d159aSCy Schubert<dt><code>leapsmearinterval</code> <kbd>seconds</kbd></dt>
2874052d159aSCy Schubert<dd><p>This EXPERIMENTAL option is only available if
2875276da39aSCy Schubert<code>ntpd(1ntpdmdoc)</code>
2876276da39aSCy Schubertwas built with the
2877276da39aSCy Schubert<code>--enable-leap-smear</code>
2878276da39aSCy Schubertoption to the
2879276da39aSCy Schubert<code>configure</code>
2880276da39aSCy Schubertscript.
2881276da39aSCy SchubertIt specifies the interval over which a leap second correction will be applied.
2882276da39aSCy SchubertRecommended values for this option are between
2883276da39aSCy Schubert7200 (2 hours) and 86400 (24 hours).
2884276da39aSCy Schubert.Sy DO NOT USE THIS OPTION ON PUBLIC-ACCESS SERVERS!
2885276da39aSCy SchubertSee http://bugs.ntp.org/2855 for more information.
2886052d159aSCy Schubert</p></dd>
2887052d159aSCy Schubert<dt><code>logconfig</code> <kbd>configkeyword</kbd></dt>
2888052d159aSCy Schubert<dd><p>This command controls the amount and type of output written to
28892b15cb3dSCy Schubertthe system
28902b15cb3dSCy Schubert<code>syslog(3)</code>
28912b15cb3dSCy Schubertfacility or the alternate
28922b15cb3dSCy Schubert<code>logfile</code>
28932b15cb3dSCy Schubertlog file.
28942b15cb3dSCy SchubertBy default, all output is turned on.
28952b15cb3dSCy SchubertAll
28962b15cb3dSCy Schubert<kbd>configkeyword</kbd>
28972b15cb3dSCy Schubertkeywords can be prefixed with
2898052d159aSCy Schubert&lsquo;=&rsquo;,
2899052d159aSCy Schubert&lsquo;+&rsquo;
29002b15cb3dSCy Schubertand
2901052d159aSCy Schubert&lsquo;-&rsquo;,
29022b15cb3dSCy Schubertwhere
2903052d159aSCy Schubert&lsquo;=&rsquo;
29042b15cb3dSCy Schubertsets the
29052b15cb3dSCy Schubert<code>syslog(3)</code>
29062b15cb3dSCy Schubertpriority mask,
2907052d159aSCy Schubert&lsquo;+&rsquo;
29082b15cb3dSCy Schubertadds and
2909052d159aSCy Schubert&lsquo;-&rsquo;
29102b15cb3dSCy Schubertremoves
29112b15cb3dSCy Schubertmessages.
29122b15cb3dSCy Schubert<code>syslog(3)</code>
29132b15cb3dSCy Schubertmessages can be controlled in four
29142b15cb3dSCy Schubertclasses
29152b15cb3dSCy Schubert(<code>clock</code>, <code>peer</code>, <code>sys</code> and <code>sync</code>).
29162b15cb3dSCy SchubertWithin these classes four types of messages can be
29172b15cb3dSCy Schubertcontrolled: informational messages
29182b15cb3dSCy Schubert(<code>info</code>),
29192b15cb3dSCy Schubertevent messages
29202b15cb3dSCy Schubert(<code>events</code>),
29212b15cb3dSCy Schubertstatistics messages
29222b15cb3dSCy Schubert(<code>statistics</code>)
29232b15cb3dSCy Schubertand
29242b15cb3dSCy Schubertstatus messages
29252b15cb3dSCy Schubert(<code>status</code>).
2926052d159aSCy Schubert</p>
29272b15cb3dSCy Schubert<p>Configuration keywords are formed by concatenating the message class with
29282b15cb3dSCy Schubertthe event class.
29292b15cb3dSCy SchubertThe
29302b15cb3dSCy Schubert<code>all</code>
29312b15cb3dSCy Schubertprefix can be used instead of a message class.
29322b15cb3dSCy SchubertA
29332b15cb3dSCy Schubertmessage class may also be followed by the
29342b15cb3dSCy Schubert<code>all</code>
29352b15cb3dSCy Schubertkeyword to enable/disable all
2936e27abb66SXin LImessages of the respective message class.
2937e27abb66SXin LIThus, a minimal log configuration
29382b15cb3dSCy Schubertcould look like this:
2939052d159aSCy Schubert</p><pre class="verbatim">logconfig =syncstatus +sysevents
29402b15cb3dSCy Schubert</pre>
29412b15cb3dSCy Schubert<p>This would just list the synchronizations state of
29422b15cb3dSCy Schubert<code>ntpd(1ntpdmdoc)</code>
29432b15cb3dSCy Schubertand the major system events.
29442b15cb3dSCy SchubertFor a simple reference server, the
29452b15cb3dSCy Schubertfollowing minimum message configuration could be useful:
2946052d159aSCy Schubert</p><pre class="verbatim">logconfig =syncall +clockall
29472b15cb3dSCy Schubert</pre>
29482b15cb3dSCy Schubert<p>This configuration will list all clock information and
29492b15cb3dSCy Schubertsynchronization information.
29502b15cb3dSCy SchubertAll other events and messages about
29512b15cb3dSCy Schubertpeers, system events and so on is suppressed.
2952052d159aSCy Schubert</p></dd>
2953052d159aSCy Schubert<dt><code>logfile</code> <kbd>logfile</kbd></dt>
2954052d159aSCy Schubert<dd><p>This command specifies the location of an alternate log file to
29552b15cb3dSCy Schubertbe used instead of the default system
29562b15cb3dSCy Schubert<code>syslog(3)</code>
29572b15cb3dSCy Schubertfacility.
29584990d495SXin LIThis is the same operation as the
29594990d495SXin LI<code>-l</code>
29604990d495SXin LIcommand line option.
2961052d159aSCy Schubert</p></dd>
2962052d159aSCy 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>
2963052d159aSCy Schubert<dd><p>Controls size limite of the monitoring facility&rsquo;s Most Recently Used
296409100258SXin LI(MRU) list
296509100258SXin LIof client addresses, which is also used by the
296609100258SXin LIrate control facility.
2967052d159aSCy Schubert</p><dl compact="compact">
2968052d159aSCy Schubert<dt><code>maxdepth</code> <kbd>count</kbd></dt>
2969052d159aSCy Schubert<dt><code>maxmem</code> <kbd>kilobytes</kbd></dt>
2970052d159aSCy Schubert<dd><p>Equivalent upper limits on the size of the MRU list, in terms of entries or kilobytes.
297109100258SXin LIThe acutal limit will be up to
297209100258SXin LI<code>incalloc</code>
297309100258SXin LIentries or
297409100258SXin LI<code>incmem</code>
297509100258SXin LIkilobytes larger.
297609100258SXin LIAs with all of the
297709100258SXin LI<code>mru</code>
297809100258SXin LIoptions offered in units of entries or kilobytes, if both
297909100258SXin LI<code>maxdepth</code>
298009100258SXin LIand
298109100258SXin 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>
298209100258SXin LIThe default is 1024 kilobytes.
2983052d159aSCy Schubert</p></dd>
2984052d159aSCy Schubert<dt><code>mindepth</code> <kbd>count</kbd></dt>
2985052d159aSCy Schubert<dd><p>Lower limit on the MRU list size.
298609100258SXin LIWhen the MRU list has fewer than
298709100258SXin LI<code>mindepth</code>
298809100258SXin LIentries, existing entries are never removed to make room for newer ones,
298909100258SXin LIregardless of their age.
299009100258SXin LIThe default is 600 entries.
2991052d159aSCy Schubert</p></dd>
2992052d159aSCy Schubert<dt><code>maxage</code> <kbd>seconds</kbd></dt>
2993052d159aSCy Schubert<dd><p>Once the MRU list has
299409100258SXin LI<code>mindepth</code>
299509100258SXin LIentries and an additional client is to ba added to the list,
299609100258SXin LIif the oldest entry was updated more than
299709100258SXin LI<code>maxage</code>
299809100258SXin LIseconds ago, that entry is removed and its storage is reused.
299909100258SXin LIIf the oldest entry was updated more recently the MRU list is grown,
300009100258SXin LIsubject to
300109100258SXin LI<code>maxdepth</code> <code>/</code> <code>moxmem</code>.
300209100258SXin LIThe default is 64 seconds.
3003052d159aSCy Schubert</p></dd>
3004052d159aSCy Schubert<dt><code>initalloc</code> <kbd>count</kbd></dt>
3005052d159aSCy Schubert<dt><code>initmem</code> <kbd>kilobytes</kbd></dt>
3006052d159aSCy Schubert<dd><p>Initial memory allocation at the time the monitoringfacility is first enabled,
300709100258SXin LIin terms of the number of entries or kilobytes.
300809100258SXin LIThe default is 4 kilobytes.
3009052d159aSCy Schubert</p></dd>
3010052d159aSCy Schubert<dt><code>incalloc</code> <kbd>count</kbd></dt>
3011052d159aSCy Schubert<dt><code>incmem</code> <kbd>kilobytes</kbd></dt>
3012052d159aSCy Schubert<dd><p>Size of additional memory allocations when growing the MRU list, in entries or kilobytes.
301309100258SXin LIThe default is 4 kilobytes.
3014052d159aSCy Schubert</p></dd>
301509100258SXin LI</dl>
3016052d159aSCy Schubert</dd>
3017052d159aSCy Schubert<dt><code>nonvolatile</code> <kbd>threshold</kbd></dt>
3018052d159aSCy Schubert<dd><p>Specify the
301909100258SXin LI<kbd>threshold</kbd>
302009100258SXin LIdelta in seconds before an hourly change to the
302109100258SXin LI<code>driftfile</code>
302209100258SXin LI(frequency file) will be written, with a default value of 1e-7 (0.1 PPM).
302309100258SXin LIThe frequency file is inspected each hour.
302409100258SXin LIIf the difference between the current frequency and the last value written
302509100258SXin LIexceeds the threshold, the file is written and the
302609100258SXin LI<code>threshold</code>
302709100258SXin LIbecomes the new threshold value.
302809100258SXin LIIf the threshold is not exceeeded, it is reduced by half.
302909100258SXin LIThis is intended to reduce the number of file writes
303009100258SXin LIfor embedded systems with nonvolatile memory.
3031052d159aSCy Schubert</p></dd>
3032052d159aSCy Schubert<dt><code>phone</code> <kbd>dial</kbd> <kbd>...</kbd></dt>
3033052d159aSCy Schubert<dd><p>This command is used in conjunction with
303409100258SXin LIthe ACTS modem driver (type 18)
303509100258SXin LIor the JJY driver (type 40, mode 100 - 180).
303609100258SXin LIFor the ACTS modem driver (type 18), the arguments consist of
303709100258SXin LIa maximum of 10 telephone numbers used to dial USNO, NIST, or European
303809100258SXin LItime service.
303909100258SXin LIFor the JJY driver (type 40 mode 100 - 180), the argument is
304009100258SXin LIone telephone number used to dial the telephone JJY service.
304109100258SXin LIThe Hayes command ATDT is normally prepended to the number.
304209100258SXin LIThe number can contain other modem control codes as well.
3043052d159aSCy Schubert</p></dd>
3044a466cc55SCy Schubert<dt><code>pollskewlist</code> <code>[<kbd>poll</kbd> <kbd>early</kbd> <kbd>late</kbd>]</code> <kbd>...</kbd> <code>[<code>default</code> <kbd>early</kbd> <kbd>late</kbd>]</code></dt>
30452d4e511cSCy Schubert<dd><p>Enable skewing of our poll requests to our servers.
30462d4e511cSCy Schubert<kbd>poll</kbd>
30472d4e511cSCy Schubertis a number between 3 and 17 inclusive, identifying a specific poll interval.
30482d4e511cSCy SchubertA poll interval is 2^n seconds in duration,
30492d4e511cSCy Schubertso a poll value of 3 corresponds to 8 seconds
30502d4e511cSCy Schubertand
30512d4e511cSCy Schuberta poll interval of 17 corresponds to
30522d4e511cSCy Schubert131,072 seconds, or about a day and a half.
30532d4e511cSCy SchubertThe next two numbers must be between 0 and one-half of the poll interval,
30542d4e511cSCy Schubertinclusive.
3055a466cc55SCy SchubertAr early
3056a466cc55SCy Schubertspecifies how early the poll may start,
30572d4e511cSCy Schubertwhile
3058a466cc55SCy SchubertAr late
3059a466cc55SCy Schubertspecifies how late the poll may be delayed.
30602d4e511cSCy SchubertWith no arguments, internally specified default values are chosen.
30612d4e511cSCy Schubert</p></dd>
3062052d159aSCy 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>
3063052d159aSCy Schubert<dd><p>Reset one or more groups of counters maintained by
306409100258SXin LI<code>ntpd</code>
306509100258SXin LIand exposed by
306609100258SXin LI<code>ntpq</code>
306709100258SXin LIand
306809100258SXin LI<code>ntpdc</code>.
3069052d159aSCy Schubert</p></dd>
3070052d159aSCy 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>
3071052d159aSCy Schubert<dd><dl compact="compact">
3072052d159aSCy Schubert<dt><code>memlock</code> <kbd>Nmegabytes</kbd></dt>
3073052d159aSCy Schubert<dd><p>Specify the number of megabytes of memory that should be
307409100258SXin LIallocated and locked.
307509100258SXin LIProbably only available under Linux, this option may be useful
307609100258SXin LIwhen dropping root (the
307709100258SXin LI<code>-i</code>
307809100258SXin LIoption).
307909100258SXin LIThe default is 32 megabytes on non-Linux machines, and -1 under Linux.
3080052d159aSCy Schubert-1 means &quot;do not lock the process into memory&quot;.
3081052d159aSCy Schubert0 means &quot;lock whatever memory the process wants into memory&quot;.
3082052d159aSCy Schubert</p></dd>
3083052d159aSCy Schubert<dt><code>stacksize</code> <kbd>N4kPages</kbd></dt>
3084052d159aSCy Schubert<dd><p>Specifies the maximum size of the process stack on systems with the
308509100258SXin LI<code>mlockall()</code>
308609100258SXin LIfunction.
308709100258SXin LIDefaults to 50 4k pages (200 4k pages in OpenBSD).
3088052d159aSCy Schubert</p></dd>
3089052d159aSCy Schubert<dt><code>filenum</code> <kbd>Nfiledescriptors</kbd></dt>
3090052d159aSCy Schubert<dd><p>Specifies the maximum number of file descriptors ntpd may have open at once.
309109100258SXin LIDefaults to the system default.
3092052d159aSCy Schubert</p></dd>
309309100258SXin LI</dl>
3094052d159aSCy Schubert</dd>
3095052d159aSCy Schubert<dt><code>saveconfigdir</code> <kbd>directory_path</kbd></dt>
3096052d159aSCy Schubert<dd><p>Specify the directory in which to write configuration snapshots
309709100258SXin LIrequested with
3098052d159aSCy Schubert.Cm ntpq &rsquo;s
309909100258SXin LI<code>saveconfig</code>
310009100258SXin LIcommand.
310109100258SXin LIIf
310209100258SXin LI<code>saveconfigdir</code>
310309100258SXin LIdoes not appear in the configuration file,
310409100258SXin LI<code>saveconfig</code>
310509100258SXin LIrequests are rejected by
310609100258SXin LI<code>ntpd</code>.
3107052d159aSCy Schubert</p></dd>
3108052d159aSCy Schubert<dt><code>saveconfig</code> <kbd>filename</kbd></dt>
3109052d159aSCy Schubert<dd><p>Write the current configuration, including any runtime
311009100258SXin LImodifications given with
311109100258SXin LI<code>:config</code>
311209100258SXin LIor
311309100258SXin LI<code>config-from-file</code>
311409100258SXin LIto the
311509100258SXin LI<code>ntpd</code>
3116052d159aSCy Schuberthost&rsquo;s
311709100258SXin LI<kbd>filename</kbd>
311809100258SXin LIin the
311909100258SXin LI<code>saveconfigdir</code>.
312009100258SXin LIThis command will be rejected unless the
312109100258SXin LI<code>saveconfigdir</code>
312209100258SXin LIdirective appears in
3123052d159aSCy Schubert.Cm ntpd &rsquo;s
312409100258SXin LIconfiguration file.
312509100258SXin LI<kbd>filename</kbd>
312609100258SXin LIcan use
312709100258SXin LI<code>strftime(3)</code>
312809100258SXin LIformat directives to substitute the current date and time,
312909100258SXin LIfor example,
313009100258SXin LI<code>saveconfig\ ntp-%Y%m%d-%H%M%S.conf</code>.
313109100258SXin LIThe filename used is stored in the system variable
313209100258SXin LI<code>savedconfig</code>.
313309100258SXin LIAuthentication is required.
3134052d159aSCy Schubert</p></dd>
3135052d159aSCy Schubert<dt><code>setvar</code> <kbd>variable</kbd> <code>[<code>default</code>]</code></dt>
3136052d159aSCy Schubert<dd><p>This command adds an additional system variable.
31372b15cb3dSCy SchubertThese
31382b15cb3dSCy Schubertvariables can be used to distribute additional information such as
31392b15cb3dSCy Schubertthe access policy.
31402b15cb3dSCy SchubertIf the variable of the form
31412b15cb3dSCy Schubert<code>name</code><code>=</code><kbd>value</kbd>
31422b15cb3dSCy Schubertis followed by the
31432b15cb3dSCy Schubert<code>default</code>
31442b15cb3dSCy Schubertkeyword, the
31452b15cb3dSCy Schubertvariable will be listed as part of the default system variables
31462b15cb3dSCy Schubert(<code>rv</code> command)).
31472b15cb3dSCy SchubertThese additional variables serve
31482b15cb3dSCy Schubertinformational purposes only.
31492b15cb3dSCy SchubertThey are not related to the protocol
31502b15cb3dSCy Schubertother that they can be listed.
31512b15cb3dSCy SchubertThe known protocol variables will
31522b15cb3dSCy Schubertalways override any variables defined via the
31532b15cb3dSCy Schubert<code>setvar</code>
31542b15cb3dSCy Schubertmechanism.
31552b15cb3dSCy SchubertThere are three special variables that contain the names
31562b15cb3dSCy Schubertof all variable of the same group.
31572b15cb3dSCy SchubertThe
31582b15cb3dSCy Schubert<code>sys_var_list</code>
31592b15cb3dSCy Schubertholds
31602b15cb3dSCy Schubertthe names of all system variables.
31612b15cb3dSCy SchubertThe
31622b15cb3dSCy Schubert<code>peer_var_list</code>
31632b15cb3dSCy Schubertholds
31642b15cb3dSCy Schubertthe names of all peer variables and the
31652b15cb3dSCy Schubert<code>clock_var_list</code>
31662b15cb3dSCy Schubertholds the names of the reference clock variables.
3167052d159aSCy Schubert</p></dd>
3168052d159aSCy Schubert<dt><code>sysinfo</code></dt>
3169052d159aSCy Schubert<dd><p>Display operational summary.
3170052d159aSCy Schubert</p></dd>
3171052d159aSCy Schubert<dt><code>sysstats</code></dt>
3172052d159aSCy Schubert<dd><p>Show statistics counters maintained in the protocol module.
3173052d159aSCy Schubert</p></dd>
3174052d159aSCy 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>
3175052d159aSCy Schubert<dd><p>This command can be used to alter several system variables in
31762b15cb3dSCy Schubertvery exceptional circumstances.
31772b15cb3dSCy SchubertIt should occur in the
31782b15cb3dSCy Schubertconfiguration file before any other configuration options.
31792b15cb3dSCy SchubertThe
31802b15cb3dSCy Schubertdefault values of these variables have been carefully optimized for
31812b15cb3dSCy Schuberta wide range of network speeds and reliability expectations.
31822b15cb3dSCy SchubertIn
31832b15cb3dSCy Schubertgeneral, they interact in intricate ways that are hard to predict
31842b15cb3dSCy Schubertand some combinations can result in some very nasty behavior.
31852b15cb3dSCy SchubertVery
31862b15cb3dSCy Schubertrarely is it necessary to change the default values; but, some
31872b15cb3dSCy Schubertfolks cannot resist twisting the knobs anyway and this command is
31882b15cb3dSCy Schubertfor them.
31892b15cb3dSCy SchubertEmphasis added: twisters are on their own and can expect
31902b15cb3dSCy Schubertno help from the support group.
3191052d159aSCy Schubert</p>
31922b15cb3dSCy Schubert<p>The variables operate as follows:
3193052d159aSCy Schubert</p><dl compact="compact">
3194052d159aSCy Schubert<dt><code>allan</code> <kbd>allan</kbd></dt>
3195052d159aSCy Schubert<dd><p>The argument becomes the new value for the minimum Allan
31962b15cb3dSCy Schubertintercept, which is a parameter of the PLL/FLL clock discipline
31972b15cb3dSCy Schubertalgorithm.
31982b15cb3dSCy SchubertThe value in log2 seconds defaults to 7 (1024 s), which is also the lower
31992b15cb3dSCy Schubertlimit.
3200052d159aSCy Schubert</p></dd>
3201052d159aSCy Schubert<dt><code>dispersion</code> <kbd>dispersion</kbd></dt>
3202052d159aSCy Schubert<dd><p>The argument becomes the new value for the dispersion increase rate,
32032b15cb3dSCy Schubertnormally .000015 s/s.
3204052d159aSCy Schubert</p></dd>
3205052d159aSCy Schubert<dt><code>freq</code> <kbd>freq</kbd></dt>
3206052d159aSCy Schubert<dd><p>The argument becomes the initial value of the frequency offset in
32072b15cb3dSCy Schubertparts-per-million.
32082b15cb3dSCy SchubertThis overrides the value in the frequency file, if
32092b15cb3dSCy Schubertpresent, and avoids the initial training state if it is not.
3210052d159aSCy Schubert</p></dd>
3211052d159aSCy Schubert<dt><code>huffpuff</code> <kbd>huffpuff</kbd></dt>
3212052d159aSCy Schubert<dd><p>The argument becomes the new value for the experimental
3213052d159aSCy Schuberthuff-n&rsquo;-puff filter span, which determines the most recent interval
32142b15cb3dSCy Schubertthe algorithm will search for a minimum delay.
32152b15cb3dSCy SchubertThe lower limit is
32162b15cb3dSCy Schubert900 s (15 m), but a more reasonable value is 7200 (2 hours).
32172b15cb3dSCy SchubertThere
32182b15cb3dSCy Schubertis no default, since the filter is not enabled unless this command
32192b15cb3dSCy Schubertis given.
3220052d159aSCy Schubert</p></dd>
3221052d159aSCy Schubert<dt><code>panic</code> <kbd>panic</kbd></dt>
3222052d159aSCy Schubert<dd><p>The argument is the panic threshold, normally 1000 s.
32232b15cb3dSCy SchubertIf set to zero,
32242b15cb3dSCy Schubertthe panic sanity check is disabled and a clock offset of any value will
32252b15cb3dSCy Schubertbe accepted.
3226052d159aSCy Schubert</p></dd>
3227052d159aSCy Schubert<dt><code>step</code> <kbd>step</kbd></dt>
3228052d159aSCy Schubert<dd><p>The argument is the step threshold, which by default is 0.128 s.
32292b15cb3dSCy SchubertIt can
32302b15cb3dSCy Schubertbe set to any positive number in seconds.
32312b15cb3dSCy SchubertIf set to zero, step
32322b15cb3dSCy Schubertadjustments will never occur.
32332b15cb3dSCy SchubertNote: The kernel time discipline is
32342b15cb3dSCy Schubertdisabled if the step threshold is set to zero or greater than the
32352b15cb3dSCy Schubertdefault.
3236052d159aSCy Schubert</p></dd>
3237052d159aSCy Schubert<dt><code>stepback</code> <kbd>stepback</kbd></dt>
3238052d159aSCy Schubert<dd><p>The argument is the step threshold for the backward direction,
3239a25439b6SCy Schubertwhich by default is 0.128 s.
3240a25439b6SCy SchubertIt can
3241a25439b6SCy Schubertbe set to any positive number in seconds.
3242a25439b6SCy SchubertIf both the forward and backward step thresholds are set to zero, step
3243a25439b6SCy Schubertadjustments will never occur.
3244a25439b6SCy SchubertNote: The kernel time discipline is
3245a25439b6SCy Schubertdisabled if
3246a25439b6SCy Schuberteach direction of step threshold are either
3247a25439b6SCy Schubertset to zero or greater than .5 second.
3248052d159aSCy Schubert</p></dd>
3249052d159aSCy Schubert<dt><code>stepfwd</code> <kbd>stepfwd</kbd></dt>
3250052d159aSCy Schubert<dd><p>As for stepback, but for the forward direction.
3251052d159aSCy Schubert</p></dd>
3252052d159aSCy Schubert<dt><code>stepout</code> <kbd>stepout</kbd></dt>
3253052d159aSCy Schubert<dd><p>The argument is the stepout timeout, which by default is 900 s.
32542b15cb3dSCy SchubertIt can
32552b15cb3dSCy Schubertbe set to any positive number in seconds.
32562b15cb3dSCy SchubertIf set to zero, the stepout
32572b15cb3dSCy Schubertpulses will not be suppressed.
3258052d159aSCy Schubert</p></dd>
32592b15cb3dSCy Schubert</dl>
3260052d159aSCy Schubert</dd>
3261052d159aSCy Schubert<dt><code>writevar</code> <kbd>assocID\ name</kbd> <kbd>=</kbd> <kbd>value</kbd> <kbd>[,...]</kbd></dt>
3262052d159aSCy Schubert<dd><p>Write (create or update) the specified variables.
326309100258SXin LIIf the
326409100258SXin LI<code>assocID</code>
326509100258SXin LIis zero, the variablea re from the
326609100258SXin LIsystem variables
326709100258SXin LIname space, otherwise they are from the
326809100258SXin LIpeer variables
326909100258SXin LIname space.
327009100258SXin LIThe
327109100258SXin LI<code>assocID</code>
327209100258SXin LIis required, as the same name can occur in both name spaces.
3273052d159aSCy Schubert</p></dd>
3274052d159aSCy 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>
3275052d159aSCy Schubert<dd><p>This command configures a trap receiver at the given host
32762b15cb3dSCy Schubertaddress and port number for sending messages with the specified
32772b15cb3dSCy Schubertlocal interface address.
32782b15cb3dSCy SchubertIf the port number is unspecified, a value
32792b15cb3dSCy Schubertof 18447 is used.
32802b15cb3dSCy SchubertIf the interface address is not specified, the
32812b15cb3dSCy Schubertmessage is sent with a source address of the local interface the
32822b15cb3dSCy Schubertmessage is sent through.
32832b15cb3dSCy SchubertNote that on a multihomed host the
32842b15cb3dSCy Schubertinterface used may vary from time to time with routing changes.
3285052d159aSCy Schubert</p></dd>
3286052d159aSCy Schubert<dt><code>ttl</code> <kbd>hop</kbd> <kbd>...</kbd></dt>
3287052d159aSCy Schubert<dd><p>This command specifies a list of TTL values in increasing order.
328809100258SXin LIUp to 8 values can be specified.
328909100258SXin LIIn
329009100258SXin LI<code>manycast</code>
329109100258SXin LImode these values are used in-turn in an expanding-ring search.
329209100258SXin LIThe default is eight multiples of 32 starting at 31.
3293052d159aSCy Schubert</p>
32942b15cb3dSCy Schubert<p>The trap receiver will generally log event messages and other
32952b15cb3dSCy Schubertinformation from the server in a log file.
32962b15cb3dSCy SchubertWhile such monitor
32972b15cb3dSCy Schubertprograms may also request their own trap dynamically, configuring a
32982b15cb3dSCy Schuberttrap receiver will ensure that no messages are lost when the server
32992b15cb3dSCy Schubertis started.
3300052d159aSCy Schubert</p></dd>
3301052d159aSCy Schubert<dt><code>hop</code> <kbd>...</kbd></dt>
3302052d159aSCy Schubert<dd><p>This command specifies a list of TTL values in increasing order, up to 8
33032b15cb3dSCy Schubertvalues can be specified.
33042b15cb3dSCy SchubertIn manycast mode these values are used in turn in
33052b15cb3dSCy Schubertan expanding-ring search.
33062b15cb3dSCy SchubertThe default is eight multiples of 32 starting at
33072b15cb3dSCy Schubert31.
3308052d159aSCy Schubert</p></dd>
33092b15cb3dSCy Schubert</dl>
33102b15cb3dSCy Schubert
33112b15cb3dSCy Schubert<p>This section was generated by <strong>AutoGen</strong>,
33122b15cb3dSCy Schubertusing the <code>agtexi-cmd</code> template and the option descriptions for the <code>ntp.conf</code> program.
33132b15cb3dSCy SchubertThis software is released under the NTP license, &lt;http://ntp.org/license&gt;.
3314052d159aSCy Schubert</p>
3315052d159aSCy Schubert<table class="menu" border="0" cellspacing="0">
3316a466cc55SCy 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
3317052d159aSCy Schubert</td></tr>
3318a466cc55SCy 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
3319052d159aSCy Schubert</td></tr>
3320a466cc55SCy 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
3321052d159aSCy Schubert</td></tr>
3322a466cc55SCy 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
3323052d159aSCy Schubert</td></tr>
3324052d159aSCy Schubert</table>
33252b15cb3dSCy Schubert
3326052d159aSCy Schubert<hr>
3327a466cc55SCy Schubert<span id="ntp_002econf-Files"></span><div class="header">
3328052d159aSCy Schubert<p>
3329052d159aSCy 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>
33302b15cb3dSCy Schubert</div>
3331a466cc55SCy Schubert<span id="ntp_002econf-Files-1"></span><h4 class="subsection">1.1.8 ntp.conf Files</h4>
3332052d159aSCy Schubert<dl compact="compact">
3333052d159aSCy Schubert<dt><samp>/etc/ntp.conf</samp></dt>
3334052d159aSCy Schubert<dd><p>the default name of the configuration file
3335052d159aSCy Schubert</p></dd>
3336052d159aSCy Schubert<dt><samp>ntp.keys</samp></dt>
3337052d159aSCy Schubert<dd><p>private MD5 keys
3338052d159aSCy Schubert</p></dd>
3339052d159aSCy Schubert<dt><samp>ntpkey</samp></dt>
3340052d159aSCy Schubert<dd><p>RSA private key
3341052d159aSCy Schubert</p></dd>
3342052d159aSCy Schubert<dt><samp>ntpkey_</samp><kbd>host</kbd></dt>
3343052d159aSCy Schubert<dd><p>RSA public key
3344052d159aSCy Schubert</p></dd>
3345052d159aSCy Schubert<dt><samp>ntp_dh</samp></dt>
3346052d159aSCy Schubert<dd><p>Diffie-Hellman agreement parameters
3347052d159aSCy Schubert</p></dd>
33482b15cb3dSCy Schubert</dl>
3349052d159aSCy Schubert<hr>
3350a466cc55SCy Schubert<span id="ntp_002econf-See-Also"></span><div class="header">
3351052d159aSCy Schubert<p>
3352052d159aSCy 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>
33532b15cb3dSCy Schubert</div>
3354a466cc55SCy Schubert<span id="ntp_002econf-See-Also-1"></span><h4 class="subsection">1.1.9 ntp.conf See Also</h4>
33552b15cb3dSCy Schubert<p><code>ntpd(1ntpdmdoc)</code>,
33562b15cb3dSCy Schubert<code>ntpdc(1ntpdcmdoc)</code>,
33572b15cb3dSCy Schubert<code>ntpq(1ntpqmdoc)</code>
3358052d159aSCy Schubert</p>
33592b15cb3dSCy Schubert<p>In addition to the manual pages provided,
33602b15cb3dSCy Schubertcomprehensive documentation is available on the world wide web
33612b15cb3dSCy Schubertat
33622b15cb3dSCy Schubert<code>http://www.ntp.org/</code>.
33632b15cb3dSCy SchubertA snapshot of this documentation is available in HTML format in
3364052d159aSCy Schubert<samp>/usr/share/doc/ntp</samp>.
33652b15cb3dSCy Schubert<br>
3366052d159aSCy Schubert</p>
3367052d159aSCy Schubert<br>
3368052d159aSCy Schubert<p>David L. Mills, <em>Network Time Protocol (Version 4)</em>, RFC5905
3369052d159aSCy Schubert</p><hr>
3370a466cc55SCy Schubert<span id="ntp_002econf-Bugs"></span><div class="header">
3371052d159aSCy Schubert<p>
3372052d159aSCy 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>
33732b15cb3dSCy Schubert</div>
3374a466cc55SCy Schubert<span id="ntp_002econf-Bugs-1"></span><h4 class="subsection">1.1.10 ntp.conf Bugs</h4>
33752b15cb3dSCy Schubert<p>The syntax checking is not picky; some combinations of
33762b15cb3dSCy Schubertridiculous and even hilarious options and modes may not be
33772b15cb3dSCy Schubertdetected.
3378052d159aSCy Schubert</p>
33792b15cb3dSCy Schubert<p>The
3380052d159aSCy Schubert<samp>ntpkey_</samp><kbd>host</kbd>
33812b15cb3dSCy Schubertfiles are really digital
33822b15cb3dSCy Schubertcertificates.
33832b15cb3dSCy SchubertThese should be obtained via secure directory
33842b15cb3dSCy Schubertservices when they become universally available.
3385052d159aSCy Schubert</p><hr>
3386052d159aSCy Schubert<div class="header">
3387052d159aSCy Schubert<p>
3388052d159aSCy Schubert &nbsp; </p>
33892b15cb3dSCy Schubert</div>
3390a466cc55SCy Schubert<span id="ntp_002econf-Notes-1"></span><h4 class="subsection">1.1.11 ntp.conf Notes</h4>
33912b15cb3dSCy Schubert<p>This document was derived from FreeBSD.
3392052d159aSCy Schubert</p><hr>
33932b15cb3dSCy Schubert
33942b15cb3dSCy Schubert
3395052d159aSCy Schubert
3396052d159aSCy Schubert</body>
3397052d159aSCy Schubert</html>
3398