1052d159aSCy Schubert<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> 2052d159aSCy Schubert<html> 3*a466cc55SCy 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’s Manual</title> 7052d159aSCy Schubert 8052d159aSCy Schubert<meta name="description" content="NTP Configuration File User’s Manual"> 9052d159aSCy Schubert<meta name="keywords" content="NTP Configuration File User’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’s Manual</h1> 39052d159aSCy Schubert 40052d159aSCy Schubert 41052d159aSCy Schubert 42052d159aSCy Schubert 43052d159aSCy Schubert 44*a466cc55SCy 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> </p> 472b15cb3dSCy Schubert</div> 48*a466cc55SCy Schubert<span id="NTP_0027s-Configuration-File-User-Manual"></span><h1 class="top">NTP’s Configuration File User Manual</h1> 492b15cb3dSCy Schubert 50052d159aSCy Schubert<p>This document describes the configuration file for the NTP Project’s 512b15cb3dSCy Schubert<code>ntpd</code> program. 52052d159aSCy Schubert</p> 53*a466cc55SCy Schubert<p>This document applies to version 4.2.8p16 of <code>ntp.conf</code>. 54052d159aSCy Schubert</p> 55*a466cc55SCy 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"> 60*a466cc55SCy 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"> 66*a466cc55SCy Schubert<tr><td align="left" valign="top">• <a href="#ntp_002econf-Description" accesskey="1">ntp.conf Description</a></td><td> </td><td align="left" valign="top"> 67052d159aSCy Schubert</td></tr> 68*a466cc55SCy Schubert<tr><td align="left" valign="top">• <a href="#ntp_002econf-Notes" accesskey="2">ntp.conf Notes</a></td><td> </td><td align="left" valign="top"> 69052d159aSCy Schubert</td></tr> 70052d159aSCy Schubert</table> 71052d159aSCy Schubert 72052d159aSCy Schubert<hr> 73*a466cc55SCy 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> </p> 762b15cb3dSCy Schubert</div> 77*a466cc55SCy 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"> 83*a466cc55SCy Schubert<tr><td align="left" valign="top">• <a href="#ntp_002econf-Notes" accesskey="1">Notes about ntp.conf</a></td><td> </td><td align="left" valign="top"> 84052d159aSCy Schubert</td></tr> 85052d159aSCy Schubert</table> 862b15cb3dSCy Schubert 87052d159aSCy Schubert<hr> 88*a466cc55SCy 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> </p> 912b15cb3dSCy Schubert</div> 92*a466cc55SCy Schubert<span id="Notes-about-ntp_002econf"></span><h3 class="section">1.1 Notes about ntp.conf</h3> 93*a466cc55SCy Schubert<span id="index-ntp_002econf"></span> 94*a466cc55SCy 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’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‘#’ 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"Notes on Configuring NTP and Setting up an NTP Subnet" 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‘Configuration Options’, 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"> 161*a466cc55SCy Schubert<tr><td align="left" valign="top">• <a href="#Configuration-Support" accesskey="1">Configuration Support</a></td><td> </td><td align="left" valign="top"> 162052d159aSCy Schubert</td></tr> 163*a466cc55SCy Schubert<tr><td align="left" valign="top">• <a href="#Authentication-Support" accesskey="2">Authentication Support</a></td><td> </td><td align="left" valign="top"> 164052d159aSCy Schubert</td></tr> 165*a466cc55SCy Schubert<tr><td align="left" valign="top">• <a href="#Monitoring-Support" accesskey="3">Monitoring Support</a></td><td> </td><td align="left" valign="top"> 166052d159aSCy Schubert</td></tr> 167*a466cc55SCy Schubert<tr><td align="left" valign="top">• <a href="#Access-Control-Support" accesskey="4">Access Control Support</a></td><td> </td><td align="left" valign="top"> 168052d159aSCy Schubert</td></tr> 169*a466cc55SCy Schubert<tr><td align="left" valign="top">• <a href="#Automatic-NTP-Configuration-Options" accesskey="5">Automatic NTP Configuration Options</a></td><td> </td><td align="left" valign="top"> 170052d159aSCy Schubert</td></tr> 171*a466cc55SCy Schubert<tr><td align="left" valign="top">• <a href="#Reference-Clock-Support" accesskey="6">Reference Clock Support</a></td><td> </td><td align="left" valign="top"> 172052d159aSCy Schubert</td></tr> 173*a466cc55SCy Schubert<tr><td align="left" valign="top">• <a href="#Miscellaneous-Options" accesskey="7">Miscellaneous Options</a></td><td> </td><td align="left" valign="top"> 174052d159aSCy Schubert</td></tr> 175*a466cc55SCy Schubert<tr><td align="left" valign="top">• <a href="#ntp_002econf-Files" accesskey="8">ntp.conf Files</a></td><td> </td><td align="left" valign="top"> 176052d159aSCy Schubert</td></tr> 177*a466cc55SCy Schubert<tr><td align="left" valign="top">• <a href="#ntp_002econf-See-Also" accesskey="9">ntp.conf See Also</a></td><td> </td><td align="left" valign="top"> 178052d159aSCy Schubert</td></tr> 179*a466cc55SCy Schubert<tr><td align="left" valign="top">• <a href="#ntp_002econf-Bugs">ntp.conf Bugs</a></td><td> </td><td align="left" valign="top"> 180052d159aSCy Schubert</td></tr> 181*a466cc55SCy Schubert<tr><td align="left" valign="top">• ntp.conf Notes</td><td> </td><td align="left" valign="top"> 182052d159aSCy Schubert</td></tr> 183052d159aSCy Schubert</table> 184052d159aSCy Schubert 185052d159aSCy Schubert<hr> 186*a466cc55SCy 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> </p> 1892b15cb3dSCy Schubert</div> 190*a466cc55SCy 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. 200*a466cc55SCy 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“:” 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"Association Management" 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‘Authentication Options’. 363052d159aSCy Schubert</p></dd> 364052d159aSCy Schubert<dt><code>burst</code></dt> 365052d159aSCy Schubert<dd><p>when the server is reachable, send a burst of eight packets 3662b15cb3dSCy Schubertinstead of the usual one. 3672b15cb3dSCy SchubertThe packet spacing is normally 2 s; 3682b15cb3dSCy Schuberthowever, the spacing between the first and second packets 3694990d495SXin LIcan be changed with the 3704990d495SXin LI<code>calldelay</code> 3714990d495SXin LIcommand to allow 3722b15cb3dSCy Schubertadditional time for a modem or ISDN call to complete. 3732b15cb3dSCy SchubertThis is designed to improve timekeeping quality 3742b15cb3dSCy Schubertwith the 3752b15cb3dSCy Schubert<code>server</code> 3762b15cb3dSCy Schubertcommand and s addresses. 377052d159aSCy Schubert</p></dd> 378052d159aSCy Schubert<dt><code>iburst</code></dt> 379052d159aSCy Schubert<dd><p>When the server is unreachable, send a burst of eight packets 3802b15cb3dSCy Schubertinstead of the usual one. 3812b15cb3dSCy SchubertThe packet spacing is normally 2 s; 3822b15cb3dSCy Schuberthowever, the spacing between the first two packets can be 3834990d495SXin LIchanged with the 3844990d495SXin LI<code>calldelay</code> 3854990d495SXin LIcommand to allow 3862b15cb3dSCy Schubertadditional time for a modem or ISDN call to complete. 3872b15cb3dSCy SchubertThis is designed to speed the initial synchronization 3882b15cb3dSCy Schubertacquisition with the 3892b15cb3dSCy Schubert<code>server</code> 3902b15cb3dSCy Schubertcommand and s addresses and when 3912b15cb3dSCy Schubert<code>ntpd(1ntpdmdoc)</code> 3922b15cb3dSCy Schubertis started with the 3932b15cb3dSCy Schubert<code>-q</code> 3942b15cb3dSCy Schubertoption. 395052d159aSCy Schubert</p></dd> 396052d159aSCy Schubert<dt><code>key</code> <kbd>key</kbd></dt> 397052d159aSCy Schubert<dd><p>All packets sent to and received from the server or peer are to 3982b15cb3dSCy Schubertinclude authentication fields encrypted using the specified 3992b15cb3dSCy Schubert<kbd>key</kbd> 4004e1ef62aSXin LIidentifier with values from 1 to 65535, inclusive. 4012b15cb3dSCy SchubertThe 4022b15cb3dSCy Schubertdefault is to include no encryption field. 403052d159aSCy Schubert</p></dd> 404052d159aSCy Schubert<dt><code>minpoll</code> <kbd>minpoll</kbd></dt> 405052d159aSCy Schubert<dt><code>maxpoll</code> <kbd>maxpoll</kbd></dt> 406052d159aSCy Schubert<dd><p>These options specify the minimum and maximum poll intervals 4072b15cb3dSCy Schubertfor NTP messages, as a power of 2 in seconds 4082b15cb3dSCy SchubertThe maximum poll 4092b15cb3dSCy Schubertinterval defaults to 10 (1,024 s), but can be increased by the 4102b15cb3dSCy Schubert<code>maxpoll</code> 4112b15cb3dSCy Schubertoption to an upper limit of 17 (36.4 h). 4122b15cb3dSCy SchubertThe 4132b15cb3dSCy Schubertminimum poll interval defaults to 6 (64 s), but can be decreased by 4142b15cb3dSCy Schubertthe 4152b15cb3dSCy Schubert<code>minpoll</code> 4162b15cb3dSCy Schubertoption to a lower limit of 4 (16 s). 417052d159aSCy Schubert</p></dd> 418052d159aSCy Schubert<dt><code>noselect</code></dt> 419052d159aSCy Schubert<dd><p>Marks the server as unused, except for display purposes. 4202b15cb3dSCy SchubertThe server is discarded by the selection algroithm. 421052d159aSCy Schubert</p></dd> 422052d159aSCy Schubert<dt><code>preempt</code></dt> 423052d159aSCy Schubert<dd><p>Says the association can be preempted. 424052d159aSCy Schubert</p></dd> 425052d159aSCy Schubert<dt><code>prefer</code></dt> 426052d159aSCy Schubert<dd><p>Marks the server as preferred. 4272b15cb3dSCy SchubertAll other things being equal, 4282b15cb3dSCy Schubertthis host will be chosen for synchronization among a set of 4292b15cb3dSCy Schubertcorrectly operating hosts. 4302b15cb3dSCy SchubertSee the 431052d159aSCy Schubert"Mitigation Rules and the prefer Keyword" 4322b15cb3dSCy Schubertpage 4332b15cb3dSCy Schubert(available as part of the HTML documentation 4342b15cb3dSCy Schubertprovided in 435052d159aSCy Schubert<samp>/usr/share/doc/ntp</samp>) 4362b15cb3dSCy Schubertfor further information. 437052d159aSCy Schubert</p></dd> 438052d159aSCy Schubert<dt><code>true</code></dt> 4392d4e511cSCy Schubert<dd><p>Marks the server as a truechimer, 4402d4e511cSCy Schubertforcing the association to always survive the selection and clustering algorithms. 441e27abb66SXin LIThis option should almost certainly 442e27abb66SXin LI<em>only</em> 443e27abb66SXin LIbe used while testing an association. 444052d159aSCy Schubert</p></dd> 445052d159aSCy Schubert<dt><code>ttl</code> <kbd>ttl</kbd></dt> 446052d159aSCy Schubert<dd><p>This option is used only with broadcast server and manycast 4472b15cb3dSCy Schubertclient modes. 4482b15cb3dSCy SchubertIt specifies the time-to-live 4492b15cb3dSCy Schubert<kbd>ttl</kbd> 4502b15cb3dSCy Schubertto 4512b15cb3dSCy Schubertuse on broadcast server and multicast server and the maximum 4522b15cb3dSCy Schubert<kbd>ttl</kbd> 4532b15cb3dSCy Schubertfor the expanding ring search with manycast 4542b15cb3dSCy Schubertclient packets. 4552b15cb3dSCy SchubertSelection of the proper value, which defaults to 4562b15cb3dSCy Schubert127, is something of a black art and should be coordinated with the 4572b15cb3dSCy Schubertnetwork administrator. 458052d159aSCy Schubert</p></dd> 459052d159aSCy Schubert<dt><code>version</code> <kbd>version</kbd></dt> 460052d159aSCy Schubert<dd><p>Specifies the version number to be used for outgoing NTP 4612b15cb3dSCy Schubertpackets. 4622b15cb3dSCy SchubertVersions 1-4 are the choices, with version 4 the 4632b15cb3dSCy Schubertdefault. 464052d159aSCy Schubert</p></dd> 465052d159aSCy Schubert<dt><code>xleave</code></dt> 466052d159aSCy Schubert<dd><p>Valid in 4674990d495SXin LI<code>peer</code> 4684990d495SXin LIand 4694990d495SXin LI<code>broadcast</code> 4704990d495SXin LImodes only, this flag enables interleave mode. 471052d159aSCy Schubert</p></dd> 4722d4e511cSCy Schubert<dt><code>xmtnonce</code></dt> 4732d4e511cSCy Schubert<dd><p>Valid only for 4742d4e511cSCy Schubert<code>server</code> 4752d4e511cSCy Schubertand 4762d4e511cSCy Schubert<code>pool</code> 4772d4e511cSCy Schubertmodes, this flag puts a random number in the packet’s transmit timestamp. 4782d4e511cSCy Schubert</p> 4792d4e511cSCy Schubert</dd> 4802b15cb3dSCy Schubert</dl> 481*a466cc55SCy Schubert<span id="Auxiliary-Commands"></span><h4 class="subsubsection">1.1.1.2 Auxiliary Commands</h4> 482052d159aSCy Schubert<dl compact="compact"> 483052d159aSCy Schubert<dt><code>broadcastclient</code></dt> 484052d159aSCy Schubert<dd><p>This command enables reception of broadcast server messages to 4852b15cb3dSCy Schubertany local interface (type b) address. 4862b15cb3dSCy SchubertUpon receiving a message for 4872b15cb3dSCy Schubertthe first time, the broadcast client measures the nominal server 4882b15cb3dSCy Schubertpropagation delay using a brief client/server exchange with the 4892b15cb3dSCy Schubertserver, then enters the broadcast client mode, in which it 4902b15cb3dSCy Schubertsynchronizes to succeeding broadcast messages. 4912b15cb3dSCy SchubertNote that, in order 4922b15cb3dSCy Schubertto avoid accidental or malicious disruption in this mode, both the 4932b15cb3dSCy Schubertserver and client should operate using symmetric-key or public-key 4942b15cb3dSCy Schubertauthentication as described in 495052d159aSCy Schubert‘Authentication Options’. 496052d159aSCy Schubert</p></dd> 497052d159aSCy Schubert<dt><code>manycastserver</code> <kbd>address</kbd> <kbd>...</kbd></dt> 498052d159aSCy Schubert<dd><p>This command enables reception of manycast client messages to 4992b15cb3dSCy Schubertthe multicast group address(es) (type m) specified. 5002b15cb3dSCy SchubertAt least one 5012b15cb3dSCy Schubertaddress is required, but the NTP multicast address 224.0.1.1 5022b15cb3dSCy Schubertassigned by the IANA should NOT be used, unless specific means are 5032b15cb3dSCy Schuberttaken to limit the span of the reply and avoid a possibly massive 5042b15cb3dSCy Schubertimplosion at the original sender. 5052b15cb3dSCy SchubertNote that, in order to avoid 5062b15cb3dSCy Schubertaccidental or malicious disruption in this mode, both the server 5072b15cb3dSCy Schubertand client should operate using symmetric-key or public-key 5082b15cb3dSCy Schubertauthentication as described in 509052d159aSCy Schubert‘Authentication Options’. 510052d159aSCy Schubert</p></dd> 511052d159aSCy Schubert<dt><code>multicastclient</code> <kbd>address</kbd> <kbd>...</kbd></dt> 512052d159aSCy Schubert<dd><p>This command enables reception of multicast server messages to 5132b15cb3dSCy Schubertthe multicast group address(es) (type m) specified. 5142b15cb3dSCy SchubertUpon receiving 5152b15cb3dSCy Schuberta message for the first time, the multicast client measures the 5162b15cb3dSCy Schubertnominal server propagation delay using a brief client/server 5172b15cb3dSCy Schubertexchange with the server, then enters the broadcast client mode, in 5182b15cb3dSCy Schubertwhich it synchronizes to succeeding multicast messages. 5192b15cb3dSCy SchubertNote that, 5202b15cb3dSCy Schubertin order to avoid accidental or malicious disruption in this mode, 5212b15cb3dSCy Schubertboth the server and client should operate using symmetric-key or 5222b15cb3dSCy Schubertpublic-key authentication as described in 523052d159aSCy Schubert‘Authentication Options’. 524052d159aSCy Schubert</p></dd> 525052d159aSCy Schubert<dt><code>mdnstries</code> <kbd>number</kbd></dt> 526052d159aSCy Schubert<dd><p>If we are participating in mDNS, 5272b15cb3dSCy Schubertafter we have synched for the first time 5282b15cb3dSCy Schubertwe attempt to register with the mDNS system. 5292b15cb3dSCy SchubertIf that registration attempt fails, 5302b15cb3dSCy Schubertwe try again at one minute intervals for up to 5312b15cb3dSCy Schubert<code>mdnstries</code> 5322b15cb3dSCy Schuberttimes. 5332b15cb3dSCy SchubertAfter all, 5342b15cb3dSCy Schubert<code>ntpd</code> 5352b15cb3dSCy Schubertmay be starting before mDNS. 5362b15cb3dSCy SchubertThe default value for 5372b15cb3dSCy Schubert<code>mdnstries</code> 5382b15cb3dSCy Schubertis 5. 539052d159aSCy Schubert</p></dd> 5402b15cb3dSCy Schubert</dl> 541052d159aSCy Schubert<hr> 542*a466cc55SCy Schubert<span id="Authentication-Support"></span><div class="header"> 543052d159aSCy Schubert<p> 544052d159aSCy 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> </p> 5452b15cb3dSCy Schubert</div> 546*a466cc55SCy Schubert<span id="Authentication-Support-1"></span><h4 class="subsection">1.1.2 Authentication Support</h4> 5472b15cb3dSCy Schubert<p>Authentication support allows the NTP client to verify that the 5482b15cb3dSCy Schubertserver is in fact known and trusted and not an intruder intending 5492b15cb3dSCy Schubertaccidentally or on purpose to masquerade as that server. 5502b15cb3dSCy SchubertThe NTPv3 5512b15cb3dSCy Schubertspecification RFC-1305 defines a scheme which provides 5522b15cb3dSCy Schubertcryptographic authentication of received NTP packets. 5532b15cb3dSCy SchubertOriginally, 5542b15cb3dSCy Schubertthis was done using the Data Encryption Standard (DES) algorithm 5552b15cb3dSCy Schubertoperating in Cipher Block Chaining (CBC) mode, commonly called 5562b15cb3dSCy SchubertDES-CBC. 5572b15cb3dSCy SchubertSubsequently, this was replaced by the RSA Message Digest 5582b15cb3dSCy Schubert5 (MD5) algorithm using a private key, commonly called keyed-MD5. 5592b15cb3dSCy SchubertEither algorithm computes a message digest, or one-way hash, which 5602b15cb3dSCy Schubertcan be used to verify the server has the correct private key and 5612b15cb3dSCy Schubertkey identifier. 562052d159aSCy Schubert</p> 5632b15cb3dSCy Schubert<p>NTPv4 retains the NTPv3 scheme, properly described as symmetric key 5642b15cb3dSCy Schubertcryptography and, in addition, provides a new Autokey scheme 5652b15cb3dSCy Schubertbased on public key cryptography. 5662b15cb3dSCy SchubertPublic key cryptography is generally considered more secure 5672b15cb3dSCy Schubertthan symmetric key cryptography, since the security is based 5682b15cb3dSCy Schuberton a private value which is generated by each server and 5692b15cb3dSCy Schubertnever revealed. 5702b15cb3dSCy SchubertWith Autokey all key distribution and 5712b15cb3dSCy Schubertmanagement functions involve only public values, which 5722b15cb3dSCy Schubertconsiderably simplifies key distribution and storage. 5732b15cb3dSCy SchubertPublic key management is based on X.509 certificates, 5742b15cb3dSCy Schubertwhich can be provided by commercial services or 5752b15cb3dSCy Schubertproduced by utility programs in the OpenSSL software library 5762b15cb3dSCy Schubertor the NTPv4 distribution. 577052d159aSCy Schubert</p> 5782b15cb3dSCy Schubert<p>While the algorithms for symmetric key cryptography are 5792b15cb3dSCy Schubertincluded in the NTPv4 distribution, public key cryptography 5802b15cb3dSCy Schubertrequires the OpenSSL software library to be installed 5812b15cb3dSCy Schubertbefore building the NTP distribution. 5822b15cb3dSCy SchubertDirections for doing that 5832b15cb3dSCy Schubertare on the Building and Installing the Distribution page. 584052d159aSCy Schubert</p> 5852b15cb3dSCy Schubert<p>Authentication is configured separately for each association 5862b15cb3dSCy Schubertusing the 5872b15cb3dSCy Schubert<code>key</code> 5882b15cb3dSCy Schubertor 5892b15cb3dSCy Schubert<code>autokey</code> 5902b15cb3dSCy Schubertsubcommand on the 5912b15cb3dSCy Schubert<code>peer</code>, 5922b15cb3dSCy Schubert<code>server</code>, 5932b15cb3dSCy Schubert<code>broadcast</code> 5942b15cb3dSCy Schubertand 5952b15cb3dSCy Schubert<code>manycastclient</code> 5962b15cb3dSCy Schubertconfiguration commands as described in 597052d159aSCy Schubert‘Configuration Options’ 5982b15cb3dSCy Schubertpage. 5992b15cb3dSCy SchubertThe authentication 6002b15cb3dSCy Schubertoptions described below specify the locations of the key files, 6012b15cb3dSCy Schubertif other than default, which symmetric keys are trusted 6022b15cb3dSCy Schubertand the interval between various operations, if other than default. 603052d159aSCy Schubert</p> 6042b15cb3dSCy Schubert<p>Authentication is always enabled, 6052b15cb3dSCy Schubertalthough ineffective if not configured as 6062b15cb3dSCy Schubertdescribed below. 6072b15cb3dSCy SchubertIf a NTP packet arrives 6082b15cb3dSCy Schubertincluding a message authentication 6092b15cb3dSCy Schubertcode (MAC), it is accepted only if it 6102b15cb3dSCy Schubertpasses all cryptographic checks. 6112b15cb3dSCy SchubertThe 6122b15cb3dSCy Schubertchecks require correct key ID, key value 6132b15cb3dSCy Schubertand message digest. 6142b15cb3dSCy SchubertIf the packet has 6152b15cb3dSCy Schubertbeen modified in any way or replayed 6162b15cb3dSCy Schubertby an intruder, it will fail one or more 6172b15cb3dSCy Schubertof these checks and be discarded. 6182b15cb3dSCy SchubertFurthermore, the Autokey scheme requires a 6192b15cb3dSCy Schubertpreliminary protocol exchange to obtain 6202b15cb3dSCy Schubertthe server certificate, verify its 6212b15cb3dSCy Schubertcredentials and initialize the protocol 622052d159aSCy Schubert</p> 6232b15cb3dSCy Schubert<p>The 6242b15cb3dSCy Schubert<code>auth</code> 6252b15cb3dSCy Schubertflag controls whether new associations or 6262b15cb3dSCy Schubertremote configuration commands require cryptographic authentication. 6272b15cb3dSCy SchubertThis flag can be set or reset by the 6282b15cb3dSCy Schubert<code>enable</code> 6292b15cb3dSCy Schubertand 6302b15cb3dSCy Schubert<code>disable</code> 6312b15cb3dSCy Schubertcommands and also by remote 6322b15cb3dSCy Schubertconfiguration commands sent by a 6332b15cb3dSCy Schubert<code>ntpdc(1ntpdcmdoc)</code> 634e27abb66SXin LIprogram running on 6352b15cb3dSCy Schubertanother machine. 6362b15cb3dSCy SchubertIf this flag is enabled, which is the default 6372b15cb3dSCy Schubertcase, new broadcast client and symmetric passive associations and 6382b15cb3dSCy Schubertremote configuration commands must be cryptographically 6392b15cb3dSCy Schubertauthenticated using either symmetric key or public key cryptography. 6402b15cb3dSCy SchubertIf this 6412b15cb3dSCy Schubertflag is disabled, these operations are effective 6422b15cb3dSCy Schuberteven if not cryptographic 6432b15cb3dSCy Schubertauthenticated. 6442b15cb3dSCy SchubertIt should be understood 6452b15cb3dSCy Schubertthat operating with the 6462b15cb3dSCy Schubert<code>auth</code> 6472b15cb3dSCy Schubertflag disabled invites a significant vulnerability 6482b15cb3dSCy Schubertwhere a rogue hacker can 6492b15cb3dSCy Schubertmasquerade as a falseticker and seriously 6502b15cb3dSCy Schubertdisrupt system timekeeping. 6512b15cb3dSCy SchubertIt is 6522b15cb3dSCy Schubertimportant to note that this flag has no purpose 6532b15cb3dSCy Schubertother than to allow or disallow 6542b15cb3dSCy Schuberta new association in response to new broadcast 6552b15cb3dSCy Schubertand symmetric active messages 6562b15cb3dSCy Schubertand remote configuration commands and, in particular, 6572b15cb3dSCy Schubertthe flag has no effect on 6582b15cb3dSCy Schubertthe authentication process itself. 659052d159aSCy Schubert</p> 6602b15cb3dSCy Schubert<p>An attractive alternative where multicast support is available 6612b15cb3dSCy Schubertis manycast mode, in which clients periodically troll 6622b15cb3dSCy Schubertfor servers as described in the 6632b15cb3dSCy Schubert<a href="#Automatic-NTP-Configuration-Options">Automatic NTP Configuration Options</a> 6642b15cb3dSCy Schubertpage. 6652b15cb3dSCy SchubertEither symmetric key or public key 6662b15cb3dSCy Schubertcryptographic authentication can be used in this mode. 6672b15cb3dSCy SchubertThe principle advantage 6682b15cb3dSCy Schubertof manycast mode is that potential servers need not be 6692b15cb3dSCy Schubertconfigured in advance, 6702b15cb3dSCy Schubertsince the client finds them during regular operation, 6712b15cb3dSCy Schubertand the configuration 6722b15cb3dSCy Schubertfiles for all clients can be identical. 673052d159aSCy Schubert</p> 6742b15cb3dSCy Schubert<p>The security model and protocol schemes for 6752b15cb3dSCy Schubertboth symmetric key and public key 6762b15cb3dSCy Schubertcryptography are summarized below; 6772b15cb3dSCy Schubertfurther details are in the briefings, papers 6782b15cb3dSCy Schubertand reports at the NTP project page linked from 6792b15cb3dSCy Schubert<code>http://www.ntp.org/</code>. 680*a466cc55SCy Schubert</p><span id="Symmetric_002dKey-Cryptography"></span><h4 class="subsubsection">1.1.2.1 Symmetric-Key Cryptography</h4> 6812b15cb3dSCy Schubert<p>The original RFC-1305 specification allows any one of possibly 6824e1ef62aSXin LI65,535 keys, each distinguished by a 32-bit key identifier, to 6832b15cb3dSCy Schubertauthenticate an association. 6842b15cb3dSCy SchubertThe servers and clients involved must 6852b15cb3dSCy Schubertagree on the key and key identifier to 6862b15cb3dSCy Schubertauthenticate NTP packets. 6872b15cb3dSCy SchubertKeys and 6882b15cb3dSCy Schubertrelated information are specified in a key 6892b15cb3dSCy Schubertfile, usually called 690052d159aSCy Schubert<samp>ntp.keys</samp>, 6912b15cb3dSCy Schubertwhich must be distributed and stored using 6922b15cb3dSCy Schubertsecure means beyond the scope of the NTP protocol itself. 6932b15cb3dSCy SchubertBesides the keys used 6942b15cb3dSCy Schubertfor ordinary NTP associations, 6952b15cb3dSCy Schubertadditional keys can be used as passwords for the 6962b15cb3dSCy Schubert<code>ntpq(1ntpqmdoc)</code> 6972b15cb3dSCy Schubertand 6982b15cb3dSCy Schubert<code>ntpdc(1ntpdcmdoc)</code> 6992b15cb3dSCy Schubertutility programs. 700052d159aSCy Schubert</p> 7012b15cb3dSCy Schubert<p>When 7022b15cb3dSCy Schubert<code>ntpd(1ntpdmdoc)</code> 7032b15cb3dSCy Schubertis first started, it reads the key file specified in the 7042b15cb3dSCy Schubert<code>keys</code> 7052b15cb3dSCy Schubertconfiguration command and installs the keys 7062b15cb3dSCy Schubertin the key cache. 7072b15cb3dSCy SchubertHowever, 7082b15cb3dSCy Schubertindividual keys must be activated with the 7092b15cb3dSCy Schubert<code>trusted</code> 7102b15cb3dSCy Schubertcommand before use. 7112b15cb3dSCy SchubertThis 7122b15cb3dSCy Schubertallows, for instance, the installation of possibly 7132b15cb3dSCy Schubertseveral batches of keys and 7142b15cb3dSCy Schubertthen activating or deactivating each batch 7152b15cb3dSCy Schubertremotely using 7162b15cb3dSCy Schubert<code>ntpdc(1ntpdcmdoc)</code>. 7172b15cb3dSCy SchubertThis also provides a revocation capability that can be used 7182b15cb3dSCy Schubertif a key becomes compromised. 7192b15cb3dSCy SchubertThe 7202b15cb3dSCy Schubert<code>requestkey</code> 7212b15cb3dSCy Schubertcommand selects the key used as the password for the 7222b15cb3dSCy Schubert<code>ntpdc(1ntpdcmdoc)</code> 7232b15cb3dSCy Schubertutility, while the 7242b15cb3dSCy Schubert<code>controlkey</code> 7252b15cb3dSCy Schubertcommand selects the key used as the password for the 7262b15cb3dSCy Schubert<code>ntpq(1ntpqmdoc)</code> 7272b15cb3dSCy Schubertutility. 728*a466cc55SCy Schubert</p><span id="Public-Key-Cryptography"></span><h4 class="subsubsection">1.1.2.2 Public Key Cryptography</h4> 7292b15cb3dSCy Schubert<p>NTPv4 supports the original NTPv3 symmetric key scheme 7302b15cb3dSCy Schubertdescribed in RFC-1305 and in addition the Autokey protocol, 7312b15cb3dSCy Schubertwhich is based on public key cryptography. 7322b15cb3dSCy SchubertThe Autokey Version 2 protocol described on the Autokey Protocol 7332b15cb3dSCy Schubertpage verifies packet integrity using MD5 message digests 7342b15cb3dSCy Schubertand verifies the source with digital signatures and any of several 7352b15cb3dSCy Schubertdigest/signature schemes. 7362b15cb3dSCy SchubertOptional identity schemes described on the Identity Schemes 7372b15cb3dSCy Schubertpage and based on cryptographic challenge/response algorithms 7382b15cb3dSCy Schubertare also available. 7392b15cb3dSCy SchubertUsing all of these schemes provides strong security against 7402b15cb3dSCy Schubertreplay with or without modification, spoofing, masquerade 7412b15cb3dSCy Schubertand most forms of clogging attacks. 742052d159aSCy Schubert</p> 7432b15cb3dSCy Schubert<p>The Autokey protocol has several modes of operation 7442b15cb3dSCy Schubertcorresponding to the various NTP modes supported. 7452b15cb3dSCy SchubertMost modes use a special cookie which can be 7462b15cb3dSCy Schubertcomputed independently by the client and server, 7472b15cb3dSCy Schubertbut encrypted in transmission. 7482b15cb3dSCy SchubertAll modes use in addition a variant of the S-KEY scheme, 7492b15cb3dSCy Schubertin which a pseudo-random key list is generated and used 7502b15cb3dSCy Schubertin reverse order. 7512b15cb3dSCy SchubertThese schemes are described along with an executive summary, 7522b15cb3dSCy Schubertcurrent status, briefing slides and reading list on the 753052d159aSCy Schubert‘Autonomous Authentication’ 7542b15cb3dSCy Schubertpage. 755052d159aSCy Schubert</p> 7562b15cb3dSCy Schubert<p>The specific cryptographic environment used by Autokey servers 7572b15cb3dSCy Schubertand clients is determined by a set of files 7582b15cb3dSCy Schubertand soft links generated by the 7592b15cb3dSCy Schubert<code>ntp-keygen(1ntpkeygenmdoc)</code> 7602b15cb3dSCy Schubertprogram. 7612b15cb3dSCy SchubertThis includes a required host key file, 7622b15cb3dSCy Schubertrequired certificate file and optional sign key file, 7632b15cb3dSCy Schubertleapsecond file and identity scheme files. 7642b15cb3dSCy SchubertThe 7652b15cb3dSCy Schubertdigest/signature scheme is specified in the X.509 certificate 7662b15cb3dSCy Schubertalong with the matching sign key. 7672b15cb3dSCy SchubertThere are several schemes 7682b15cb3dSCy Schubertavailable in the OpenSSL software library, each identified 7692b15cb3dSCy Schubertby a specific string such as 7702b15cb3dSCy Schubert<code>md5WithRSAEncryption</code>, 7712b15cb3dSCy Schubertwhich stands for the MD5 message digest with RSA 7722b15cb3dSCy Schubertencryption scheme. 7732b15cb3dSCy SchubertThe current NTP distribution supports 7742b15cb3dSCy Schubertall the schemes in the OpenSSL library, including 7752b15cb3dSCy Schubertthose based on RSA and DSA digital signatures. 776052d159aSCy Schubert</p> 7772b15cb3dSCy Schubert<p>NTP secure groups can be used to define cryptographic compartments 7782b15cb3dSCy Schubertand security hierarchies. 7792b15cb3dSCy SchubertIt is important that every host 7802b15cb3dSCy Schubertin the group be able to construct a certificate trail to one 7812b15cb3dSCy Schubertor more trusted hosts in the same group. 7822b15cb3dSCy SchubertEach group 7832b15cb3dSCy Schuberthost runs the Autokey protocol to obtain the certificates 7842b15cb3dSCy Schubertfor all hosts along the trail to one or more trusted hosts. 7852b15cb3dSCy SchubertThis requires the configuration file in all hosts to be 7862b15cb3dSCy Schubertengineered so that, even under anticipated failure conditions, 7872b15cb3dSCy Schubertthe NTP subnet will form such that every group host can find 7882b15cb3dSCy Schuberta trail to at least one trusted host. 789*a466cc55SCy Schubert</p><span id="Naming-and-Addressing"></span><h4 class="subsubsection">1.1.2.3 Naming and Addressing</h4> 7902b15cb3dSCy Schubert<p>It is important to note that Autokey does not use DNS to 791052d159aSCy Schubertresolve addresses, since DNS can’t be completely trusted 7922b15cb3dSCy Schubertuntil the name servers have synchronized clocks. 7932b15cb3dSCy SchubertThe cryptographic name used by Autokey to bind the host identity 7942b15cb3dSCy Schubertcredentials and cryptographic values must be independent 7952b15cb3dSCy Schubertof interface, network and any other naming convention. 7962b15cb3dSCy SchubertThe name appears in the host certificate in either or both 7972b15cb3dSCy Schubertthe subject and issuer fields, so protection against 7982b15cb3dSCy SchubertDNS compromise is essential. 799052d159aSCy Schubert</p> 8002b15cb3dSCy Schubert<p>By convention, the name of an Autokey host is the name returned 8012b15cb3dSCy Schubertby the Unix 8022b15cb3dSCy Schubert<code>gethostname(2)</code> 8032b15cb3dSCy Schubertsystem call or equivalent in other systems. 8042b15cb3dSCy SchubertBy the system design 8052b15cb3dSCy Schubertmodel, there are no provisions to allow alternate names or aliases. 8062b15cb3dSCy SchubertHowever, this is not to say that DNS aliases, different names 8072b15cb3dSCy Schubertfor each interface, etc., are constrained in any way. 808052d159aSCy Schubert</p> 8092b15cb3dSCy Schubert<p>It is also important to note that Autokey verifies authenticity 8102b15cb3dSCy Schubertusing the host name, network address and public keys, 8112b15cb3dSCy Schubertall of which are bound together by the protocol specifically 8122b15cb3dSCy Schubertto deflect masquerade attacks. 8132b15cb3dSCy SchubertFor this reason Autokey 814e27abb66SXin LIincludes the source and destination IP addresses in message digest 8152b15cb3dSCy Schubertcomputations and so the same addresses must be available 8162b15cb3dSCy Schubertat both the server and client. 8172b15cb3dSCy SchubertFor this reason operation 8182b15cb3dSCy Schubertwith network address translation schemes is not possible. 8192b15cb3dSCy SchubertThis reflects the intended robust security model where government 8202b15cb3dSCy Schubertand corporate NTP servers are operated outside firewall perimeters. 821*a466cc55SCy Schubert</p><span id="Operation"></span><h4 class="subsubsection">1.1.2.4 Operation</h4> 8222b15cb3dSCy Schubert<p>A specific combination of authentication scheme (none, 8232b15cb3dSCy Schubertsymmetric key, public key) and identity scheme is called 8242b15cb3dSCy Schuberta cryptotype, although not all combinations are compatible. 8252b15cb3dSCy SchubertThere may be management configurations where the clients, 8262b15cb3dSCy Schubertservers and peers may not all support the same cryptotypes. 8272b15cb3dSCy SchubertA secure NTPv4 subnet can be configured in many ways while 8282b15cb3dSCy Schubertkeeping in mind the principles explained above and 8292b15cb3dSCy Schubertin this section. 8302b15cb3dSCy SchubertNote however that some cryptotype 8312b15cb3dSCy Schubertcombinations may successfully interoperate with each other, 8322b15cb3dSCy Schubertbut may not represent good security practice. 833052d159aSCy Schubert</p> 8342b15cb3dSCy Schubert<p>The cryptotype of an association is determined at the time 8352b15cb3dSCy Schubertof mobilization, either at configuration time or some time 8362b15cb3dSCy Schubertlater when a message of appropriate cryptotype arrives. 8372b15cb3dSCy SchubertWhen mobilized by a 8382b15cb3dSCy Schubert<code>server</code> 8392b15cb3dSCy Schubertor 8402b15cb3dSCy Schubert<code>peer</code> 8412b15cb3dSCy Schubertconfiguration command and no 8422b15cb3dSCy Schubert<code>key</code> 8432b15cb3dSCy Schubertor 8442b15cb3dSCy Schubert<code>autokey</code> 8452b15cb3dSCy Schubertsubcommands are present, the association is not 8462b15cb3dSCy Schubertauthenticated; if the 8472b15cb3dSCy Schubert<code>key</code> 8482b15cb3dSCy Schubertsubcommand is present, the association is authenticated 8492b15cb3dSCy Schubertusing the symmetric key ID specified; if the 8502b15cb3dSCy Schubert<code>autokey</code> 8512b15cb3dSCy Schubertsubcommand is present, the association is authenticated 8522b15cb3dSCy Schubertusing Autokey. 853052d159aSCy Schubert</p> 8542b15cb3dSCy Schubert<p>When multiple identity schemes are supported in the Autokey 8552b15cb3dSCy Schubertprotocol, the first message exchange determines which one is used. 8562b15cb3dSCy SchubertThe client request message contains bits corresponding 8572b15cb3dSCy Schubertto which schemes it has available. 8582b15cb3dSCy SchubertThe server response message 8592b15cb3dSCy Schubertcontains bits corresponding to which schemes it has available. 8602b15cb3dSCy SchubertBoth server and client match the received bits with their own 8612b15cb3dSCy Schubertand select a common scheme. 862052d159aSCy Schubert</p> 8632b15cb3dSCy Schubert<p>Following the principle that time is a public value, 8642b15cb3dSCy Schuberta server responds to any client packet that matches 8652b15cb3dSCy Schubertits cryptotype capabilities. 8662b15cb3dSCy SchubertThus, a server receiving 8672b15cb3dSCy Schubertan unauthenticated packet will respond with an unauthenticated 8682b15cb3dSCy Schubertpacket, while the same server receiving a packet of a cryptotype 8692b15cb3dSCy Schubertit supports will respond with packets of that cryptotype. 8702b15cb3dSCy SchubertHowever, unconfigured broadcast or manycast client 8712b15cb3dSCy Schubertassociations or symmetric passive associations will not be 8722b15cb3dSCy Schubertmobilized unless the server supports a cryptotype compatible 8732b15cb3dSCy Schubertwith the first packet received. 8742b15cb3dSCy SchubertBy default, unauthenticated associations will not be mobilized 8752b15cb3dSCy Schubertunless overridden in a decidedly dangerous way. 876052d159aSCy Schubert</p> 8772b15cb3dSCy Schubert<p>Some examples may help to reduce confusion. 8782b15cb3dSCy SchubertClient Alice has no specific cryptotype selected. 8792b15cb3dSCy SchubertServer Bob has both a symmetric key file and minimal Autokey files. 880052d159aSCy SchubertAlice’s unauthenticated messages arrive at Bob, who replies with 8812b15cb3dSCy Schubertunauthenticated messages. 882052d159aSCy SchubertCathy has a copy of Bob’s symmetric 8832b15cb3dSCy Schubertkey file and has selected key ID 4 in messages to Bob. 8842b15cb3dSCy SchubertBob verifies the message with his key ID 4. 885052d159aSCy SchubertIf it’s the 8862b15cb3dSCy Schubertsame key and the message is verified, Bob sends Cathy a reply 8872b15cb3dSCy Schubertauthenticated with that key. 8882b15cb3dSCy SchubertIf verification fails, 8892b15cb3dSCy SchubertBob sends Cathy a thing called a crypto-NAK, which tells her 8902b15cb3dSCy Schubertsomething broke. 8912b15cb3dSCy SchubertShe can see the evidence using the 8922b15cb3dSCy Schubert<code>ntpq(1ntpqmdoc)</code> 8932b15cb3dSCy Schubertprogram. 894052d159aSCy Schubert</p> 8952b15cb3dSCy Schubert<p>Denise has rolled her own host key and certificate. 8962b15cb3dSCy SchubertShe also uses one of the identity schemes as Bob. 8972b15cb3dSCy SchubertShe sends the first Autokey message to Bob and they 8982b15cb3dSCy Schubertboth dance the protocol authentication and identity steps. 8992b15cb3dSCy SchubertIf all comes out okay, Denise and Bob continue as described above. 900052d159aSCy Schubert</p> 9012b15cb3dSCy Schubert<p>It should be clear from the above that Bob can support 9022b15cb3dSCy Schubertall the girls at the same time, as long as he has compatible 9032b15cb3dSCy Schubertauthentication and identity credentials. 9042b15cb3dSCy SchubertNow, Bob can act just like the girls in his own choice of servers; 9052b15cb3dSCy Schuberthe can run multiple configured associations with multiple different 9062b15cb3dSCy Schubertservers (or the same server, although that might not be useful). 9072b15cb3dSCy SchubertBut, wise security policy might preclude some cryptotype 9082b15cb3dSCy Schubertcombinations; for instance, running an identity scheme 9092b15cb3dSCy Schubertwith one server and no authentication with another might not be wise. 910*a466cc55SCy Schubert</p><span id="Key-Management"></span><h4 class="subsubsection">1.1.2.5 Key Management</h4> 9112b15cb3dSCy Schubert<p>The cryptographic values used by the Autokey protocol are 9122b15cb3dSCy Schubertincorporated as a set of files generated by the 9132b15cb3dSCy Schubert<code>ntp-keygen(1ntpkeygenmdoc)</code> 9142b15cb3dSCy Schubertutility program, including symmetric key, host key and 9152b15cb3dSCy Schubertpublic certificate files, as well as sign key, identity parameters 9162b15cb3dSCy Schubertand leapseconds files. 9172b15cb3dSCy SchubertAlternatively, host and sign keys and 9182b15cb3dSCy Schubertcertificate files can be generated by the OpenSSL utilities 9192b15cb3dSCy Schubertand certificates can be imported from public certificate 9202b15cb3dSCy Schubertauthorities. 9212b15cb3dSCy SchubertNote that symmetric keys are necessary for the 9222b15cb3dSCy Schubert<code>ntpq(1ntpqmdoc)</code> 9232b15cb3dSCy Schubertand 9242b15cb3dSCy Schubert<code>ntpdc(1ntpdcmdoc)</code> 9252b15cb3dSCy Schubertutility programs. 9262b15cb3dSCy SchubertThe remaining files are necessary only for the 9272b15cb3dSCy SchubertAutokey protocol. 928052d159aSCy Schubert</p> 9292b15cb3dSCy Schubert<p>Certificates imported from OpenSSL or public certificate 9302b15cb3dSCy Schubertauthorities have certian limitations. 9312b15cb3dSCy SchubertThe certificate should be in ASN.1 syntax, X.509 Version 3 9322b15cb3dSCy Schubertformat and encoded in PEM, which is the same format 9332b15cb3dSCy Schubertused by OpenSSL. 9342b15cb3dSCy SchubertThe overall length of the certificate encoded 9352b15cb3dSCy Schubertin ASN.1 must not exceed 1024 bytes. 9362b15cb3dSCy SchubertThe subject distinguished 9372b15cb3dSCy Schubertname field (CN) is the fully qualified name of the host 9382b15cb3dSCy Schuberton which it is used; the remaining subject fields are ignored. 9392b15cb3dSCy SchubertThe certificate extension fields must not contain either 9402b15cb3dSCy Schuberta subject key identifier or a issuer key identifier field; 9412b15cb3dSCy Schuberthowever, an extended key usage field for a trusted host must 9422b15cb3dSCy Schubertcontain the value 9432b15cb3dSCy Schubert<code>trustRoot</code>;. 9442b15cb3dSCy SchubertOther extension fields are ignored. 945*a466cc55SCy Schubert</p><span id="Authentication-Commands"></span><h4 class="subsubsection">1.1.2.6 Authentication Commands</h4> 946052d159aSCy Schubert<dl compact="compact"> 947052d159aSCy Schubert<dt><code>autokey</code> <code>[<kbd>logsec</kbd>]</code></dt> 948052d159aSCy Schubert<dd><p>Specifies the interval between regenerations of the session key 9492b15cb3dSCy Schubertlist used with the Autokey protocol. 9502b15cb3dSCy SchubertNote that the size of the key 9512b15cb3dSCy Schubertlist for each association depends on this interval and the current 9522b15cb3dSCy Schubertpoll interval. 9532b15cb3dSCy SchubertThe default value is 12 (4096 s or about 1.1 hours). 9542b15cb3dSCy SchubertFor poll intervals above the specified interval, a session key list 9552b15cb3dSCy Schubertwith a single entry will be regenerated for every message 9562b15cb3dSCy Schubertsent. 957052d159aSCy Schubert</p></dd> 958052d159aSCy Schubert<dt><code>controlkey</code> <kbd>key</kbd></dt> 959052d159aSCy Schubert<dd><p>Specifies the key identifier to use with the 9602b15cb3dSCy Schubert<code>ntpq(1ntpqmdoc)</code> 9612b15cb3dSCy Schubertutility, which uses the standard 9622b15cb3dSCy Schubertprotocol defined in RFC-1305. 9632b15cb3dSCy SchubertThe 9642b15cb3dSCy Schubert<kbd>key</kbd> 9652b15cb3dSCy Schubertargument is 9662b15cb3dSCy Schubertthe key identifier for a trusted key, where the value can be in the 9674e1ef62aSXin LIrange 1 to 65,535, inclusive. 968052d159aSCy Schubert</p></dd> 969052d159aSCy Schubert<dt><code>crypto</code> <code>[<code>cert</code> <kbd>file</kbd>]</code> <code>[<code>leap</code> <kbd>file</kbd>]</code> <code>[<code>randfile</code> <kbd>file</kbd>]</code> <code>[<code>host</code> <kbd>file</kbd>]</code> <code>[<code>sign</code> <kbd>file</kbd>]</code> <code>[<code>gq</code> <kbd>file</kbd>]</code> <code>[<code>gqpar</code> <kbd>file</kbd>]</code> <code>[<code>iffpar</code> <kbd>file</kbd>]</code> <code>[<code>mvpar</code> <kbd>file</kbd>]</code> <code>[<code>pw</code> <kbd>password</kbd>]</code></dt> 970052d159aSCy Schubert<dd><p>This command requires the OpenSSL library. 9712b15cb3dSCy SchubertIt activates public key 9722b15cb3dSCy Schubertcryptography, selects the message digest and signature 9732b15cb3dSCy Schubertencryption scheme and loads the required private and public 9742b15cb3dSCy Schubertvalues described above. 9752b15cb3dSCy SchubertIf one or more files are left unspecified, 9762b15cb3dSCy Schubertthe default names are used as described above. 9772b15cb3dSCy SchubertUnless the complete path and name of the file are specified, the 9782b15cb3dSCy Schubertlocation of a file is relative to the keys directory specified 9792b15cb3dSCy Schubertin the 9802b15cb3dSCy Schubert<code>keysdir</code> 9812b15cb3dSCy Schubertcommand or default 982052d159aSCy Schubert<samp>/usr/local/etc</samp>. 9832b15cb3dSCy SchubertFollowing are the subcommands: 984052d159aSCy Schubert</p><dl compact="compact"> 985052d159aSCy Schubert<dt><code>cert</code> <kbd>file</kbd></dt> 986052d159aSCy Schubert<dd><p>Specifies the location of the required host public certificate file. 9872b15cb3dSCy SchubertThis overrides the link 988052d159aSCy Schubert<samp>ntpkey_cert_</samp><kbd>hostname</kbd> 9892b15cb3dSCy Schubertin the keys directory. 990052d159aSCy Schubert</p></dd> 991052d159aSCy Schubert<dt><code>gqpar</code> <kbd>file</kbd></dt> 992052d159aSCy Schubert<dd><p>Specifies the location of the optional GQ parameters file. 9932b15cb3dSCy SchubertThis 9942b15cb3dSCy Schubertoverrides the link 995052d159aSCy Schubert<samp>ntpkey_gq_</samp><kbd>hostname</kbd> 9962b15cb3dSCy Schubertin the keys directory. 997052d159aSCy Schubert</p></dd> 998052d159aSCy Schubert<dt><code>host</code> <kbd>file</kbd></dt> 999052d159aSCy Schubert<dd><p>Specifies the location of the required host key file. 10002b15cb3dSCy SchubertThis overrides 10012b15cb3dSCy Schubertthe link 1002052d159aSCy Schubert<samp>ntpkey_key_</samp><kbd>hostname</kbd> 10032b15cb3dSCy Schubertin the keys directory. 1004052d159aSCy Schubert</p></dd> 1005052d159aSCy Schubert<dt><code>iffpar</code> <kbd>file</kbd></dt> 1006052d159aSCy Schubert<dd><p>Specifies the location of the optional IFF parameters file. 1007e27abb66SXin LIThis overrides the link 1008052d159aSCy Schubert<samp>ntpkey_iff_</samp><kbd>hostname</kbd> 10092b15cb3dSCy Schubertin the keys directory. 1010052d159aSCy Schubert</p></dd> 1011052d159aSCy Schubert<dt><code>leap</code> <kbd>file</kbd></dt> 1012052d159aSCy Schubert<dd><p>Specifies the location of the optional leapsecond file. 10132b15cb3dSCy SchubertThis overrides the link 1014052d159aSCy Schubert<samp>ntpkey_leap</samp> 10152b15cb3dSCy Schubertin the keys directory. 1016052d159aSCy Schubert</p></dd> 1017052d159aSCy Schubert<dt><code>mvpar</code> <kbd>file</kbd></dt> 1018052d159aSCy Schubert<dd><p>Specifies the location of the optional MV parameters file. 1019e27abb66SXin LIThis overrides the link 1020052d159aSCy Schubert<samp>ntpkey_mv_</samp><kbd>hostname</kbd> 10212b15cb3dSCy Schubertin the keys directory. 1022052d159aSCy Schubert</p></dd> 1023052d159aSCy Schubert<dt><code>pw</code> <kbd>password</kbd></dt> 1024052d159aSCy Schubert<dd><p>Specifies the password to decrypt files containing private keys and 10252b15cb3dSCy Schubertidentity parameters. 10262b15cb3dSCy SchubertThis is required only if these files have been 10272b15cb3dSCy Schubertencrypted. 1028052d159aSCy Schubert</p></dd> 1029052d159aSCy Schubert<dt><code>randfile</code> <kbd>file</kbd></dt> 1030052d159aSCy Schubert<dd><p>Specifies the location of the random seed file used by the OpenSSL 10312b15cb3dSCy Schubertlibrary. 10322b15cb3dSCy SchubertThe defaults are described in the main text above. 1033052d159aSCy Schubert</p></dd> 1034052d159aSCy Schubert<dt><code>sign</code> <kbd>file</kbd></dt> 1035052d159aSCy Schubert<dd><p>Specifies the location of the optional sign key file. 10362b15cb3dSCy SchubertThis overrides 10372b15cb3dSCy Schubertthe link 1038052d159aSCy Schubert<samp>ntpkey_sign_</samp><kbd>hostname</kbd> 10392b15cb3dSCy Schubertin the keys directory. 10402b15cb3dSCy SchubertIf this file is 10412b15cb3dSCy Schubertnot found, the host key is also the sign key. 1042052d159aSCy Schubert</p></dd> 10432b15cb3dSCy Schubert</dl> 1044052d159aSCy Schubert</dd> 1045052d159aSCy Schubert<dt><code>keys</code> <kbd>keyfile</kbd></dt> 1046052d159aSCy Schubert<dd><p>Specifies the complete path and location of the MD5 key file 10472b15cb3dSCy Schubertcontaining the keys and key identifiers used by 10482b15cb3dSCy Schubert<code>ntpd(1ntpdmdoc)</code>, 10492b15cb3dSCy Schubert<code>ntpq(1ntpqmdoc)</code> 10502b15cb3dSCy Schubertand 10512b15cb3dSCy Schubert<code>ntpdc(1ntpdcmdoc)</code> 10522b15cb3dSCy Schubertwhen operating with symmetric key cryptography. 10532b15cb3dSCy SchubertThis is the same operation as the 10542b15cb3dSCy Schubert<code>-k</code> 10552b15cb3dSCy Schubertcommand line option. 1056052d159aSCy Schubert</p></dd> 1057052d159aSCy Schubert<dt><code>keysdir</code> <kbd>path</kbd></dt> 1058052d159aSCy Schubert<dd><p>This command specifies the default directory path for 10592b15cb3dSCy Schubertcryptographic keys, parameters and certificates. 10602b15cb3dSCy SchubertThe default is 1061052d159aSCy Schubert<samp>/usr/local/etc/</samp>. 1062052d159aSCy Schubert</p></dd> 1063052d159aSCy Schubert<dt><code>requestkey</code> <kbd>key</kbd></dt> 1064052d159aSCy Schubert<dd><p>Specifies the key identifier to use with the 10652b15cb3dSCy Schubert<code>ntpdc(1ntpdcmdoc)</code> 10662b15cb3dSCy Schubertutility program, which uses a 10672b15cb3dSCy Schubertproprietary protocol specific to this implementation of 10682b15cb3dSCy Schubert<code>ntpd(1ntpdmdoc)</code>. 10692b15cb3dSCy SchubertThe 10702b15cb3dSCy Schubert<kbd>key</kbd> 10712b15cb3dSCy Schubertargument is a key identifier 10722b15cb3dSCy Schubertfor the trusted key, where the value can be in the range 1 to 10734e1ef62aSXin LI65,535, inclusive. 1074052d159aSCy Schubert</p></dd> 1075052d159aSCy Schubert<dt><code>revoke</code> <kbd>logsec</kbd></dt> 1076052d159aSCy Schubert<dd><p>Specifies the interval between re-randomization of certain 10772b15cb3dSCy Schubertcryptographic values used by the Autokey scheme, as a power of 2 in 10782b15cb3dSCy Schubertseconds. 10792b15cb3dSCy SchubertThese values need to be updated frequently in order to 10802b15cb3dSCy Schubertdeflect brute-force attacks on the algorithms of the scheme; 10812b15cb3dSCy Schuberthowever, updating some values is a relatively expensive operation. 10822b15cb3dSCy SchubertThe default interval is 16 (65,536 s or about 18 hours). 10832b15cb3dSCy SchubertFor poll 10842b15cb3dSCy Schubertintervals above the specified interval, the values will be updated 10852b15cb3dSCy Schubertfor every message sent. 1086052d159aSCy Schubert</p></dd> 1087052d159aSCy Schubert<dt><code>trustedkey</code> <kbd>key</kbd> <kbd>...</kbd></dt> 1088052d159aSCy Schubert<dd><p>Specifies the key identifiers which are trusted for the 10892b15cb3dSCy Schubertpurposes of authenticating peers with symmetric key cryptography, 10902b15cb3dSCy Schubertas well as keys used by the 10912b15cb3dSCy Schubert<code>ntpq(1ntpqmdoc)</code> 10922b15cb3dSCy Schubertand 10932b15cb3dSCy Schubert<code>ntpdc(1ntpdcmdoc)</code> 10942b15cb3dSCy Schubertprograms. 10952b15cb3dSCy SchubertThe authentication procedures require that both the local 10962b15cb3dSCy Schubertand remote servers share the same key and key identifier for this 10972b15cb3dSCy Schubertpurpose, although different keys can be used with different 10982b15cb3dSCy Schubertservers. 10992b15cb3dSCy SchubertThe 11002b15cb3dSCy Schubert<kbd>key</kbd> 11012b15cb3dSCy Schubertarguments are 32-bit unsigned 11024e1ef62aSXin LIintegers with values from 1 to 65,535. 1103052d159aSCy Schubert</p></dd> 11042b15cb3dSCy Schubert</dl> 1105*a466cc55SCy Schubert<span id="Error-Codes"></span><h4 class="subsubsection">1.1.2.7 Error Codes</h4> 11062b15cb3dSCy Schubert<p>The following error codes are reported via the NTP control 11072b15cb3dSCy Schubertand monitoring protocol trap mechanism. 1108052d159aSCy Schubert</p><dl compact="compact"> 1109052d159aSCy Schubert<dt>101</dt> 1110052d159aSCy Schubert<dd><p>(bad field format or length) 11112b15cb3dSCy SchubertThe packet has invalid version, length or format. 1112052d159aSCy Schubert</p></dd> 1113052d159aSCy Schubert<dt>102</dt> 1114052d159aSCy Schubert<dd><p>(bad timestamp) 11152b15cb3dSCy SchubertThe packet timestamp is the same or older than the most recent received. 11162b15cb3dSCy SchubertThis could be due to a replay or a server clock time step. 1117052d159aSCy Schubert</p></dd> 1118052d159aSCy Schubert<dt>103</dt> 1119052d159aSCy Schubert<dd><p>(bad filestamp) 11202b15cb3dSCy SchubertThe packet filestamp is the same or older than the most recent received. 11212b15cb3dSCy SchubertThis could be due to a replay or a key file generation error. 1122052d159aSCy Schubert</p></dd> 1123052d159aSCy Schubert<dt>104</dt> 1124052d159aSCy Schubert<dd><p>(bad or missing public key) 11252b15cb3dSCy SchubertThe public key is missing, has incorrect format or is an unsupported type. 1126052d159aSCy Schubert</p></dd> 1127052d159aSCy Schubert<dt>105</dt> 1128052d159aSCy Schubert<dd><p>(unsupported digest type) 11292b15cb3dSCy SchubertThe server requires an unsupported digest/signature scheme. 1130052d159aSCy Schubert</p></dd> 1131052d159aSCy Schubert<dt>106</dt> 1132052d159aSCy Schubert<dd><p>(mismatched digest types) 11332b15cb3dSCy SchubertNot used. 1134052d159aSCy Schubert</p></dd> 1135052d159aSCy Schubert<dt>107</dt> 1136052d159aSCy Schubert<dd><p>(bad signature length) 11372b15cb3dSCy SchubertThe signature length does not match the current public key. 1138052d159aSCy Schubert</p></dd> 1139052d159aSCy Schubert<dt>108</dt> 1140052d159aSCy Schubert<dd><p>(signature not verified) 11412b15cb3dSCy SchubertThe message fails the signature check. 11422b15cb3dSCy SchubertIt could be bogus or signed by a 11432b15cb3dSCy Schubertdifferent private key. 1144052d159aSCy Schubert</p></dd> 1145052d159aSCy Schubert<dt>109</dt> 1146052d159aSCy Schubert<dd><p>(certificate not verified) 11472b15cb3dSCy SchubertThe certificate is invalid or signed with the wrong key. 1148052d159aSCy Schubert</p></dd> 1149052d159aSCy Schubert<dt>110</dt> 1150052d159aSCy Schubert<dd><p>(certificate not verified) 11512b15cb3dSCy SchubertThe certificate is not yet valid or has expired or the signature could not 11522b15cb3dSCy Schubertbe verified. 1153052d159aSCy Schubert</p></dd> 1154052d159aSCy Schubert<dt>111</dt> 1155052d159aSCy Schubert<dd><p>(bad or missing cookie) 11562b15cb3dSCy SchubertThe cookie is missing, corrupted or bogus. 1157052d159aSCy Schubert</p></dd> 1158052d159aSCy Schubert<dt>112</dt> 1159052d159aSCy Schubert<dd><p>(bad or missing leapseconds table) 11602b15cb3dSCy SchubertThe leapseconds table is missing, corrupted or bogus. 1161052d159aSCy Schubert</p></dd> 1162052d159aSCy Schubert<dt>113</dt> 1163052d159aSCy Schubert<dd><p>(bad or missing certificate) 11642b15cb3dSCy SchubertThe certificate is missing, corrupted or bogus. 1165052d159aSCy Schubert</p></dd> 1166052d159aSCy Schubert<dt>114</dt> 1167052d159aSCy Schubert<dd><p>(bad or missing identity) 11682b15cb3dSCy SchubertThe identity key is missing, corrupt or bogus. 1169052d159aSCy Schubert</p></dd> 11702b15cb3dSCy Schubert</dl> 1171052d159aSCy Schubert<hr> 1172*a466cc55SCy Schubert<span id="Monitoring-Support"></span><div class="header"> 1173052d159aSCy Schubert<p> 1174052d159aSCy 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> </p> 11752b15cb3dSCy Schubert</div> 1176*a466cc55SCy Schubert<span id="Monitoring-Support-1"></span><h4 class="subsection">1.1.3 Monitoring Support</h4> 11772b15cb3dSCy Schubert<p><code>ntpd(1ntpdmdoc)</code> 11782b15cb3dSCy Schubertincludes a comprehensive monitoring facility suitable 11792b15cb3dSCy Schubertfor continuous, long term recording of server and client 11802b15cb3dSCy Schuberttimekeeping performance. 11812b15cb3dSCy SchubertSee the 11822b15cb3dSCy Schubert<code>statistics</code> 11832b15cb3dSCy Schubertcommand below 11842b15cb3dSCy Schubertfor a listing and example of each type of statistics currently 11852b15cb3dSCy Schubertsupported. 11862b15cb3dSCy SchubertStatistic files are managed using file generation sets 11872b15cb3dSCy Schubertand scripts in the 1188052d159aSCy Schubert<samp>./scripts</samp> 1189e27abb66SXin LIdirectory of the source code distribution. 11902b15cb3dSCy SchubertUsing 11912b15cb3dSCy Schubertthese facilities and 1192052d159aSCy Schubert<small>UNIX</small> 11932b15cb3dSCy Schubert<code>cron(8)</code> 11942b15cb3dSCy Schubertjobs, the data can be 11952b15cb3dSCy Schubertautomatically summarized and archived for retrospective analysis. 1196*a466cc55SCy Schubert</p><span id="Monitoring-Commands"></span><h4 class="subsubsection">1.1.3.1 Monitoring Commands</h4> 1197052d159aSCy Schubert<dl compact="compact"> 1198052d159aSCy Schubert<dt><code>statistics</code> <kbd>name</kbd> <kbd>...</kbd></dt> 1199052d159aSCy Schubert<dd><p>Enables writing of statistics records. 12002b15cb3dSCy SchubertCurrently, eight kinds of 12012b15cb3dSCy Schubert<kbd>name</kbd> 12022b15cb3dSCy Schubertstatistics are supported. 1203052d159aSCy Schubert</p><dl compact="compact"> 1204052d159aSCy Schubert<dt><code>clockstats</code></dt> 1205052d159aSCy Schubert<dd><p>Enables recording of clock driver statistics information. 12062b15cb3dSCy SchubertEach update 12072b15cb3dSCy Schubertreceived from a clock driver appends a line of the following form to 12082b15cb3dSCy Schubertthe file generation set named 12092b15cb3dSCy Schubert<code>clockstats</code>: 1210052d159aSCy Schubert</p><pre class="verbatim">49213 525.624 127.127.4.1 93 226 00:08:29.606 D 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 12152b15cb3dSCy Schubertclock address in dotted-quad notation. 12162b15cb3dSCy SchubertThe final field shows the last 12172b15cb3dSCy Schuberttimecode received from the clock in decoded ASCII format, where 12182b15cb3dSCy Schubertmeaningful. 12192b15cb3dSCy SchubertIn some clock drivers a good deal of additional information 12202b15cb3dSCy Schubertcan be gathered and displayed as well. 12212b15cb3dSCy SchubertSee information specific to each 12222b15cb3dSCy Schubertclock for further details. 1223052d159aSCy Schubert</p></dd> 1224052d159aSCy Schubert<dt><code>cryptostats</code></dt> 1225052d159aSCy Schubert<dd><p>This option requires the OpenSSL cryptographic software library. 12262b15cb3dSCy SchubertIt 12272b15cb3dSCy Schubertenables recording of cryptographic public key protocol information. 12282b15cb3dSCy SchubertEach message received by the protocol module appends a line of the 12292b15cb3dSCy Schubertfollowing form to the file generation set named 12302b15cb3dSCy Schubert<code>cryptostats</code>: 1231052d159aSCy Schubert</p><pre class="verbatim">49213 525.624 127.127.4.1 message 12322b15cb3dSCy Schubert</pre> 12332b15cb3dSCy Schubert<p>The first two fields show the date (Modified Julian Day) and time 12342b15cb3dSCy Schubert(seconds and fraction past UTC midnight). 12352b15cb3dSCy SchubertThe next field shows the peer 12362b15cb3dSCy Schubertaddress in dotted-quad notation, The final message field includes the 12372b15cb3dSCy Schubertmessage type and certain ancillary information. 12382b15cb3dSCy SchubertSee the 1239052d159aSCy Schubert‘Authentication Options’ 12402b15cb3dSCy Schubertsection for further information. 1241052d159aSCy Schubert</p></dd> 1242052d159aSCy Schubert<dt><code>loopstats</code></dt> 1243052d159aSCy Schubert<dd><p>Enables recording of loop filter statistics information. 12442b15cb3dSCy SchubertEach 12452b15cb3dSCy Schubertupdate of the local clock outputs a line of the following form to 12462b15cb3dSCy Schubertthe file generation set named 12472b15cb3dSCy Schubert<code>loopstats</code>: 1248052d159aSCy Schubert</p><pre class="verbatim">50935 75440.031 0.000006019 13.778190 0.000351733 0.0133806 12492b15cb3dSCy Schubert</pre> 12502b15cb3dSCy Schubert<p>The first two fields show the date (Modified Julian Day) and 12512b15cb3dSCy Schuberttime (seconds and fraction past UTC midnight). 12522b15cb3dSCy SchubertThe next five fields 12532b15cb3dSCy Schubertshow time offset (seconds), frequency offset (parts per million - 12542b15cb3dSCy SchubertPPM), RMS jitter (seconds), Allan deviation (PPM) and clock 12552b15cb3dSCy Schubertdiscipline time constant. 1256052d159aSCy Schubert</p></dd> 1257052d159aSCy Schubert<dt><code>peerstats</code></dt> 1258052d159aSCy Schubert<dd><p>Enables recording of peer statistics information. 12592b15cb3dSCy SchubertThis includes 12602b15cb3dSCy Schubertstatistics records of all peers of a NTP server and of special 12612b15cb3dSCy Schubertsignals, where present and configured. 12622b15cb3dSCy SchubertEach valid update appends a 12632b15cb3dSCy Schubertline of the following form to the current element of a file 12642b15cb3dSCy Schubertgeneration set named 12652b15cb3dSCy Schubert<code>peerstats</code>: 1266052d159aSCy Schubert</p><pre class="verbatim">48773 10847.650 127.127.4.1 9714 -0.001605376 0.000000000 0.001424877 0.000958674 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 peer address in dotted-quad notation and status, 12722b15cb3dSCy Schubertrespectively. 12732b15cb3dSCy SchubertThe status field is encoded in hex in the format 12742b15cb3dSCy Schubertdescribed in Appendix A of the NTP specification RFC 1305. 12752b15cb3dSCy SchubertThe final four fields show the offset, 12762b15cb3dSCy Schubertdelay, dispersion and RMS jitter, all in seconds. 1277052d159aSCy Schubert</p></dd> 1278052d159aSCy Schubert<dt><code>rawstats</code></dt> 1279052d159aSCy Schubert<dd><p>Enables recording of raw-timestamp statistics information. 12802b15cb3dSCy SchubertThis 12812b15cb3dSCy Schubertincludes statistics records of all peers of a NTP server and of 12822b15cb3dSCy Schubertspecial signals, where present and configured. 12832b15cb3dSCy SchubertEach NTP message 12842b15cb3dSCy Schubertreceived from a peer or clock driver appends a line of the 12852b15cb3dSCy Schubertfollowing form to the file generation set named 12862b15cb3dSCy Schubert<code>rawstats</code>: 1287052d159aSCy Schubert</p><pre class="verbatim">50928 2132.543 128.4.1.1 128.4.1.20 3102453281.584327000 3102453281.58622800031 02453332.540806000 3102453332.541458000 12882b15cb3dSCy Schubert</pre> 12892b15cb3dSCy Schubert<p>The first two fields show the date (Modified Julian Day) and 12902b15cb3dSCy Schuberttime (seconds and fraction past UTC midnight). 12912b15cb3dSCy SchubertThe next two fields 12922b15cb3dSCy Schubertshow the remote peer or clock address followed by the local address 12932b15cb3dSCy Schubertin dotted-quad notation. 12942b15cb3dSCy SchubertThe final four fields show the originate, 12952b15cb3dSCy Schubertreceive, transmit and final NTP timestamps in order. 12962b15cb3dSCy SchubertThe timestamp 12972b15cb3dSCy Schubertvalues are as received and before processing by the various data 12982b15cb3dSCy Schubertsmoothing and mitigation algorithms. 1299052d159aSCy Schubert</p></dd> 1300052d159aSCy Schubert<dt><code>sysstats</code></dt> 1301052d159aSCy Schubert<dd><p>Enables recording of ntpd statistics counters on a periodic basis. 13022b15cb3dSCy SchubertEach 13032b15cb3dSCy Schuberthour a line of the following form is appended to the file generation 13042b15cb3dSCy Schubertset named 13052b15cb3dSCy Schubert<code>sysstats</code>: 1306052d159aSCy Schubert</p><pre class="verbatim">50928 2132.543 36000 81965 0 9546 56 71793 512 540 10 147 13072b15cb3dSCy Schubert</pre> 13082b15cb3dSCy Schubert<p>The first two fields show the date (Modified Julian Day) and time 13092b15cb3dSCy Schubert(seconds and fraction past UTC midnight). 13102b15cb3dSCy SchubertThe remaining ten fields show 13112b15cb3dSCy Schubertthe statistics counter values accumulated since the last generated 13122b15cb3dSCy Schubertline. 1313052d159aSCy Schubert</p><dl compact="compact"> 1314052d159aSCy Schubert<dt>Time since restart <code>36000</code></dt> 1315052d159aSCy Schubert<dd><p>Time in hours since the system was last rebooted. 1316052d159aSCy Schubert</p></dd> 1317052d159aSCy Schubert<dt>Packets received <code>81965</code></dt> 1318052d159aSCy Schubert<dd><p>Total number of packets received. 1319052d159aSCy Schubert</p></dd> 1320052d159aSCy Schubert<dt>Packets processed <code>0</code></dt> 1321052d159aSCy Schubert<dd><p>Number of packets received in response to previous packets sent 1322052d159aSCy Schubert</p></dd> 1323052d159aSCy Schubert<dt>Current version <code>9546</code></dt> 1324052d159aSCy Schubert<dd><p>Number of packets matching the current NTP version. 1325052d159aSCy Schubert</p></dd> 1326052d159aSCy Schubert<dt>Previous version <code>56</code></dt> 1327052d159aSCy Schubert<dd><p>Number of packets matching the previous NTP version. 1328052d159aSCy Schubert</p></dd> 1329052d159aSCy Schubert<dt>Bad version <code>71793</code></dt> 1330052d159aSCy Schubert<dd><p>Number of packets matching neither NTP version. 1331052d159aSCy Schubert</p></dd> 1332052d159aSCy Schubert<dt>Access denied <code>512</code></dt> 1333052d159aSCy Schubert<dd><p>Number of packets denied access for any reason. 1334052d159aSCy Schubert</p></dd> 1335052d159aSCy Schubert<dt>Bad length or format <code>540</code></dt> 1336052d159aSCy Schubert<dd><p>Number of packets with invalid length, format or port number. 1337052d159aSCy Schubert</p></dd> 1338052d159aSCy Schubert<dt>Bad authentication <code>10</code></dt> 1339052d159aSCy Schubert<dd><p>Number of packets not verified as authentic. 1340052d159aSCy Schubert</p></dd> 1341052d159aSCy Schubert<dt>Rate exceeded <code>147</code></dt> 1342052d159aSCy Schubert<dd><p>Number of packets discarded due to rate limitation. 1343052d159aSCy Schubert</p></dd> 13442b15cb3dSCy Schubert</dl> 1345052d159aSCy Schubert</dd> 1346052d159aSCy Schubert<dt><code>statsdir</code> <kbd>directory_path</kbd></dt> 1347052d159aSCy Schubert<dd><p>Indicates the full path of a directory where statistics files 13482b15cb3dSCy Schubertshould be created (see below). 13492b15cb3dSCy SchubertThis keyword allows 13502b15cb3dSCy Schubertthe (otherwise constant) 13512b15cb3dSCy Schubert<code>filegen</code> 13522b15cb3dSCy Schubertfilename prefix to be modified for file generation sets, which 13532b15cb3dSCy Schubertis useful for handling statistics logs. 1354052d159aSCy Schubert</p></dd> 1355052d159aSCy 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> 1356052d159aSCy Schubert<dd><p>Configures setting of generation file set name. 13572b15cb3dSCy SchubertGeneration 13582b15cb3dSCy Schubertfile sets provide a means for handling files that are 13592b15cb3dSCy Schubertcontinuously growing during the lifetime of a server. 13602b15cb3dSCy SchubertServer statistics are a typical example for such files. 13612b15cb3dSCy SchubertGeneration file sets provide access to a set of files used 13622b15cb3dSCy Schubertto store the actual data. 13632b15cb3dSCy SchubertAt any time at most one element 13642b15cb3dSCy Schubertof the set is being written to. 13652b15cb3dSCy SchubertThe type given specifies 13662b15cb3dSCy Schubertwhen and how data will be directed to a new element of the set. 13672b15cb3dSCy SchubertThis way, information stored in elements of a file set 13682b15cb3dSCy Schubertthat are currently unused are available for administrational 13692b15cb3dSCy Schubertoperations without the risk of disturbing the operation of ntpd. 13702b15cb3dSCy Schubert(Most important: they can be removed to free space for new data 13712b15cb3dSCy Schubertproduced.) 1372052d159aSCy Schubert</p> 13732b15cb3dSCy Schubert<p>Note that this command can be sent from the 13742b15cb3dSCy Schubert<code>ntpdc(1ntpdcmdoc)</code> 13752b15cb3dSCy Schubertprogram running at a remote location. 1376052d159aSCy Schubert</p><dl compact="compact"> 1377052d159aSCy Schubert<dt><code>name</code></dt> 1378052d159aSCy Schubert<dd><p>This is the type of the statistics records, as shown in the 13792b15cb3dSCy Schubert<code>statistics</code> 13802b15cb3dSCy Schubertcommand. 1381052d159aSCy Schubert</p></dd> 1382052d159aSCy Schubert<dt><code>file</code> <kbd>filename</kbd></dt> 1383052d159aSCy Schubert<dd><p>This is the file name for the statistics records. 13842b15cb3dSCy SchubertFilenames of set 13852b15cb3dSCy Schubertmembers are built from three concatenated elements 13862b15cb3dSCy Schubert<code>prefix</code>, 13872b15cb3dSCy Schubert<code>filename</code> 13882b15cb3dSCy Schubertand 13892b15cb3dSCy Schubert<code>suffix</code>: 1390052d159aSCy Schubert</p><dl compact="compact"> 1391052d159aSCy Schubert<dt><code>prefix</code></dt> 1392052d159aSCy Schubert<dd><p>This is a constant filename path. 13932b15cb3dSCy SchubertIt is not subject to 13942b15cb3dSCy Schubertmodifications via the 13952b15cb3dSCy Schubert<kbd>filegen</kbd> 13962b15cb3dSCy Schubertoption. 13972b15cb3dSCy SchubertIt is defined by the 13982b15cb3dSCy Schubertserver, usually specified as a compile-time constant. 13992b15cb3dSCy SchubertIt may, 14002b15cb3dSCy Schuberthowever, be configurable for individual file generation sets 14012b15cb3dSCy Schubertvia other commands. 14022b15cb3dSCy SchubertFor example, the prefix used with 14032b15cb3dSCy Schubert<kbd>loopstats</kbd> 14042b15cb3dSCy Schubertand 14052b15cb3dSCy Schubert<kbd>peerstats</kbd> 14062b15cb3dSCy Schubertgeneration can be configured using the 14072b15cb3dSCy Schubert<kbd>statsdir</kbd> 14082b15cb3dSCy Schubertoption explained above. 1409052d159aSCy Schubert</p></dd> 1410052d159aSCy Schubert<dt><code>filename</code></dt> 1411052d159aSCy Schubert<dd><p>This string is directly concatenated to the prefix mentioned 14122b15cb3dSCy Schubertabove (no intervening 1413052d159aSCy Schubert‘/’). 14142b15cb3dSCy SchubertThis can be modified using 14152b15cb3dSCy Schubertthe file argument to the 14162b15cb3dSCy Schubert<kbd>filegen</kbd> 14172b15cb3dSCy Schubertstatement. 14182b15cb3dSCy SchubertNo 1419052d159aSCy Schubert<samp>..</samp> 14202b15cb3dSCy Schubertelements are 14212b15cb3dSCy Schubertallowed in this component to prevent filenames referring to 14222b15cb3dSCy Schubertparts outside the filesystem hierarchy denoted by 14232b15cb3dSCy Schubert<kbd>prefix</kbd>. 1424052d159aSCy Schubert</p></dd> 1425052d159aSCy Schubert<dt><code>suffix</code></dt> 1426052d159aSCy Schubert<dd><p>This part is reflects individual elements of a file set. 14272b15cb3dSCy SchubertIt is 14282b15cb3dSCy Schubertgenerated according to the type of a file set. 1429052d159aSCy Schubert</p></dd> 14302b15cb3dSCy Schubert</dl> 1431052d159aSCy Schubert</dd> 1432052d159aSCy Schubert<dt><code>type</code> <kbd>typename</kbd></dt> 1433052d159aSCy Schubert<dd><p>A file generation set is characterized by its type. 14342b15cb3dSCy SchubertThe following 14352b15cb3dSCy Schuberttypes are supported: 1436052d159aSCy Schubert</p><dl compact="compact"> 1437052d159aSCy Schubert<dt><code>none</code></dt> 1438052d159aSCy Schubert<dd><p>The file set is actually a single plain file. 1439052d159aSCy Schubert</p></dd> 1440052d159aSCy Schubert<dt><code>pid</code></dt> 1441052d159aSCy Schubert<dd><p>One element of file set is used per incarnation of a ntpd 14422b15cb3dSCy Schubertserver. 14432b15cb3dSCy SchubertThis type does not perform any changes to file set 14442b15cb3dSCy Schubertmembers during runtime, however it provides an easy way of 14452b15cb3dSCy Schubertseparating files belonging to different 14462b15cb3dSCy Schubert<code>ntpd(1ntpdmdoc)</code> 14472b15cb3dSCy Schubertserver incarnations. 14482b15cb3dSCy SchubertThe set member filename is built by appending a 1449052d159aSCy Schubert‘.’ 14502b15cb3dSCy Schubertto concatenated 14512b15cb3dSCy Schubert<kbd>prefix</kbd> 14522b15cb3dSCy Schubertand 14532b15cb3dSCy Schubert<kbd>filename</kbd> 14542b15cb3dSCy Schubertstrings, and 14552b15cb3dSCy Schubertappending the decimal representation of the process ID of the 14562b15cb3dSCy Schubert<code>ntpd(1ntpdmdoc)</code> 14572b15cb3dSCy Schubertserver process. 1458052d159aSCy Schubert</p></dd> 1459052d159aSCy Schubert<dt><code>day</code></dt> 1460052d159aSCy Schubert<dd><p>One file generation set element is created per day. 14612b15cb3dSCy SchubertA day is 14622b15cb3dSCy Schubertdefined as the period between 00:00 and 24:00 UTC. 14632b15cb3dSCy SchubertThe file set 14642b15cb3dSCy Schubertmember suffix consists of a 1465052d159aSCy Schubert‘.’ 14662b15cb3dSCy Schubertand a day specification in 14672b15cb3dSCy Schubertthe form 14682b15cb3dSCy Schubert<code>YYYYMMdd</code>. 14692b15cb3dSCy Schubert<code>YYYY</code> 14702b15cb3dSCy Schubertis a 4-digit year number (e.g., 1992). 14712b15cb3dSCy Schubert<code>MM</code> 14722b15cb3dSCy Schubertis a two digit month number. 14732b15cb3dSCy Schubert<code>dd</code> 14742b15cb3dSCy Schubertis a two digit day number. 14752b15cb3dSCy SchubertThus, all information written at 10 December 1992 would end up 14762b15cb3dSCy Schubertin a file named 14772b15cb3dSCy Schubert<kbd>prefix</kbd> 14782b15cb3dSCy Schubert<kbd>filename</kbd>.19921210. 1479052d159aSCy Schubert</p></dd> 1480052d159aSCy Schubert<dt><code>week</code></dt> 1481052d159aSCy Schubert<dd><p>Any file set member contains data related to a certain week of 14822b15cb3dSCy Schuberta year. 14832b15cb3dSCy SchubertThe term week is defined by computing day-of-year 14842b15cb3dSCy Schubertmodulo 7. 14852b15cb3dSCy SchubertElements of such a file generation set are 14862b15cb3dSCy Schubertdistinguished by appending the following suffix to the file set 14872b15cb3dSCy Schubertfilename base: A dot, a 4-digit year number, the letter 14882b15cb3dSCy Schubert<code>W</code>, 14892b15cb3dSCy Schubertand a 2-digit week number. 14902b15cb3dSCy SchubertFor example, information from January, 14912b15cb3dSCy Schubert10th 1992 would end up in a file with suffix 14922b15cb3dSCy Schubert.No . Ns Ar 1992W1 . 1493052d159aSCy Schubert</p></dd> 1494052d159aSCy Schubert<dt><code>month</code></dt> 1495052d159aSCy Schubert<dd><p>One generation file set element is generated per month. 14962b15cb3dSCy SchubertThe 14972b15cb3dSCy Schubertfile name suffix consists of a dot, a 4-digit year number, and 14982b15cb3dSCy Schuberta 2-digit month. 1499052d159aSCy Schubert</p></dd> 1500052d159aSCy Schubert<dt><code>year</code></dt> 1501052d159aSCy Schubert<dd><p>One generation file element is generated per year. 15022b15cb3dSCy SchubertThe filename 15032b15cb3dSCy Schubertsuffix consists of a dot and a 4 digit year number. 1504052d159aSCy Schubert</p></dd> 1505052d159aSCy Schubert<dt><code>age</code></dt> 1506052d159aSCy Schubert<dd><p>This type of file generation sets changes to a new element of 15072b15cb3dSCy Schubertthe file set every 24 hours of server operation. 15082b15cb3dSCy SchubertThe filename 15092b15cb3dSCy Schubertsuffix consists of a dot, the letter 15102b15cb3dSCy Schubert<code>a</code>, 15112b15cb3dSCy Schubertand an 8-digit number. 15122b15cb3dSCy SchubertThis number is taken to be the number of seconds the server is 15132b15cb3dSCy Schubertrunning at the start of the corresponding 24-hour period. 15142b15cb3dSCy SchubertInformation is only written to a file generation by specifying 15152b15cb3dSCy Schubert<code>enable</code>; 15162b15cb3dSCy Schubertoutput is prevented by specifying 15172b15cb3dSCy Schubert<code>disable</code>. 1518052d159aSCy Schubert</p></dd> 15192b15cb3dSCy Schubert</dl> 1520052d159aSCy Schubert</dd> 1521052d159aSCy Schubert<dt><code>link</code> | <code>nolink</code></dt> 1522052d159aSCy Schubert<dd><p>It is convenient to be able to access the current element of a file 15232b15cb3dSCy Schubertgeneration set by a fixed name. 15242b15cb3dSCy SchubertThis feature is enabled by 15252b15cb3dSCy Schubertspecifying 15262b15cb3dSCy Schubert<code>link</code> 15272b15cb3dSCy Schubertand disabled using 15282b15cb3dSCy Schubert<code>nolink</code>. 15292b15cb3dSCy SchubertIf link is specified, a 15302b15cb3dSCy Schuberthard link from the current file set element to a file without 15312b15cb3dSCy Schubertsuffix is created. 15322b15cb3dSCy SchubertWhen there is already a file with this name and 15332b15cb3dSCy Schubertthe number of links of this file is one, it is renamed appending a 15342b15cb3dSCy Schubertdot, the letter 15352b15cb3dSCy Schubert<code>C</code>, 1536e27abb66SXin LIand the pid of the 1537e27abb66SXin LI<code>ntpd(1ntpdmdoc)</code> 1538e27abb66SXin LIserver process. 15392b15cb3dSCy SchubertWhen the 15402b15cb3dSCy Schubertnumber of links is greater than one, the file is unlinked. 15412b15cb3dSCy SchubertThis 15422b15cb3dSCy Schubertallows the current file to be accessed by a constant name. 1543052d159aSCy Schubert</p></dd> 1544052d159aSCy Schubert<dt><code>enable</code> <code>|</code> <code>disable</code></dt> 1545052d159aSCy Schubert<dd><p>Enables or disables the recording function. 1546052d159aSCy Schubert</p></dd> 15472b15cb3dSCy Schubert</dl> 1548052d159aSCy Schubert</dd> 15492b15cb3dSCy Schubert</dl> 1550052d159aSCy Schubert</dd> 15512b15cb3dSCy Schubert</dl> 1552052d159aSCy Schubert<hr> 1553*a466cc55SCy Schubert<span id="Access-Control-Support"></span><div class="header"> 1554052d159aSCy Schubert<p> 1555052d159aSCy 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> </p> 15562b15cb3dSCy Schubert</div> 1557*a466cc55SCy Schubert<span id="Access-Control-Support-1"></span><h4 class="subsection">1.1.4 Access Control Support</h4> 15582b15cb3dSCy Schubert<p>The 15592b15cb3dSCy Schubert<code>ntpd(1ntpdmdoc)</code> 15602b15cb3dSCy Schubertdaemon implements a general purpose address/mask based restriction 15612b15cb3dSCy Schubertlist. 15622b15cb3dSCy SchubertThe list contains address/match entries sorted first 15632b15cb3dSCy Schubertby increasing address values and and then by increasing mask values. 15642b15cb3dSCy SchubertA match occurs when the bitwise AND of the mask and the packet 15652b15cb3dSCy Schubertsource address is equal to the bitwise AND of the mask and 15662b15cb3dSCy Schubertaddress in the list. 15672b15cb3dSCy SchubertThe list is searched in order with the 15682b15cb3dSCy Schubertlast match found defining the restriction flags associated 15692b15cb3dSCy Schubertwith the entry. 15702b15cb3dSCy SchubertAdditional information and examples can be found in the 1571052d159aSCy Schubert"Notes on Configuring NTP and Setting up a NTP Subnet" 15722b15cb3dSCy Schubertpage 15732b15cb3dSCy Schubert(available as part of the HTML documentation 15742b15cb3dSCy Schubertprovided in 1575052d159aSCy Schubert<samp>/usr/share/doc/ntp</samp>). 1576052d159aSCy Schubert</p> 15772b15cb3dSCy Schubert<p>The restriction facility was implemented in conformance 15782b15cb3dSCy Schubertwith the access policies for the original NSFnet backbone 15792b15cb3dSCy Schuberttime servers. 15802b15cb3dSCy SchubertLater the facility was expanded to deflect 15812b15cb3dSCy Schubertcryptographic and clogging attacks. 15822b15cb3dSCy SchubertWhile this facility may 15832b15cb3dSCy Schubertbe useful for keeping unwanted or broken or malicious clients 15842b15cb3dSCy Schubertfrom congesting innocent servers, it should not be considered 15852b15cb3dSCy Schubertan alternative to the NTP authentication facilities. 15862b15cb3dSCy SchubertSource address based restrictions are easily circumvented 15872b15cb3dSCy Schubertby a determined cracker. 1588052d159aSCy Schubert</p> 15892b15cb3dSCy Schubert<p>Clients can be denied service because they are explicitly 15904990d495SXin LIincluded in the restrict list created by the 15914990d495SXin LI<code>restrict</code> 15924990d495SXin LIcommand 15932b15cb3dSCy Schubertor implicitly as the result of cryptographic or rate limit 15942b15cb3dSCy Schubertviolations. 15952b15cb3dSCy SchubertCryptographic violations include certificate 15962b15cb3dSCy Schubertor identity verification failure; rate limit violations generally 15972b15cb3dSCy Schubertresult from defective NTP implementations that send packets 15982b15cb3dSCy Schubertat abusive rates. 15992b15cb3dSCy SchubertSome violations cause denied service 16002b15cb3dSCy Schubertonly for the offending packet, others cause denied service 16012b15cb3dSCy Schubertfor a timed period and others cause the denied service for 1602e27abb66SXin LIan indefinite period. 16032b15cb3dSCy SchubertWhen a client or network is denied access 1604e27abb66SXin LIfor an indefinite period, the only way at present to remove 16052b15cb3dSCy Schubertthe restrictions is by restarting the server. 1606*a466cc55SCy Schubert</p><span id="The-Kiss_002dof_002dDeath-Packet"></span><h4 class="subsubsection">1.1.4.1 The Kiss-of-Death Packet</h4> 16072b15cb3dSCy Schubert<p>Ordinarily, packets denied service are simply dropped with no 16082b15cb3dSCy Schubertfurther action except incrementing statistics counters. 16092b15cb3dSCy SchubertSometimes a 16102b15cb3dSCy Schubertmore proactive response is needed, such as a server message that 16112b15cb3dSCy Schubertexplicitly requests the client to stop sending and leave a message 16122b15cb3dSCy Schubertfor the system operator. 16132b15cb3dSCy SchubertA special packet format has been created 1614052d159aSCy Schubertfor this purpose called the "kiss-of-death" (KoD) packet. 16152b15cb3dSCy SchubertKoD packets have the leap bits set unsynchronized and stratum set 16162b15cb3dSCy Schubertto zero and the reference identifier field set to a four-byte 16172b15cb3dSCy SchubertASCII code. 16182b15cb3dSCy SchubertIf the 16192b15cb3dSCy Schubert<code>noserve</code> 16202b15cb3dSCy Schubertor 16212b15cb3dSCy Schubert<code>notrust</code> 16222b15cb3dSCy Schubertflag of the matching restrict list entry is set, 1623052d159aSCy Schubertthe code is "DENY"; if the 16242b15cb3dSCy Schubert<code>limited</code> 16252b15cb3dSCy Schubertflag is set and the rate limit 1626052d159aSCy Schubertis exceeded, the code is "RATE". 1627052d159aSCy SchubertFinally, if a cryptographic violation occurs, the code is "CRYP". 1628052d159aSCy Schubert</p> 16292b15cb3dSCy Schubert<p>A client receiving a KoD performs a set of sanity checks to 16302b15cb3dSCy Schubertminimize security exposure, then updates the stratum and 16312b15cb3dSCy Schubertreference identifier peer variables, sets the access 16322b15cb3dSCy Schubertdenied (TEST4) bit in the peer flash variable and sends 16332b15cb3dSCy Schuberta message to the log. 16342b15cb3dSCy SchubertAs long as the TEST4 bit is set, 16352b15cb3dSCy Schubertthe client will send no further packets to the server. 16362b15cb3dSCy SchubertThe only way at present to recover from this condition is 16372b15cb3dSCy Schubertto restart the protocol at both the client and server. 16382b15cb3dSCy SchubertThis 16392b15cb3dSCy Schuberthappens automatically at the client when the association times out. 16402b15cb3dSCy SchubertIt will happen at the server only if the server operator cooperates. 1641*a466cc55SCy Schubert</p><span id="Access-Control-Commands"></span><h4 class="subsubsection">1.1.4.2 Access Control Commands</h4> 1642052d159aSCy Schubert<dl compact="compact"> 1643052d159aSCy 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> 1644052d159aSCy Schubert<dd><p>Set the parameters of the 16452b15cb3dSCy Schubert<code>limited</code> 16462b15cb3dSCy Schubertfacility which protects the server from 16472b15cb3dSCy Schubertclient abuse. 16482b15cb3dSCy SchubertThe 16492b15cb3dSCy Schubert<code>average</code> 16502b15cb3dSCy Schubertsubcommand specifies the minimum average packet 1651*a466cc55SCy Schubertspacing in log2 seconds, defaulting to 3 (8s), while the 16522b15cb3dSCy Schubert<code>minimum</code> 1653*a466cc55SCy Schubertsubcommand specifies the minimum packet spacing 1654*a466cc55SCy Schubertin seconds, defaulting to 2. 16552b15cb3dSCy SchubertPackets that violate these minima are discarded 1656052d159aSCy Schubertand a kiss-o’-death packet returned if enabled. 16574990d495SXin LIThe 16584990d495SXin LI<code>monitor</code> 1659*a466cc55SCy Schubertsubcommand indirectly specifies the probability of 1660*a466cc55SCy Schubertreplacing the oldest entry from the monitor (MRU) 1661*a466cc55SCy Schubertlist of recent requests used to enforce rate controls, 1662*a466cc55SCy Schubertwhen that list is at its maximum size. The probability 1663*a466cc55SCy Schubertof replacing the oldest entry is the age of that entry 1664*a466cc55SCy Schubertin seconds divided by the 1665*a466cc55SCy Schubert<code>monitor</code> 1666*a466cc55SCy Schubertvalue, default 3000. For example, if the oldest entry 1667*a466cc55SCy Schubertin the MRU list represents a request 300 seconds ago, 1668*a466cc55SCy Schubertby default the probability of replacing it with an 1669*a466cc55SCy Schubertentry representing the client request being processed 1670*a466cc55SCy Schubertnow is 10%. Conversely, if the oldest entry is more 1671*a466cc55SCy Schubertthan 3000 seconds old, the probability is 100%. 1672052d159aSCy Schubert</p></dd> 1673052d159aSCy Schubert<dt><code>restrict</code> <code>address</code> <code>[<code>mask</code> <kbd>mask</kbd>]</code> <code>[<code>ippeerlimit</code> <kbd>int</kbd>]</code> <code>[<kbd>flag</kbd> <kbd>...</kbd>]</code></dt> 1674052d159aSCy Schubert<dd><p>The 16752b15cb3dSCy Schubert<kbd>address</kbd> 16762b15cb3dSCy Schubertargument expressed in 16772b15cb3dSCy Schubertdotted-quad form is the address of a host or network. 16782b15cb3dSCy SchubertAlternatively, the 16792b15cb3dSCy Schubert<kbd>address</kbd> 16802b15cb3dSCy Schubertargument can be a valid host DNS name. 16812b15cb3dSCy SchubertThe 16822b15cb3dSCy Schubert<kbd>mask</kbd> 16832b15cb3dSCy Schubertargument expressed in dotted-quad form defaults to 16842b15cb3dSCy Schubert<code>255.255.255.255</code>, 16852b15cb3dSCy Schubertmeaning that the 16862b15cb3dSCy Schubert<kbd>address</kbd> 16872b15cb3dSCy Schubertis treated as the address of an individual host. 16882b15cb3dSCy SchubertA default entry (address 16892b15cb3dSCy Schubert<code>0.0.0.0</code>, 16902b15cb3dSCy Schubertmask 16912b15cb3dSCy Schubert<code>0.0.0.0</code>) 16922b15cb3dSCy Schubertis always included and is always the first entry in the list. 16932b15cb3dSCy SchubertNote that text string 16942b15cb3dSCy Schubert<code>default</code>, 16952b15cb3dSCy Schubertwith no mask option, may 16962b15cb3dSCy Schubertbe used to indicate the default entry. 169709100258SXin LIThe 169809100258SXin LI<code>ippeerlimit</code> 169909100258SXin LIdirective limits the number of peer requests for each IP to 170009100258SXin LI<kbd>int</kbd>, 1701052d159aSCy Schubertwhere a value of -1 means "unlimited", the current default. 1702052d159aSCy SchubertA value of 0 means "none". 170309100258SXin LIThere would usually be at most 1 peering request per IP, 170409100258SXin LIbut if the remote peering requests are behind a proxy 170509100258SXin LIthere could well be more than 1 per IP. 17062b15cb3dSCy SchubertIn the current implementation, 17072b15cb3dSCy Schubert<code>flag</code> 17082b15cb3dSCy Schubertalways 17092b15cb3dSCy Schubertrestricts access, i.e., an entry with no flags indicates that free 17102b15cb3dSCy Schubertaccess to the server is to be given. 17112b15cb3dSCy SchubertThe flags are not orthogonal, 17122b15cb3dSCy Schubertin that more restrictive flags will often make less restrictive 17132b15cb3dSCy Schubertones redundant. 17142b15cb3dSCy SchubertThe flags can generally be classed into two 17152b15cb3dSCy Schubertcategories, those which restrict time service and those which 17162b15cb3dSCy Schubertrestrict informational queries and attempts to do run-time 17172b15cb3dSCy Schubertreconfiguration of the server. 17182b15cb3dSCy SchubertOne or more of the following flags 17192b15cb3dSCy Schubertmay be specified: 1720052d159aSCy Schubert</p><dl compact="compact"> 1721052d159aSCy Schubert<dt><code>ignore</code></dt> 1722052d159aSCy Schubert<dd><p>Deny packets of all kinds, including 17232b15cb3dSCy Schubert<code>ntpq(1ntpqmdoc)</code> 17242b15cb3dSCy Schubertand 17252b15cb3dSCy Schubert<code>ntpdc(1ntpdcmdoc)</code> 17262b15cb3dSCy Schubertqueries. 1727052d159aSCy Schubert</p></dd> 1728052d159aSCy Schubert<dt><code>kod</code></dt> 1729052d159aSCy Schubert<dd><p>If this flag is set when an access violation occurs, a kiss-o’-death 17302b15cb3dSCy Schubert(KoD) packet is sent. 17312b15cb3dSCy SchubertKoD packets are rate limited to no more than one 17322b15cb3dSCy Schubertper second. 17332b15cb3dSCy SchubertIf another KoD packet occurs within one second after the 17342b15cb3dSCy Schubertlast one, the packet is dropped. 1735052d159aSCy Schubert</p></dd> 1736052d159aSCy Schubert<dt><code>limited</code></dt> 1737052d159aSCy Schubert<dd><p>Deny service if the packet spacing violates the lower limits specified 17384990d495SXin LIin the 17394990d495SXin LI<code>discard</code> 17404990d495SXin LIcommand. 17412b15cb3dSCy SchubertA history of clients is kept using the 17422b15cb3dSCy Schubertmonitoring capability of 17432b15cb3dSCy Schubert<code>ntpd(1ntpdmdoc)</code>. 17442b15cb3dSCy SchubertThus, monitoring is always active as 17452b15cb3dSCy Schubertlong as there is a restriction entry with the 17462b15cb3dSCy Schubert<code>limited</code> 17472b15cb3dSCy Schubertflag. 1748052d159aSCy Schubert</p></dd> 1749052d159aSCy Schubert<dt><code>lowpriotrap</code></dt> 1750052d159aSCy Schubert<dd><p>Declare traps set by matching hosts to be low priority. 17512b15cb3dSCy SchubertThe 17522b15cb3dSCy Schubertnumber of traps a server can maintain is limited (the current limit 17532b15cb3dSCy Schubertis 3). 17542b15cb3dSCy SchubertTraps are usually assigned on a first come, first served 17552b15cb3dSCy Schubertbasis, with later trap requestors being denied service. 17562b15cb3dSCy SchubertThis flag 17572b15cb3dSCy Schubertmodifies the assignment algorithm by allowing low priority traps to 17582b15cb3dSCy Schubertbe overridden by later requests for normal priority traps. 1759052d159aSCy Schubert</p></dd> 1760052d159aSCy Schubert<dt><code>noepeer</code></dt> 1761052d159aSCy Schubert<dd><p>Deny ephemeral peer requests, 176209100258SXin LIeven if they come from an authenticated source. 176309100258SXin LINote that the ability to use a symmetric key for authentication may be restricted to 176409100258SXin LIone or more IPs or subnets via the third field of the 1765052d159aSCy Schubert<samp>ntp.keys</samp> 176609100258SXin LIfile. 176709100258SXin LIThis restriction is not enabled by default, 176809100258SXin LIto maintain backward compatability. 176909100258SXin LIExpect 177009100258SXin LI<code>noepeer</code> 177109100258SXin LIto become the default in ntp-4.4. 1772052d159aSCy Schubert</p></dd> 1773052d159aSCy Schubert<dt><code>nomodify</code></dt> 1774052d159aSCy Schubert<dd><p>Deny 17752b15cb3dSCy Schubert<code>ntpq(1ntpqmdoc)</code> 17762b15cb3dSCy Schubertand 17772b15cb3dSCy Schubert<code>ntpdc(1ntpdcmdoc)</code> 17782b15cb3dSCy Schubertqueries which attempt to modify the state of the 17792b15cb3dSCy Schubertserver (i.e., run time reconfiguration). 17802b15cb3dSCy SchubertQueries which return 17812b15cb3dSCy Schubertinformation are permitted. 1782052d159aSCy Schubert</p></dd> 1783052d159aSCy Schubert<dt><code>noquery</code></dt> 1784052d159aSCy Schubert<dd><p>Deny 17852b15cb3dSCy Schubert<code>ntpq(1ntpqmdoc)</code> 17862b15cb3dSCy Schubertand 17872b15cb3dSCy Schubert<code>ntpdc(1ntpdcmdoc)</code> 17882b15cb3dSCy Schubertqueries. 17892b15cb3dSCy SchubertTime service is not affected. 1790052d159aSCy Schubert</p></dd> 1791052d159aSCy Schubert<dt><code>nopeer</code></dt> 1792052d159aSCy Schubert<dd><p>Deny unauthenticated packets which would result in mobilizing a new association. 179309100258SXin LIThis includes 179409100258SXin LIbroadcast and symmetric active packets 179509100258SXin LIwhen a configured association does not exist. 17962b15cb3dSCy SchubertIt also includes 17972b15cb3dSCy Schubert<code>pool</code> 17982b15cb3dSCy Schubertassociations, so if you want to use servers from a 17992b15cb3dSCy Schubert<code>pool</code> 18002b15cb3dSCy Schubertdirective and also want to use 18012b15cb3dSCy Schubert<code>nopeer</code> 1802052d159aSCy Schubertby default, you’ll want a 180309100258SXin LI<code>restrict source ...</code> 180409100258SXin LIline as well that does 180509100258SXin LI<em>not</em> 180609100258SXin LIinclude the 18072b15cb3dSCy Schubert<code>nopeer</code> 18082b15cb3dSCy Schubertdirective. 1809052d159aSCy Schubert</p></dd> 1810052d159aSCy Schubert<dt><code>noserve</code></dt> 1811052d159aSCy Schubert<dd><p>Deny all packets except 18122b15cb3dSCy Schubert<code>ntpq(1ntpqmdoc)</code> 18132b15cb3dSCy Schubertand 18142b15cb3dSCy Schubert<code>ntpdc(1ntpdcmdoc)</code> 18152b15cb3dSCy Schubertqueries. 1816052d159aSCy Schubert</p></dd> 1817052d159aSCy Schubert<dt><code>notrap</code></dt> 1818052d159aSCy Schubert<dd><p>Decline to provide mode 6 control message trap service to matching 18192b15cb3dSCy Schuberthosts. 1820e27abb66SXin LIThe trap service is a subsystem of the 1821e27abb66SXin LI<code>ntpq(1ntpqmdoc)</code> 1822e27abb66SXin LIcontrol message 18232b15cb3dSCy Schubertprotocol which is intended for use by remote event logging programs. 1824052d159aSCy Schubert</p></dd> 1825052d159aSCy Schubert<dt><code>notrust</code></dt> 1826052d159aSCy Schubert<dd><p>Deny service unless the packet is cryptographically authenticated. 1827052d159aSCy Schubert</p></dd> 1828052d159aSCy Schubert<dt><code>ntpport</code></dt> 1829052d159aSCy Schubert<dd><p>This is actually a match algorithm modifier, rather than a 18302b15cb3dSCy Schubertrestriction flag. 18312b15cb3dSCy SchubertIts presence causes the restriction entry to be 18322b15cb3dSCy Schubertmatched only if the source port in the packet is the standard NTP 18332b15cb3dSCy SchubertUDP port (123). 18342b15cb3dSCy SchubertBoth 18352b15cb3dSCy Schubert<code>ntpport</code> 18362b15cb3dSCy Schubertand 18372b15cb3dSCy Schubert<code>non-ntpport</code> 18382b15cb3dSCy Schubertmay 18392b15cb3dSCy Schubertbe specified. 18402b15cb3dSCy SchubertThe 18412b15cb3dSCy Schubert<code>ntpport</code> 18422b15cb3dSCy Schubertis considered more specific and 18432b15cb3dSCy Schubertis sorted later in the list. 1844052d159aSCy Schubert</p></dd> 18452d4e511cSCy Schubert<dt><code>serverresponse fuzz</code></dt> 18462d4e511cSCy Schubert<dd><p>When reponding to server requests, 18472d4e511cSCy Schubertfuzz the low order bits of the 18482d4e511cSCy Schubert<code>reftime</code>. 18492d4e511cSCy Schubert</p></dd> 1850052d159aSCy Schubert<dt><code>version</code></dt> 1851052d159aSCy Schubert<dd><p>Deny packets that do not match the current NTP version. 1852052d159aSCy Schubert</p></dd> 18532b15cb3dSCy Schubert</dl> 18542b15cb3dSCy Schubert 18552b15cb3dSCy Schubert<p>Default restriction list entries with the flags ignore, interface, 1856052d159aSCy Schubertntpport, for each of the local host’s interface addresses are 18572b15cb3dSCy Schubertinserted into the table at startup to prevent the server 18582b15cb3dSCy Schubertfrom attempting to synchronize to its own time. 18592b15cb3dSCy SchubertA default entry is also always present, though if it is 18602b15cb3dSCy Schubertotherwise unconfigured; no flags are associated 18612b15cb3dSCy Schubertwith the default entry (i.e., everything besides your own 18622b15cb3dSCy SchubertNTP server is unrestricted). 1863052d159aSCy Schubert</p></dd> 18642b15cb3dSCy Schubert</dl> 1865052d159aSCy Schubert<hr> 1866*a466cc55SCy Schubert<span id="Automatic-NTP-Configuration-Options"></span><div class="header"> 1867052d159aSCy Schubert<p> 1868052d159aSCy 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> </p> 18692b15cb3dSCy Schubert</div> 1870*a466cc55SCy Schubert<span id="Automatic-NTP-Configuration-Options-1"></span><h4 class="subsection">1.1.5 Automatic NTP Configuration Options</h4> 1871*a466cc55SCy Schubert<span id="Manycasting"></span><h4 class="subsubsection">1.1.5.1 Manycasting</h4> 18722b15cb3dSCy Schubert<p>Manycasting is a automatic discovery and configuration paradigm 18732b15cb3dSCy Schubertnew to NTPv4. 18742b15cb3dSCy SchubertIt is intended as a means for a multicast client 18752b15cb3dSCy Schubertto troll the nearby network neighborhood to find cooperating 18762b15cb3dSCy Schubertmanycast servers, validate them using cryptographic means 18772b15cb3dSCy Schubertand evaluate their time values with respect to other servers 18782b15cb3dSCy Schubertthat might be lurking in the vicinity. 18792b15cb3dSCy SchubertThe intended result is that each manycast client mobilizes 1880052d159aSCy Schubertclient associations with some number of the "best" 18812b15cb3dSCy Schubertof the nearby manycast servers, yet automatically reconfigures 18822b15cb3dSCy Schubertto sustain this number of servers should one or another fail. 1883052d159aSCy Schubert</p> 18842b15cb3dSCy Schubert<p>Note that the manycasting paradigm does not coincide 18852b15cb3dSCy Schubertwith the anycast paradigm described in RFC-1546, 18862b15cb3dSCy Schubertwhich is designed to find a single server from a clique 18872b15cb3dSCy Schubertof servers providing the same service. 18882b15cb3dSCy SchubertThe manycast paradigm is designed to find a plurality 18892b15cb3dSCy Schubertof redundant servers satisfying defined optimality criteria. 1890052d159aSCy Schubert</p> 18912b15cb3dSCy Schubert<p>Manycasting can be used with either symmetric key 18922b15cb3dSCy Schubertor public key cryptography. 18932b15cb3dSCy SchubertThe public key infrastructure (PKI) 18942b15cb3dSCy Schubertoffers the best protection against compromised keys 18952b15cb3dSCy Schubertand is generally considered stronger, at least with relatively 18962b15cb3dSCy Schubertlarge key sizes. 18972b15cb3dSCy SchubertIt is implemented using the Autokey protocol and 18982b15cb3dSCy Schubertthe OpenSSL cryptographic library available from 18992b15cb3dSCy Schubert<code>http://www.openssl.org/</code>. 19002b15cb3dSCy SchubertThe library can also be used with other NTPv4 modes 19012b15cb3dSCy Schubertas well and is highly recommended, especially for broadcast modes. 1902052d159aSCy Schubert</p> 19032b15cb3dSCy Schubert<p>A persistent manycast client association is configured 19044990d495SXin LIusing the 19054990d495SXin LI<code>manycastclient</code> 19064990d495SXin LIcommand, which is similar to the 19074990d495SXin LI<code>server</code> 19084990d495SXin LIcommand but with a multicast (IPv4 class 19092b15cb3dSCy Schubert<code>D</code> 19102b15cb3dSCy Schubertor IPv6 prefix 19112b15cb3dSCy Schubert<code>FF</code>) 19122b15cb3dSCy Schubertgroup address. 19132b15cb3dSCy SchubertThe IANA has designated IPv4 address 224.1.1.1 19142b15cb3dSCy Schubertand IPv6 address FF05::101 (site local) for NTP. 19152b15cb3dSCy SchubertWhen more servers are needed, it broadcasts manycast 19162b15cb3dSCy Schubertclient messages to this address at the minimum feasible rate 19172b15cb3dSCy Schubertand minimum feasible time-to-live (TTL) hops, depending 19182b15cb3dSCy Schuberton how many servers have already been found. 19192b15cb3dSCy SchubertThere can be as many manycast client associations 19202b15cb3dSCy Schubertas different group address, each one serving as a template 19212b15cb3dSCy Schubertfor a future ephemeral unicast client/server association. 1922052d159aSCy Schubert</p> 19232b15cb3dSCy Schubert<p>Manycast servers configured with the 19242b15cb3dSCy Schubert<code>manycastserver</code> 19252b15cb3dSCy Schubertcommand listen on the specified group address for manycast 19262b15cb3dSCy Schubertclient messages. 19272b15cb3dSCy SchubertNote the distinction between manycast client, 19282b15cb3dSCy Schubertwhich actively broadcasts messages, and manycast server, 19292b15cb3dSCy Schubertwhich passively responds to them. 19302b15cb3dSCy SchubertIf a manycast server is 19312b15cb3dSCy Schubertin scope of the current TTL and is itself synchronized 19322b15cb3dSCy Schubertto a valid source and operating at a stratum level equal 19332b15cb3dSCy Schubertto or lower than the manycast client, it replies to the 19342b15cb3dSCy Schubertmanycast client message with an ordinary unicast server message. 1935052d159aSCy Schubert</p> 19362b15cb3dSCy Schubert<p>The manycast client receiving this message mobilizes 19372b15cb3dSCy Schubertan ephemeral client/server association according to the 19382b15cb3dSCy Schubertmatching manycast client template, but only if cryptographically 19392b15cb3dSCy Schubertauthenticated and the server stratum is less than or equal 19402b15cb3dSCy Schubertto the client stratum. 19412b15cb3dSCy SchubertAuthentication is explicitly required 19422b15cb3dSCy Schubertand either symmetric key or public key (Autokey) can be used. 19432b15cb3dSCy SchubertThen, the client polls the server at its unicast address 19442b15cb3dSCy Schubertin burst mode in order to reliably set the host clock 19452b15cb3dSCy Schubertand validate the source. 19462b15cb3dSCy SchubertThis normally results 19472b15cb3dSCy Schubertin a volley of eight client/server at 2-s intervals 19482b15cb3dSCy Schubertduring which both the synchronization and cryptographic 19492b15cb3dSCy Schubertprotocols run concurrently. 19502b15cb3dSCy SchubertFollowing the volley, 19512b15cb3dSCy Schubertthe client runs the NTP intersection and clustering 1952052d159aSCy Schubertalgorithms, which act to discard all but the "best" 19532b15cb3dSCy Schubertassociations according to stratum and synchronization 19542b15cb3dSCy Schubertdistance. 19552b15cb3dSCy SchubertThe surviving associations then continue 19562b15cb3dSCy Schubertin ordinary client/server mode. 1957052d159aSCy Schubert</p> 19582b15cb3dSCy Schubert<p>The manycast client polling strategy is designed to reduce 19592b15cb3dSCy Schubertas much as possible the volume of manycast client messages 19602b15cb3dSCy Schubertand the effects of implosion due to near-simultaneous 19612b15cb3dSCy Schubertarrival of manycast server messages. 19622b15cb3dSCy SchubertThe strategy is determined by the 19632b15cb3dSCy Schubert<code>manycastclient</code>, 19642b15cb3dSCy Schubert<code>tos</code> 19652b15cb3dSCy Schubertand 19662b15cb3dSCy Schubert<code>ttl</code> 19672b15cb3dSCy Schubertconfiguration commands. 19682b15cb3dSCy SchubertThe manycast poll interval is 19692b15cb3dSCy Schubertnormally eight times the system poll interval, 19702b15cb3dSCy Schubertwhich starts out at the 19712b15cb3dSCy Schubert<code>minpoll</code> 19722b15cb3dSCy Schubertvalue specified in the 19732b15cb3dSCy Schubert<code>manycastclient</code>, 19742b15cb3dSCy Schubertcommand and, under normal circumstances, increments to the 19752b15cb3dSCy Schubert<code>maxpolll</code> 19762b15cb3dSCy Schubertvalue specified in this command. 19772b15cb3dSCy SchubertInitially, the TTL is 19784990d495SXin LIset at the minimum hops specified by the 19794990d495SXin LI<code>ttl</code> 19804990d495SXin LIcommand. 19812b15cb3dSCy SchubertAt each retransmission the TTL is increased until reaching 19822b15cb3dSCy Schubertthe maximum hops specified by this command or a sufficient 19832b15cb3dSCy Schubertnumber client associations have been found. 19842b15cb3dSCy SchubertFurther retransmissions use the same TTL. 1985052d159aSCy Schubert</p> 19862b15cb3dSCy Schubert<p>The quality and reliability of the suite of associations 19872b15cb3dSCy Schubertdiscovered by the manycast client is determined by the NTP 19882b15cb3dSCy Schubertmitigation algorithms and the 19892b15cb3dSCy Schubert<code>minclock</code> 19902b15cb3dSCy Schubertand 19912b15cb3dSCy Schubert<code>minsane</code> 19922b15cb3dSCy Schubertvalues specified in the 19932b15cb3dSCy Schubert<code>tos</code> 19942b15cb3dSCy Schubertconfiguration command. 19952b15cb3dSCy SchubertAt least 19962b15cb3dSCy Schubert<code>minsane</code> 19972b15cb3dSCy Schubertcandidate servers must be available and the mitigation 19982b15cb3dSCy Schubertalgorithms produce at least 19992b15cb3dSCy Schubert<code>minclock</code> 20002b15cb3dSCy Schubertsurvivors in order to synchronize the clock. 20012b15cb3dSCy SchubertByzantine agreement principles require at least four 20022b15cb3dSCy Schubertcandidates in order to correctly discard a single falseticker. 20032b15cb3dSCy SchubertFor legacy purposes, 20042b15cb3dSCy Schubert<code>minsane</code> 20052b15cb3dSCy Schubertdefaults to 1 and 20062b15cb3dSCy Schubert<code>minclock</code> 20072b15cb3dSCy Schubertdefaults to 3. 20082b15cb3dSCy SchubertFor manycast service 20092b15cb3dSCy Schubert<code>minsane</code> 20102b15cb3dSCy Schubertshould be explicitly set to 4, assuming at least that 20112b15cb3dSCy Schubertnumber of servers are available. 2012052d159aSCy Schubert</p> 20132b15cb3dSCy Schubert<p>If at least 20142b15cb3dSCy Schubert<code>minclock</code> 20152b15cb3dSCy Schubertservers are found, the manycast poll interval is immediately 20162b15cb3dSCy Schubertset to eight times 20172b15cb3dSCy Schubert<code>maxpoll</code>. 20182b15cb3dSCy SchubertIf less than 20192b15cb3dSCy Schubert<code>minclock</code> 20202b15cb3dSCy Schubertservers are found when the TTL has reached the maximum hops, 20212b15cb3dSCy Schubertthe manycast poll interval is doubled. 20222b15cb3dSCy SchubertFor each transmission 20232b15cb3dSCy Schubertafter that, the poll interval is doubled again until 20242b15cb3dSCy Schubertreaching the maximum of eight times 20252b15cb3dSCy Schubert<code>maxpoll</code>. 20262b15cb3dSCy SchubertFurther transmissions use the same poll interval and 20272b15cb3dSCy SchubertTTL values. 20282b15cb3dSCy SchubertNote that while all this is going on, 20292b15cb3dSCy Schuberteach client/server association found is operating normally 20302b15cb3dSCy Schubertit the system poll interval. 2031052d159aSCy Schubert</p> 20322b15cb3dSCy Schubert<p>Administratively scoped multicast boundaries are normally 20332b15cb3dSCy Schubertspecified by the network router configuration and, 20342b15cb3dSCy Schubertin the case of IPv6, the link/site scope prefix. 20352b15cb3dSCy SchubertBy default, the increment for TTL hops is 32 starting 20362b15cb3dSCy Schubertfrom 31; however, the 20372b15cb3dSCy Schubert<code>ttl</code> 20382b15cb3dSCy Schubertconfiguration command can be 20392b15cb3dSCy Schubertused to modify the values to match the scope rules. 2040052d159aSCy Schubert</p> 20412b15cb3dSCy Schubert<p>It is often useful to narrow the range of acceptable 20422b15cb3dSCy Schubertservers which can be found by manycast client associations. 20432b15cb3dSCy SchubertBecause manycast servers respond only when the client 20442b15cb3dSCy Schubertstratum is equal to or greater than the server stratum, 20452b15cb3dSCy Schubertprimary (stratum 1) servers fill find only primary servers 20462b15cb3dSCy Schubertin TTL range, which is probably the most common objective. 20472b15cb3dSCy SchubertHowever, unless configured otherwise, all manycast clients 20482b15cb3dSCy Schubertin TTL range will eventually find all primary servers 20492b15cb3dSCy Schubertin TTL range, which is probably not the most common 20502b15cb3dSCy Schubertobjective in large networks. 20512b15cb3dSCy SchubertThe 20522b15cb3dSCy Schubert<code>tos</code> 20532b15cb3dSCy Schubertcommand can be used to modify this behavior. 20542b15cb3dSCy SchubertServers with stratum below 20552b15cb3dSCy Schubert<code>floor</code> 20562b15cb3dSCy Schubertor above 20572b15cb3dSCy Schubert<code>ceiling</code> 20582b15cb3dSCy Schubertspecified in the 20592b15cb3dSCy Schubert<code>tos</code> 20602b15cb3dSCy Schubertcommand are strongly discouraged during the selection 20612b15cb3dSCy Schubertprocess; however, these servers may be temporally 20622b15cb3dSCy Schubertaccepted if the number of servers within TTL range is 20632b15cb3dSCy Schubertless than 20642b15cb3dSCy Schubert<code>minclock</code>. 2065052d159aSCy Schubert</p> 20662b15cb3dSCy Schubert<p>The above actions occur for each manycast client message, 20672b15cb3dSCy Schubertwhich repeats at the designated poll interval. 20682b15cb3dSCy SchubertHowever, once the ephemeral client association is mobilized, 20692b15cb3dSCy Schubertsubsequent manycast server replies are discarded, 20702b15cb3dSCy Schubertsince that would result in a duplicate association. 20712b15cb3dSCy SchubertIf during a poll interval the number of client associations 20722b15cb3dSCy Schubertfalls below 20732b15cb3dSCy Schubert<code>minclock</code>, 20742b15cb3dSCy Schubertall manycast client prototype associations are reset 20752b15cb3dSCy Schubertto the initial poll interval and TTL hops and operation 20762b15cb3dSCy Schubertresumes from the beginning. 20772b15cb3dSCy SchubertIt is important to avoid 20782b15cb3dSCy Schubertfrequent manycast client messages, since each one requires 20792b15cb3dSCy Schubertall manycast servers in TTL range to respond. 20802b15cb3dSCy SchubertThe result could well be an implosion, either minor or major, 20812b15cb3dSCy Schubertdepending on the number of servers in range. 20822b15cb3dSCy SchubertThe recommended value for 20832b15cb3dSCy Schubert<code>maxpoll</code> 20842b15cb3dSCy Schubertis 12 (4,096 s). 2085052d159aSCy Schubert</p> 20862b15cb3dSCy Schubert<p>It is possible and frequently useful to configure a host 20872b15cb3dSCy Schubertas both manycast client and manycast server. 20882b15cb3dSCy SchubertA number of hosts configured this way and sharing a common 20892b15cb3dSCy Schubertgroup address will automatically organize themselves 20902b15cb3dSCy Schubertin an optimum configuration based on stratum and 20912b15cb3dSCy Schubertsynchronization distance. 20922b15cb3dSCy SchubertFor example, consider an NTP 20932b15cb3dSCy Schubertsubnet of two primary servers and a hundred or more 20942b15cb3dSCy Schubertdependent clients. 20952b15cb3dSCy SchubertWith two exceptions, all servers 20962b15cb3dSCy Schubertand clients have identical configuration files including both 20972b15cb3dSCy Schubert<code>multicastclient</code> 20982b15cb3dSCy Schubertand 20992b15cb3dSCy Schubert<code>multicastserver</code> 21002b15cb3dSCy Schubertcommands using, for instance, multicast group address 21012b15cb3dSCy Schubert239.1.1.1. 21022b15cb3dSCy SchubertThe only exception is that each primary server 21032b15cb3dSCy Schubertconfiguration file must include commands for the primary 21042b15cb3dSCy Schubertreference source such as a GPS receiver. 2105052d159aSCy Schubert</p> 21062b15cb3dSCy Schubert<p>The remaining configuration files for all secondary 21072b15cb3dSCy Schubertservers and clients have the same contents, except for the 21082b15cb3dSCy Schubert<code>tos</code> 21092b15cb3dSCy Schubertcommand, which is specific for each stratum level. 21102b15cb3dSCy SchubertFor stratum 1 and stratum 2 servers, that command is 21112b15cb3dSCy Schubertnot necessary. 21122b15cb3dSCy SchubertFor stratum 3 and above servers the 21132b15cb3dSCy Schubert<code>floor</code> 21142b15cb3dSCy Schubertvalue is set to the intended stratum number. 21152b15cb3dSCy SchubertThus, all stratum 3 configuration files are identical, 21162b15cb3dSCy Schubertall stratum 4 files are identical and so forth. 2117052d159aSCy Schubert</p> 21182b15cb3dSCy Schubert<p>Once operations have stabilized in this scenario, 21192b15cb3dSCy Schubertthe primary servers will find the primary reference source 21202b15cb3dSCy Schubertand each other, since they both operate at the same 21212b15cb3dSCy Schubertstratum (1), but not with any secondary server or client, 21222b15cb3dSCy Schubertsince these operate at a higher stratum. 21232b15cb3dSCy SchubertThe secondary 21242b15cb3dSCy Schubertservers will find the servers at the same stratum level. 21252b15cb3dSCy SchubertIf one of the primary servers loses its GPS receiver, 21262b15cb3dSCy Schubertit will continue to operate as a client and other clients 21272b15cb3dSCy Schubertwill time out the corresponding association and 21282b15cb3dSCy Schubertre-associate accordingly. 2129052d159aSCy Schubert</p> 21302b15cb3dSCy Schubert<p>Some administrators prefer to avoid running 21312b15cb3dSCy Schubert<code>ntpd(1ntpdmdoc)</code> 21322b15cb3dSCy Schubertcontinuously and run either 21339034852cSGleb Smirnoff<code>sntp(1sntpmdoc)</code> 21342b15cb3dSCy Schubertor 21352b15cb3dSCy Schubert<code>ntpd(1ntpdmdoc)</code> 21362b15cb3dSCy Schubert<code>-q</code> 21372b15cb3dSCy Schubertas a cron job. 21382b15cb3dSCy SchubertIn either case the servers must be 21392b15cb3dSCy Schubertconfigured in advance and the program fails if none are 21402b15cb3dSCy Schubertavailable when the cron job runs. 21412b15cb3dSCy SchubertA really slick 21422b15cb3dSCy Schubertapplication of manycast is with 21432b15cb3dSCy Schubert<code>ntpd(1ntpdmdoc)</code> 21442b15cb3dSCy Schubert<code>-q</code>. 21452b15cb3dSCy SchubertThe program wakes up, scans the local landscape looking 21462b15cb3dSCy Schubertfor the usual suspects, selects the best from among 21472b15cb3dSCy Schubertthe rascals, sets the clock and then departs. 21482b15cb3dSCy SchubertServers do not have to be configured in advance and 21492b15cb3dSCy Schubertall clients throughout the network can have the same 21502b15cb3dSCy Schubertconfiguration file. 2151*a466cc55SCy Schubert</p><span id="Manycast-Interactions-with-Autokey"></span><h4 class="subsubsection">1.1.5.2 Manycast Interactions with Autokey</h4> 21522b15cb3dSCy Schubert<p>Each time a manycast client sends a client mode packet 21532b15cb3dSCy Schubertto a multicast group address, all manycast servers 21542b15cb3dSCy Schubertin scope generate a reply including the host name 21552b15cb3dSCy Schubertand status word. 21562b15cb3dSCy SchubertThe manycast clients then run 21572b15cb3dSCy Schubertthe Autokey protocol, which collects and verifies 21582b15cb3dSCy Schubertall certificates involved. 21592b15cb3dSCy SchubertFollowing the burst interval 21602b15cb3dSCy Schubertall but three survivors are cast off, 21612b15cb3dSCy Schubertbut the certificates remain in the local cache. 21622b15cb3dSCy SchubertIt often happens that several complete signing trails 21632b15cb3dSCy Schubertfrom the client to the primary servers are collected in this way. 2164052d159aSCy Schubert</p> 21652b15cb3dSCy Schubert<p>About once an hour or less often if the poll interval 21662b15cb3dSCy Schubertexceeds this, the client regenerates the Autokey key list. 21672b15cb3dSCy SchubertThis is in general transparent in client/server mode. 21682b15cb3dSCy SchubertHowever, about once per day the server private value 21692b15cb3dSCy Schubertused to generate cookies is refreshed along with all 21702b15cb3dSCy Schubertmanycast client associations. 21712b15cb3dSCy SchubertIn this case all 21722b15cb3dSCy Schubertcryptographic values including certificates is refreshed. 21732b15cb3dSCy SchubertIf a new certificate has been generated since 21742b15cb3dSCy Schubertthe last refresh epoch, it will automatically revoke 21752b15cb3dSCy Schubertall prior certificates that happen to be in the 21762b15cb3dSCy Schubertcertificate cache. 21772b15cb3dSCy SchubertAt the same time, the manycast 21782b15cb3dSCy Schubertscheme starts all over from the beginning and 21792b15cb3dSCy Schubertthe expanding ring shrinks to the minimum and increments 21802b15cb3dSCy Schubertfrom there while collecting all servers in scope. 2181*a466cc55SCy Schubert</p><span id="Broadcast-Options"></span><h4 class="subsubsection">1.1.5.3 Broadcast Options</h4> 2182052d159aSCy Schubert<dl compact="compact"> 2183052d159aSCy Schubert<dt><code>tos</code> <code>[<code>bcpollbstep</code> <kbd>gate</kbd>]</code></dt> 2184052d159aSCy Schubert<dd><p>This command provides a way to delay, 2185f391d6bcSXin LIby the specified number of broadcast poll intervals, 2186f391d6bcSXin LIbelieving backward time steps from a broadcast server. 2187f391d6bcSXin LIBroadcast time networks are expected to be trusted. 2188052d159aSCy SchubertIn the event a broadcast server’s time is stepped backwards, 2189f391d6bcSXin LIthere is clear benefit to having the clients notice this change 2190f391d6bcSXin LIas soon as possible. 2191f391d6bcSXin LIAttacks such as replay attacks can happen, however, 2192f391d6bcSXin LIand even though there are a number of protections built in to 2193f391d6bcSXin LIbroadcast mode, attempts to perform a replay attack are possible. 2194f391d6bcSXin LIThis value defaults to 0, but can be changed 2195f391d6bcSXin LIto any number of poll intervals between 0 and 4. 2196052d159aSCy Schubert</p></dd> 219709100258SXin LI</dl> 2198*a466cc55SCy Schubert<span id="Manycast-Options"></span><h4 class="subsubsection">1.1.5.4 Manycast Options</h4> 2199052d159aSCy Schubert<dl compact="compact"> 2200052d159aSCy 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> 2201052d159aSCy Schubert<dd><p>This command affects the clock selection and clustering 22022b15cb3dSCy Schubertalgorithms. 22032b15cb3dSCy SchubertIt can be used to select the quality and 22042b15cb3dSCy Schubertquantity of peers used to synchronize the system clock 22052b15cb3dSCy Schubertand is most useful in manycast mode. 22062b15cb3dSCy SchubertThe variables operate 22072b15cb3dSCy Schubertas follows: 2208052d159aSCy Schubert</p><dl compact="compact"> 2209052d159aSCy Schubert<dt><code>ceiling</code> <kbd>ceiling</kbd></dt> 2210052d159aSCy Schubert<dd><p>Peers with strata above 22112b15cb3dSCy Schubert<code>ceiling</code> 22122b15cb3dSCy Schubertwill be discarded if there are at least 22132b15cb3dSCy Schubert<code>minclock</code> 22142b15cb3dSCy Schubertpeers remaining. 22152b15cb3dSCy SchubertThis value defaults to 15, but can be changed 22162b15cb3dSCy Schubertto any number from 1 to 15. 2217052d159aSCy Schubert</p></dd> 2218052d159aSCy Schubert<dt><code>cohort</code> <code>{0 | 1}</code></dt> 2219052d159aSCy Schubert<dd><p>This is a binary flag which enables (0) or disables (1) 22202b15cb3dSCy Schubertmanycast server replies to manycast clients with the same 22212b15cb3dSCy Schubertstratum level. 22222b15cb3dSCy SchubertThis is useful to reduce implosions where 22232b15cb3dSCy Schubertlarge numbers of clients with the same stratum level 22242b15cb3dSCy Schubertare present. 22252b15cb3dSCy SchubertThe default is to enable these replies. 2226052d159aSCy Schubert</p></dd> 2227052d159aSCy Schubert<dt><code>floor</code> <kbd>floor</kbd></dt> 2228052d159aSCy Schubert<dd><p>Peers with strata below 22292b15cb3dSCy Schubert<code>floor</code> 22302b15cb3dSCy Schubertwill be discarded if there are at least 22312b15cb3dSCy Schubert<code>minclock</code> 22322b15cb3dSCy Schubertpeers remaining. 22332b15cb3dSCy SchubertThis value defaults to 1, but can be changed 22342b15cb3dSCy Schubertto any number from 1 to 15. 2235052d159aSCy Schubert</p></dd> 2236052d159aSCy Schubert<dt><code>minclock</code> <kbd>minclock</kbd></dt> 2237052d159aSCy Schubert<dd><p>The clustering algorithm repeatedly casts out outlier 22382b15cb3dSCy Schubertassociations until no more than 22392b15cb3dSCy Schubert<code>minclock</code> 22402b15cb3dSCy Schubertassociations remain. 22412b15cb3dSCy SchubertThis value defaults to 3, 22422b15cb3dSCy Schubertbut can be changed to any number from 1 to the number of 22432b15cb3dSCy Schubertconfigured sources. 2244052d159aSCy Schubert</p></dd> 2245052d159aSCy Schubert<dt><code>minsane</code> <kbd>minsane</kbd></dt> 2246052d159aSCy Schubert<dd><p>This is the minimum number of candidates available 22472b15cb3dSCy Schubertto the clock selection algorithm in order to produce 22482b15cb3dSCy Schubertone or more truechimers for the clustering algorithm. 22492b15cb3dSCy SchubertIf fewer than this number are available, the clock is 22502b15cb3dSCy Schubertundisciplined and allowed to run free. 22512b15cb3dSCy SchubertThe default is 1 22522b15cb3dSCy Schubertfor legacy purposes. 22532b15cb3dSCy SchubertHowever, according to principles of 22542b15cb3dSCy SchubertByzantine agreement, 22552b15cb3dSCy Schubert<code>minsane</code> 22562b15cb3dSCy Schubertshould be at least 4 in order to detect and discard 22572b15cb3dSCy Schuberta single falseticker. 2258052d159aSCy Schubert</p></dd> 22592b15cb3dSCy Schubert</dl> 2260052d159aSCy Schubert</dd> 2261052d159aSCy Schubert<dt><code>ttl</code> <kbd>hop</kbd> <kbd>...</kbd></dt> 2262052d159aSCy Schubert<dd><p>This command specifies a list of TTL values in increasing 22632b15cb3dSCy Schubertorder, up to 8 values can be specified. 22642b15cb3dSCy SchubertIn manycast mode these values are used in turn 22652b15cb3dSCy Schubertin an expanding-ring search. 22662b15cb3dSCy SchubertThe default is eight 22672b15cb3dSCy Schubertmultiples of 32 starting at 31. 2268052d159aSCy Schubert</p></dd> 22692b15cb3dSCy Schubert</dl> 2270052d159aSCy Schubert<hr> 2271*a466cc55SCy Schubert<span id="Reference-Clock-Support"></span><div class="header"> 2272052d159aSCy Schubert<p> 2273052d159aSCy 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> </p> 22742b15cb3dSCy Schubert</div> 2275*a466cc55SCy Schubert<span id="Reference-Clock-Support-1"></span><h4 class="subsection">1.1.6 Reference Clock Support</h4> 22762b15cb3dSCy Schubert<p>The NTP Version 4 daemon supports some three dozen different radio, 22772b15cb3dSCy Schubertsatellite and modem reference clocks plus a special pseudo-clock 22782b15cb3dSCy Schubertused for backup or when no other clock source is available. 22792b15cb3dSCy SchubertDetailed descriptions of individual device drivers and options can 22802b15cb3dSCy Schubertbe found in the 2281052d159aSCy Schubert"Reference Clock Drivers" 22822b15cb3dSCy Schubertpage 22832b15cb3dSCy Schubert(available as part of the HTML documentation 22842b15cb3dSCy Schubertprovided in 2285052d159aSCy Schubert<samp>/usr/share/doc/ntp</samp>). 22862b15cb3dSCy SchubertAdditional information can be found in the pages linked 22872b15cb3dSCy Schubertthere, including the 2288052d159aSCy Schubert"Debugging Hints for Reference Clock Drivers" 22892b15cb3dSCy Schubertand 2290052d159aSCy Schubert"How To Write a Reference Clock Driver" 22912b15cb3dSCy Schubertpages 22922b15cb3dSCy Schubert(available as part of the HTML documentation 22932b15cb3dSCy Schubertprovided in 2294052d159aSCy Schubert<samp>/usr/share/doc/ntp</samp>). 22952b15cb3dSCy SchubertIn addition, support for a PPS 22962b15cb3dSCy Schubertsignal is available as described in the 2297052d159aSCy Schubert"Pulse-per-second (PPS) Signal Interfacing" 22982b15cb3dSCy Schubertpage 22992b15cb3dSCy Schubert(available as part of the HTML documentation 23002b15cb3dSCy Schubertprovided in 2301052d159aSCy Schubert<samp>/usr/share/doc/ntp</samp>). 23022b15cb3dSCy SchubertMany 23032b15cb3dSCy Schubertdrivers support special line discipline/streams modules which can 23042b15cb3dSCy Schubertsignificantly improve the accuracy using the driver. 23052b15cb3dSCy SchubertThese are 23062b15cb3dSCy Schubertdescribed in the 2307052d159aSCy Schubert"Line Disciplines and Streams Drivers" 23082b15cb3dSCy Schubertpage 23092b15cb3dSCy Schubert(available as part of the HTML documentation 23102b15cb3dSCy Schubertprovided in 2311052d159aSCy Schubert<samp>/usr/share/doc/ntp</samp>). 2312052d159aSCy Schubert</p> 23132b15cb3dSCy Schubert<p>A reference clock will generally (though not always) be a radio 23142b15cb3dSCy Schuberttimecode receiver which is synchronized to a source of standard 23152b15cb3dSCy Schuberttime such as the services offered by the NRC in Canada and NIST and 23162b15cb3dSCy SchubertUSNO in the US. 23172b15cb3dSCy SchubertThe interface between the computer and the timecode 23182b15cb3dSCy Schubertreceiver is device dependent, but is usually a serial port. 23192b15cb3dSCy SchubertA 23202b15cb3dSCy Schubertdevice driver specific to each reference clock must be selected and 23212b15cb3dSCy Schubertcompiled in the distribution; however, most common radio, satellite 23222b15cb3dSCy Schubertand modem clocks are included by default. 23232b15cb3dSCy SchubertNote that an attempt to 23242b15cb3dSCy Schubertconfigure a reference clock when the driver has not been compiled 23252b15cb3dSCy Schubertor the hardware port has not been appropriately configured results 23262b15cb3dSCy Schubertin a scalding remark to the system log file, but is otherwise non 23272b15cb3dSCy Schuberthazardous. 2328052d159aSCy Schubert</p> 23292b15cb3dSCy Schubert<p>For the purposes of configuration, 23302b15cb3dSCy Schubert<code>ntpd(1ntpdmdoc)</code> 23312b15cb3dSCy Schuberttreats 23322b15cb3dSCy Schubertreference clocks in a manner analogous to normal NTP peers as much 23332b15cb3dSCy Schubertas possible. 23342b15cb3dSCy SchubertReference clocks are identified by a syntactically 23352b15cb3dSCy Schubertcorrect but invalid IP address, in order to distinguish them from 23362b15cb3dSCy Schubertnormal NTP peers. 23372b15cb3dSCy SchubertReference clock addresses are of the form 23382b15cb3dSCy Schubert<code>127.127.</code><kbd>t</kbd>.<kbd>u</kbd>, 23392b15cb3dSCy Schubertwhere 23402b15cb3dSCy Schubert<kbd>t</kbd> 23412b15cb3dSCy Schubertis an integer 23422b15cb3dSCy Schubertdenoting the clock type and 23432b15cb3dSCy Schubert<kbd>u</kbd> 23442b15cb3dSCy Schubertindicates the unit 23452b15cb3dSCy Schubertnumber in the range 0-3. 23462b15cb3dSCy SchubertWhile it may seem overkill, it is in fact 23472b15cb3dSCy Schubertsometimes useful to configure multiple reference clocks of the same 23482b15cb3dSCy Schuberttype, in which case the unit numbers must be unique. 2349052d159aSCy Schubert</p> 23502b15cb3dSCy Schubert<p>The 23512b15cb3dSCy Schubert<code>server</code> 23522b15cb3dSCy Schubertcommand is used to configure a reference 23532b15cb3dSCy Schubertclock, where the 23542b15cb3dSCy Schubert<kbd>address</kbd> 23552b15cb3dSCy Schubertargument in that command 23562b15cb3dSCy Schubertis the clock address. 23572b15cb3dSCy SchubertThe 23582b15cb3dSCy Schubert<code>key</code>, 23592b15cb3dSCy Schubert<code>version</code> 23602b15cb3dSCy Schubertand 23612b15cb3dSCy Schubert<code>ttl</code> 23622b15cb3dSCy Schubertoptions are not used for reference clock support. 23632b15cb3dSCy SchubertThe 23642b15cb3dSCy Schubert<code>mode</code> 23652b15cb3dSCy Schubertoption is added for reference clock support, as 23662b15cb3dSCy Schubertdescribed below. 23672b15cb3dSCy SchubertThe 23682b15cb3dSCy Schubert<code>prefer</code> 23692b15cb3dSCy Schubertoption can be useful to 23702b15cb3dSCy Schubertpersuade the server to cherish a reference clock with somewhat more 23712b15cb3dSCy Schubertenthusiasm than other reference clocks or peers. 23722b15cb3dSCy SchubertFurther 23732b15cb3dSCy Schubertinformation on this option can be found in the 2374052d159aSCy Schubert"Mitigation Rules and the prefer Keyword" 23752b15cb3dSCy Schubert(available as part of the HTML documentation 23762b15cb3dSCy Schubertprovided in 2377052d159aSCy Schubert<samp>/usr/share/doc/ntp</samp>) 23782b15cb3dSCy Schubertpage. 23792b15cb3dSCy SchubertThe 23802b15cb3dSCy Schubert<code>minpoll</code> 23812b15cb3dSCy Schubertand 23822b15cb3dSCy Schubert<code>maxpoll</code> 23832b15cb3dSCy Schubertoptions have 23842b15cb3dSCy Schubertmeaning only for selected clock drivers. 23852b15cb3dSCy SchubertSee the individual clock 23862b15cb3dSCy Schubertdriver document pages for additional information. 2387052d159aSCy Schubert</p> 23882b15cb3dSCy Schubert<p>The 23892b15cb3dSCy Schubert<code>fudge</code> 23902b15cb3dSCy Schubertcommand is used to provide additional 23912b15cb3dSCy Schubertinformation for individual clock drivers and normally follows 23922b15cb3dSCy Schubertimmediately after the 23932b15cb3dSCy Schubert<code>server</code> 23942b15cb3dSCy Schubertcommand. 23952b15cb3dSCy SchubertThe 23962b15cb3dSCy Schubert<kbd>address</kbd> 23972b15cb3dSCy Schubertargument specifies the clock address. 23982b15cb3dSCy SchubertThe 23992b15cb3dSCy Schubert<code>refid</code> 24002b15cb3dSCy Schubertand 24012b15cb3dSCy Schubert<code>stratum</code> 24022b15cb3dSCy Schubertoptions can be used to 24032b15cb3dSCy Schubertoverride the defaults for the device. 24042b15cb3dSCy SchubertThere are two optional 24052b15cb3dSCy Schubertdevice-dependent time offsets and four flags that can be included 24062b15cb3dSCy Schubertin the 24072b15cb3dSCy Schubert<code>fudge</code> 24082b15cb3dSCy Schubertcommand as well. 2409052d159aSCy Schubert</p> 24102b15cb3dSCy Schubert<p>The stratum number of a reference clock is by default zero. 24112b15cb3dSCy SchubertSince the 24122b15cb3dSCy Schubert<code>ntpd(1ntpdmdoc)</code> 24132b15cb3dSCy Schubertdaemon adds one to the stratum of each 24142b15cb3dSCy Schubertpeer, a primary server ordinarily displays an external stratum of 24152b15cb3dSCy Schubertone. 24162b15cb3dSCy SchubertIn order to provide engineered backups, it is often useful to 24172b15cb3dSCy Schubertspecify the reference clock stratum as greater than zero. 24182b15cb3dSCy SchubertThe 24192b15cb3dSCy Schubert<code>stratum</code> 24202b15cb3dSCy Schubertoption is used for this purpose. 24212b15cb3dSCy SchubertAlso, in cases 24222b15cb3dSCy Schubertinvolving both a reference clock and a pulse-per-second (PPS) 24232b15cb3dSCy Schubertdiscipline signal, it is useful to specify the reference clock 24242b15cb3dSCy Schubertidentifier as other than the default, depending on the driver. 24252b15cb3dSCy SchubertThe 24262b15cb3dSCy Schubert<code>refid</code> 24272b15cb3dSCy Schubertoption is used for this purpose. 24282b15cb3dSCy SchubertExcept where noted, 24292b15cb3dSCy Schubertthese options apply to all clock drivers. 2430*a466cc55SCy Schubert</p><span id="Reference-Clock-Commands"></span><h4 class="subsubsection">1.1.6.1 Reference Clock Commands</h4> 2431052d159aSCy Schubert<dl compact="compact"> 2432052d159aSCy 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> 2433052d159aSCy Schubert<dd><p>This command can be used to configure reference clocks in 24342b15cb3dSCy Schubertspecial ways. 24352b15cb3dSCy SchubertThe options are interpreted as follows: 2436052d159aSCy Schubert</p><dl compact="compact"> 2437052d159aSCy Schubert<dt><code>prefer</code></dt> 2438052d159aSCy Schubert<dd><p>Marks the reference clock as preferred. 24392b15cb3dSCy SchubertAll other things being 24402b15cb3dSCy Schubertequal, this host will be chosen for synchronization among a set of 24412b15cb3dSCy Schubertcorrectly operating hosts. 24422b15cb3dSCy SchubertSee the 2443052d159aSCy Schubert"Mitigation Rules and the prefer Keyword" 24442b15cb3dSCy Schubertpage 24452b15cb3dSCy Schubert(available as part of the HTML documentation 24462b15cb3dSCy Schubertprovided in 2447052d159aSCy Schubert<samp>/usr/share/doc/ntp</samp>) 24482b15cb3dSCy Schubertfor further information. 2449052d159aSCy Schubert</p></dd> 2450052d159aSCy Schubert<dt><code>mode</code> <kbd>int</kbd></dt> 2451052d159aSCy Schubert<dd><p>Specifies a mode number which is interpreted in a 24522b15cb3dSCy Schubertdevice-specific fashion. 24532b15cb3dSCy SchubertFor instance, it selects a dialing 24542b15cb3dSCy Schubertprotocol in the ACTS driver and a device subtype in the 24552b15cb3dSCy Schubertparse 24562b15cb3dSCy Schubertdrivers. 2457052d159aSCy Schubert</p></dd> 2458052d159aSCy Schubert<dt><code>minpoll</code> <kbd>int</kbd></dt> 2459052d159aSCy Schubert<dt><code>maxpoll</code> <kbd>int</kbd></dt> 2460052d159aSCy Schubert<dd><p>These options specify the minimum and maximum polling interval 24612b15cb3dSCy Schubertfor reference clock messages, as a power of 2 in seconds 24622b15cb3dSCy SchubertFor 24632b15cb3dSCy Schubertmost directly connected reference clocks, both 24642b15cb3dSCy Schubert<code>minpoll</code> 24652b15cb3dSCy Schubertand 24662b15cb3dSCy Schubert<code>maxpoll</code> 24672b15cb3dSCy Schubertdefault to 6 (64 s). 24682b15cb3dSCy SchubertFor modem reference clocks, 24692b15cb3dSCy Schubert<code>minpoll</code> 24702b15cb3dSCy Schubertdefaults to 10 (17.1 m) and 24712b15cb3dSCy Schubert<code>maxpoll</code> 24722b15cb3dSCy Schubertdefaults to 14 (4.5 h). 24732b15cb3dSCy SchubertThe allowable range is 4 (16 s) to 17 (36.4 h) inclusive. 2474052d159aSCy Schubert</p></dd> 24752b15cb3dSCy Schubert</dl> 2476052d159aSCy Schubert</dd> 2477052d159aSCy 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> 2478052d159aSCy Schubert<dd><p>This command can be used to configure reference clocks in 24792b15cb3dSCy Schubertspecial ways. 24802b15cb3dSCy SchubertIt must immediately follow the 24812b15cb3dSCy Schubert<code>server</code> 24822b15cb3dSCy Schubertcommand which configures the driver. 24832b15cb3dSCy SchubertNote that the same capability 24842b15cb3dSCy Schubertis possible at run time using the 24852b15cb3dSCy Schubert<code>ntpdc(1ntpdcmdoc)</code> 24862b15cb3dSCy Schubertprogram. 24872b15cb3dSCy SchubertThe options are interpreted as 24882b15cb3dSCy Schubertfollows: 2489052d159aSCy Schubert</p><dl compact="compact"> 2490052d159aSCy Schubert<dt><code>time1</code> <kbd>sec</kbd></dt> 2491052d159aSCy Schubert<dd><p>Specifies a constant to be added to the time offset produced by 24922b15cb3dSCy Schubertthe driver, a fixed-point decimal number in seconds. 24932b15cb3dSCy SchubertThis is used 24942b15cb3dSCy Schubertas a calibration constant to adjust the nominal time offset of a 24952b15cb3dSCy Schubertparticular clock to agree with an external standard, such as a 24962b15cb3dSCy Schubertprecision PPS signal. 24972b15cb3dSCy SchubertIt also provides a way to correct a 24982b15cb3dSCy Schubertsystematic error or bias due to serial port or operating system 24992b15cb3dSCy Schubertlatencies, different cable lengths or receiver internal delay. 25002b15cb3dSCy SchubertThe 25012b15cb3dSCy Schubertspecified offset is in addition to the propagation delay provided 25022b15cb3dSCy Schubertby other means, such as internal DIPswitches. 25032b15cb3dSCy SchubertWhere a calibration 25042b15cb3dSCy Schubertfor an individual system and driver is available, an approximate 25052b15cb3dSCy Schubertcorrection is noted in the driver documentation pages. 25062b15cb3dSCy SchubertNote: in order to facilitate calibration when more than one 25072b15cb3dSCy Schubertradio clock or PPS signal is supported, a special calibration 25082b15cb3dSCy Schubertfeature is available. 25092b15cb3dSCy SchubertIt takes the form of an argument to the 25102b15cb3dSCy Schubert<code>enable</code> 25112b15cb3dSCy Schubertcommand described in 25122b15cb3dSCy Schubert<a href="#Miscellaneous-Options">Miscellaneous Options</a> 25132b15cb3dSCy Schubertpage and operates as described in the 2514052d159aSCy Schubert"Reference Clock Drivers" 25152b15cb3dSCy Schubertpage 25162b15cb3dSCy Schubert(available as part of the HTML documentation 25172b15cb3dSCy Schubertprovided in 2518052d159aSCy Schubert<samp>/usr/share/doc/ntp</samp>). 2519052d159aSCy Schubert</p></dd> 2520052d159aSCy Schubert<dt><code>time2</code> <kbd>secs</kbd></dt> 2521052d159aSCy Schubert<dd><p>Specifies a fixed-point decimal number in seconds, which is 25222b15cb3dSCy Schubertinterpreted in a driver-dependent way. 25232b15cb3dSCy SchubertSee the descriptions of 25242b15cb3dSCy Schubertspecific drivers in the 2525052d159aSCy Schubert"Reference Clock Drivers" 25262b15cb3dSCy Schubertpage 25272b15cb3dSCy Schubert(available as part of the HTML documentation 25282b15cb3dSCy Schubertprovided in 2529052d159aSCy Schubert<samp>/usr/share/doc/ntp</samp> <samp>).</samp> 2530052d159aSCy Schubert</p></dd> 2531052d159aSCy Schubert<dt><code>stratum</code> <kbd>int</kbd></dt> 2532052d159aSCy Schubert<dd><p>Specifies the stratum number assigned to the driver, an integer 25332b15cb3dSCy Schubertbetween 0 and 15. 25342b15cb3dSCy SchubertThis number overrides the default stratum number 25352b15cb3dSCy Schubertordinarily assigned by the driver itself, usually zero. 2536052d159aSCy Schubert</p></dd> 2537052d159aSCy Schubert<dt><code>refid</code> <kbd>string</kbd></dt> 2538052d159aSCy Schubert<dd><p>Specifies an ASCII string of from one to four characters which 25392b15cb3dSCy Schubertdefines the reference identifier used by the driver. 25402b15cb3dSCy SchubertThis string 25412b15cb3dSCy Schubertoverrides the default identifier ordinarily assigned by the driver 25422b15cb3dSCy Schubertitself. 2543052d159aSCy Schubert</p></dd> 2544052d159aSCy Schubert<dt><code>mode</code> <kbd>int</kbd></dt> 2545052d159aSCy Schubert<dd><p>Specifies a mode number which is interpreted in a 25462b15cb3dSCy Schubertdevice-specific fashion. 25472b15cb3dSCy SchubertFor instance, it selects a dialing 25482b15cb3dSCy Schubertprotocol in the ACTS driver and a device subtype in the 25492b15cb3dSCy Schubertparse 25502b15cb3dSCy Schubertdrivers. 2551052d159aSCy Schubert</p></dd> 2552052d159aSCy Schubert<dt><code>flag1</code> <code>0</code> <code>|</code> <code>1</code></dt> 2553052d159aSCy Schubert<dt><code>flag2</code> <code>0</code> <code>|</code> <code>1</code></dt> 2554052d159aSCy Schubert<dt><code>flag3</code> <code>0</code> <code>|</code> <code>1</code></dt> 2555052d159aSCy Schubert<dt><code>flag4</code> <code>0</code> <code>|</code> <code>1</code></dt> 2556052d159aSCy Schubert<dd><p>These four flags are used for customizing the clock driver. 25572b15cb3dSCy SchubertThe 25582b15cb3dSCy Schubertinterpretation of these values, and whether they are used at all, 25592b15cb3dSCy Schubertis a function of the particular clock driver. 25602b15cb3dSCy SchubertHowever, by 25612b15cb3dSCy Schubertconvention 25622b15cb3dSCy Schubert<code>flag4</code> 25632b15cb3dSCy Schubertis used to enable recording monitoring 25642b15cb3dSCy Schubertdata to the 25652b15cb3dSCy Schubert<code>clockstats</code> 25662b15cb3dSCy Schubertfile configured with the 25672b15cb3dSCy Schubert<code>filegen</code> 25682b15cb3dSCy Schubertcommand. 25692b15cb3dSCy SchubertFurther information on the 25702b15cb3dSCy Schubert<code>filegen</code> 25712b15cb3dSCy Schubertcommand can be found in 2572052d159aSCy Schubert‘Monitoring Options’. 2573052d159aSCy Schubert</p></dd> 25742b15cb3dSCy Schubert</dl> 2575052d159aSCy Schubert</dd> 25762b15cb3dSCy Schubert</dl> 2577052d159aSCy Schubert<hr> 2578*a466cc55SCy Schubert<span id="Miscellaneous-Options"></span><div class="header"> 2579052d159aSCy Schubert<p> 2580052d159aSCy 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> </p> 25812b15cb3dSCy Schubert</div> 2582*a466cc55SCy Schubert<span id="Miscellaneous-Options-1"></span><h4 class="subsection">1.1.7 Miscellaneous Options</h4> 2583052d159aSCy Schubert<dl compact="compact"> 2584052d159aSCy Schubert<dt><code>broadcastdelay</code> <kbd>seconds</kbd></dt> 2585052d159aSCy Schubert<dd><p>The broadcast and multicast modes require a special calibration 25862b15cb3dSCy Schubertto determine the network delay between the local and remote 25872b15cb3dSCy Schubertservers. 25882b15cb3dSCy SchubertOrdinarily, this is done automatically by the initial 25892b15cb3dSCy Schubertprotocol exchanges between the client and server. 25902b15cb3dSCy SchubertIn some cases, 25912b15cb3dSCy Schubertthe calibration procedure may fail due to network or server access 25922b15cb3dSCy Schubertcontrols, for example. 25932b15cb3dSCy SchubertThis command specifies the default delay to 25942b15cb3dSCy Schubertbe used under these circumstances. 25952b15cb3dSCy SchubertTypically (for Ethernet), a 25962b15cb3dSCy Schubertnumber between 0.003 and 0.007 seconds is appropriate. 25972b15cb3dSCy SchubertThe default 25982b15cb3dSCy Schubertwhen this command is not used is 0.004 seconds. 2599052d159aSCy Schubert</p></dd> 2600052d159aSCy Schubert<dt><code>calldelay</code> <kbd>delay</kbd></dt> 2601052d159aSCy Schubert<dd><p>This option controls the delay in seconds between the first and second 26022b15cb3dSCy Schubertpackets sent in burst or iburst mode to allow additional time for a modem 26032b15cb3dSCy Schubertor ISDN call to complete. 2604052d159aSCy Schubert</p></dd> 2605052d159aSCy Schubert<dt><code>driftfile</code> <kbd>driftfile</kbd></dt> 2606052d159aSCy Schubert<dd><p>This command specifies the complete path and name of the file used to 26072b15cb3dSCy Schubertrecord the frequency of the local clock oscillator. 26082b15cb3dSCy SchubertThis is the same 26092b15cb3dSCy Schubertoperation as the 26102b15cb3dSCy Schubert<code>-f</code> 26112b15cb3dSCy Schubertcommand line option. 26122b15cb3dSCy SchubertIf the file exists, it is read at 26132b15cb3dSCy Schubertstartup in order to set the initial frequency and then updated once per 26142b15cb3dSCy Schuberthour with the current frequency computed by the daemon. 26152b15cb3dSCy SchubertIf the file name is 26162b15cb3dSCy Schubertspecified, but the file itself does not exist, the starts with an initial 26172b15cb3dSCy Schubertfrequency of zero and creates the file when writing it for the first time. 26182b15cb3dSCy SchubertIf this command is not given, the daemon will always start with an initial 26192b15cb3dSCy Schubertfrequency of zero. 2620052d159aSCy Schubert</p> 26212b15cb3dSCy Schubert<p>The file format consists of a single line containing a single 26222b15cb3dSCy Schubertfloating point number, which records the frequency offset measured 26232b15cb3dSCy Schubertin parts-per-million (PPM). 26242b15cb3dSCy SchubertThe file is updated by first writing 26252b15cb3dSCy Schubertthe current drift value into a temporary file and then renaming 26262b15cb3dSCy Schubertthis file to replace the old version. 26272b15cb3dSCy SchubertThis implies that 26282b15cb3dSCy Schubert<code>ntpd(1ntpdmdoc)</code> 26292b15cb3dSCy Schubertmust have write permission for the directory the 26302b15cb3dSCy Schubertdrift file is located in, and that file system links, symbolic or 26312b15cb3dSCy Schubertotherwise, should be avoided. 2632052d159aSCy Schubert</p></dd> 2633052d159aSCy Schubert<dt><code>dscp</code> <kbd>value</kbd></dt> 2634052d159aSCy Schubert<dd><p>This option specifies the Differentiated Services Control Point (DSCP) value, 2635e27abb66SXin LIa 6-bit code. 2636e27abb66SXin LIThe default value is 46, signifying Expedited Forwarding. 2637052d159aSCy Schubert</p></dd> 2638052d159aSCy 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> 2639052d159aSCy 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> 2640052d159aSCy Schubert<dd><p>Provides a way to enable or disable various server options. 26412b15cb3dSCy SchubertFlags not mentioned are unaffected. 26422b15cb3dSCy SchubertNote that all of these flags 26432b15cb3dSCy Schubertcan be controlled remotely using the 26442b15cb3dSCy Schubert<code>ntpdc(1ntpdcmdoc)</code> 26452b15cb3dSCy Schubertutility program. 2646052d159aSCy Schubert</p><dl compact="compact"> 2647052d159aSCy Schubert<dt><code>auth</code></dt> 2648052d159aSCy Schubert<dd><p>Enables the server to synchronize with unconfigured peers only if the 26492b15cb3dSCy Schubertpeer has been correctly authenticated using either public key or 26502b15cb3dSCy Schubertprivate key cryptography. 26512b15cb3dSCy SchubertThe default for this flag is 26522b15cb3dSCy Schubert<code>enable</code>. 2653052d159aSCy Schubert</p></dd> 2654052d159aSCy Schubert<dt><code>bclient</code></dt> 2655052d159aSCy Schubert<dd><p>Enables the server to listen for a message from a broadcast or 26562b15cb3dSCy Schubertmulticast server, as in the 26572b15cb3dSCy Schubert<code>multicastclient</code> 26582b15cb3dSCy Schubertcommand with default 26592b15cb3dSCy Schubertaddress. 26602b15cb3dSCy SchubertThe default for this flag is 26612b15cb3dSCy Schubert<code>disable</code>. 2662052d159aSCy Schubert</p></dd> 2663052d159aSCy Schubert<dt><code>calibrate</code></dt> 2664052d159aSCy Schubert<dd><p>Enables the calibrate feature for reference clocks. 26652b15cb3dSCy SchubertThe default for 26662b15cb3dSCy Schubertthis flag is 26672b15cb3dSCy Schubert<code>disable</code>. 2668052d159aSCy Schubert</p></dd> 2669052d159aSCy Schubert<dt><code>kernel</code></dt> 2670052d159aSCy Schubert<dd><p>Enables the kernel time discipline, if available. 26712b15cb3dSCy SchubertThe default for this 26722b15cb3dSCy Schubertflag is 26732b15cb3dSCy Schubert<code>enable</code> 26742b15cb3dSCy Schubertif support is available, otherwise 26752b15cb3dSCy Schubert<code>disable</code>. 2676052d159aSCy Schubert</p></dd> 2677052d159aSCy Schubert<dt><code>mode7</code></dt> 2678052d159aSCy Schubert<dd><p>Enables processing of NTP mode 7 implementation-specific requests 26792b15cb3dSCy Schubertwhich are used by the deprecated 26802b15cb3dSCy Schubert<code>ntpdc(1ntpdcmdoc)</code> 26812b15cb3dSCy Schubertprogram. 26822b15cb3dSCy SchubertThe default for this flag is disable. 26832b15cb3dSCy SchubertThis flag is excluded from runtime configuration using 26842b15cb3dSCy Schubert<code>ntpq(1ntpqmdoc)</code>. 26852b15cb3dSCy SchubertThe 26862b15cb3dSCy Schubert<code>ntpq(1ntpqmdoc)</code> 26872b15cb3dSCy Schubertprogram provides the same capabilities as 26882b15cb3dSCy Schubert<code>ntpdc(1ntpdcmdoc)</code> 26892b15cb3dSCy Schubertusing standard mode 6 requests. 2690052d159aSCy Schubert</p></dd> 2691052d159aSCy Schubert<dt><code>monitor</code></dt> 2692052d159aSCy Schubert<dd><p>Enables the monitoring facility. 26932b15cb3dSCy SchubertSee the 26942b15cb3dSCy Schubert<code>ntpdc(1ntpdcmdoc)</code> 26952b15cb3dSCy Schubertprogram 26962b15cb3dSCy Schubertand the 26972b15cb3dSCy Schubert<code>monlist</code> 26982b15cb3dSCy Schubertcommand or further information. 26992b15cb3dSCy SchubertThe 27002b15cb3dSCy Schubertdefault for this flag is 27012b15cb3dSCy Schubert<code>enable</code>. 2702052d159aSCy Schubert</p></dd> 2703052d159aSCy Schubert<dt><code>ntp</code></dt> 2704052d159aSCy Schubert<dd><p>Enables time and frequency discipline. 27052b15cb3dSCy SchubertIn effect, this switch opens and 27062b15cb3dSCy Schubertcloses the feedback loop, which is useful for testing. 27072b15cb3dSCy SchubertThe default for 27082b15cb3dSCy Schubertthis flag is 27092b15cb3dSCy Schubert<code>enable</code>. 2710052d159aSCy Schubert</p></dd> 2711052d159aSCy Schubert<dt><code>peer_clear_digest_early</code></dt> 2712052d159aSCy Schubert<dd><p>By default, if 2713e27abb66SXin LI<code>ntpd(1ntpdmdoc)</code> 2714e27abb66SXin LIis using autokey and it 2715e27abb66SXin LIreceives a crypto-NAK packet that 2716e27abb66SXin LIpasses the duplicate packet and origin timestamp checks 2717e27abb66SXin LIthe peer variables are immediately cleared. 2718e27abb66SXin LIWhile this is generally a feature 2719e27abb66SXin LIas it allows for quick recovery if a server key has changed, 2720e27abb66SXin LIa properly forged and appropriately delivered crypto-NAK packet 2721e27abb66SXin LIcan be used in a DoS attack. 2722e27abb66SXin LIIf you have active noticable problems with this type of DoS attack 2723e27abb66SXin LIthen you should consider 2724e27abb66SXin LIdisabling this option. 2725e27abb66SXin LIYou can check your 2726e27abb66SXin LI<code>peerstats</code> 2727e27abb66SXin LIfile for evidence of any of these attacks. 2728e27abb66SXin LIThe 2729e27abb66SXin LIdefault for this flag is 2730e27abb66SXin LI<code>enable</code>. 2731052d159aSCy Schubert</p></dd> 2732052d159aSCy Schubert<dt><code>stats</code></dt> 2733052d159aSCy Schubert<dd><p>Enables the statistics facility. 27342b15cb3dSCy SchubertSee the 2735052d159aSCy Schubert‘Monitoring Options’ 27362b15cb3dSCy Schubertsection for further information. 27372b15cb3dSCy SchubertThe default for this flag is 27382b15cb3dSCy Schubert<code>disable</code>. 2739052d159aSCy Schubert</p></dd> 2740052d159aSCy Schubert<dt><code>unpeer_crypto_early</code></dt> 2741052d159aSCy Schubert<dd><p>By default, if 274268ba7e87SXin LI<code>ntpd(1ntpdmdoc)</code> 274368ba7e87SXin LIreceives an autokey packet that fails TEST9, 274468ba7e87SXin LIa crypto failure, 274568ba7e87SXin LIthe association is immediately cleared. 274668ba7e87SXin LIThis is almost certainly a feature, 274768ba7e87SXin LIbut if, in spite of the current recommendation of not using autokey, 274868ba7e87SXin LIyou are 274968ba7e87SXin LI.B still 275068ba7e87SXin LIusing autokey 275168ba7e87SXin LI.B and 275268ba7e87SXin LIyou are seeing this sort of DoS attack 275368ba7e87SXin LIdisabling this flag will delay 275468ba7e87SXin LItearing down the association until the reachability counter 275568ba7e87SXin LIbecomes zero. 275668ba7e87SXin LIYou can check your 275768ba7e87SXin LI<code>peerstats</code> 275868ba7e87SXin LIfile for evidence of any of these attacks. 275968ba7e87SXin LIThe 276068ba7e87SXin LIdefault for this flag is 276168ba7e87SXin LI<code>enable</code>. 2762052d159aSCy Schubert</p></dd> 2763052d159aSCy Schubert<dt><code>unpeer_crypto_nak_early</code></dt> 2764052d159aSCy Schubert<dd><p>By default, if 276568ba7e87SXin LI<code>ntpd(1ntpdmdoc)</code> 276668ba7e87SXin LIreceives a crypto-NAK packet that 276768ba7e87SXin LIpasses the duplicate packet and origin timestamp checks 276868ba7e87SXin LIthe association is immediately cleared. 276968ba7e87SXin LIWhile this is generally a feature 277068ba7e87SXin LIas it allows for quick recovery if a server key has changed, 277168ba7e87SXin LIa properly forged and appropriately delivered crypto-NAK packet 277268ba7e87SXin LIcan be used in a DoS attack. 277368ba7e87SXin LIIf you have active noticable problems with this type of DoS attack 277468ba7e87SXin LIthen you should consider 277568ba7e87SXin LIdisabling this option. 277668ba7e87SXin LIYou can check your 277768ba7e87SXin LI<code>peerstats</code> 277868ba7e87SXin LIfile for evidence of any of these attacks. 277968ba7e87SXin LIThe 278068ba7e87SXin LIdefault for this flag is 278168ba7e87SXin LI<code>enable</code>. 2782052d159aSCy Schubert</p></dd> 2783052d159aSCy Schubert<dt><code>unpeer_digest_early</code></dt> 2784052d159aSCy Schubert<dd><p>By default, if 278568ba7e87SXin LI<code>ntpd(1ntpdmdoc)</code> 278668ba7e87SXin LIreceives what should be an authenticated packet 278768ba7e87SXin LIthat passes other packet sanity checks but 278868ba7e87SXin LIcontains an invalid digest 278968ba7e87SXin LIthe association is immediately cleared. 279068ba7e87SXin LIWhile this is generally a feature 279168ba7e87SXin LIas it allows for quick recovery, 279268ba7e87SXin LIif this type of packet is carefully forged and sent 279368ba7e87SXin LIduring an appropriate window it can be used for a DoS attack. 279468ba7e87SXin LIIf you have active noticable problems with this type of DoS attack 279568ba7e87SXin LIthen you should consider 279668ba7e87SXin LIdisabling this option. 279768ba7e87SXin LIYou can check your 279868ba7e87SXin LI<code>peerstats</code> 279968ba7e87SXin LIfile for evidence of any of these attacks. 280068ba7e87SXin LIThe 280168ba7e87SXin LIdefault for this flag is 280268ba7e87SXin LI<code>enable</code>. 2803052d159aSCy Schubert</p></dd> 28042b15cb3dSCy Schubert</dl> 2805052d159aSCy Schubert</dd> 2806052d159aSCy Schubert<dt><code>includefile</code> <kbd>includefile</kbd></dt> 2807052d159aSCy Schubert<dd><p>This command allows additional configuration commands 28082b15cb3dSCy Schubertto be included from a separate file. 28092b15cb3dSCy SchubertInclude files may 28102b15cb3dSCy Schubertbe nested to a depth of five; upon reaching the end of any 28112b15cb3dSCy Schubertinclude file, command processing resumes in the previous 28122b15cb3dSCy Schubertconfiguration file. 28132b15cb3dSCy SchubertThis option is useful for sites that run 28142b15cb3dSCy Schubert<code>ntpd(1ntpdmdoc)</code> 28152b15cb3dSCy Schuberton multiple hosts, with (mostly) common options (e.g., a 28162b15cb3dSCy Schubertrestriction list). 2817052d159aSCy Schubert</p></dd> 2818052d159aSCy 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> 2819052d159aSCy Schubert<dd><p>The 282009100258SXin LI<code>interface</code> 282109100258SXin LIdirective controls which network addresses 282209100258SXin LI<code>ntpd(1ntpdmdoc)</code> 282309100258SXin LIopens, and whether input is dropped without processing. 282409100258SXin LIThe first parameter determines the action for addresses 282509100258SXin LIwhich match the second parameter. 282609100258SXin LIThe second parameter specifies a class of addresses, 282709100258SXin LIor a specific interface name, 282809100258SXin LIor an address. 282909100258SXin LIIn the address case, 283009100258SXin LI<kbd>prefixlen</kbd> 283109100258SXin LIdetermines how many bits must match for this rule to apply. 283209100258SXin LI<code>ignore</code> 283309100258SXin LIprevents opening matching addresses, 283409100258SXin LI<code>drop</code> 283509100258SXin LIcauses 283609100258SXin LI<code>ntpd(1ntpdmdoc)</code> 283709100258SXin LIto open the address and drop all received packets without examination. 283809100258SXin LIMultiple 283909100258SXin LI<code>interface</code> 284009100258SXin LIdirectives can be used. 284109100258SXin LIThe last rule which matches a particular address determines the action for it. 284209100258SXin LI<code>interface</code> 284309100258SXin LIdirectives are disabled if any 284409100258SXin LI<code>-I</code>, 284509100258SXin LI<code>--interface</code>, 284609100258SXin LI<code>-L</code>, 284709100258SXin LIor 284809100258SXin LI<code>--novirtualips</code> 284909100258SXin LIcommand-line options are specified in the configuration file, 285009100258SXin LIall available network addresses are opened. 285109100258SXin LIThe 285209100258SXin LI<code>nic</code> 285309100258SXin LIdirective is an alias for 285409100258SXin LI<code>interface</code>. 2855052d159aSCy Schubert</p></dd> 2856052d159aSCy Schubert<dt><code>leapfile</code> <kbd>leapfile</kbd></dt> 2857052d159aSCy Schubert<dd><p>This command loads the IERS leapseconds file and initializes the 285809100258SXin LIleapsecond values for the next leapsecond event, leapfile expiration 285909100258SXin LItime, and TAI offset. 286009100258SXin LIThe file can be obtained directly from the IERS at 286109100258SXin LI<code>https://hpiers.obspm.fr/iers/bul/bulc/ntp/leap-seconds.list</code> 286209100258SXin LIor 286309100258SXin LI<code>ftp://hpiers.obspm.fr/iers/bul/bulc/ntp/leap-seconds.list</code>. 286409100258SXin LIThe 286509100258SXin LI<code>leapfile</code> 286609100258SXin LIis scanned when 286709100258SXin LI<code>ntpd(1ntpdmdoc)</code> 286809100258SXin LIprocesses the 286909100258SXin LI<code>leapfile</code> <code>directive</code> <code>or</code> <code>when</code> 287009100258SXin LI<code>ntpd</code> <code>detects</code> <code>that</code> <code>the</code> 287109100258SXin LI<kbd>leapfile</kbd> 287209100258SXin LIhas changed. 287309100258SXin LI<code>ntpd</code> 287409100258SXin LIchecks once a day to see if the 287509100258SXin LI<kbd>leapfile</kbd> 287609100258SXin LIhas changed. 287709100258SXin LIThe 287809100258SXin LI<code>update-leap(1update_leapmdoc)</code> 287909100258SXin LIscript can be run to see if the 288009100258SXin LI<kbd>leapfile</kbd> 288109100258SXin LIshould be updated. 2882052d159aSCy Schubert</p></dd> 2883052d159aSCy Schubert<dt><code>leapsmearinterval</code> <kbd>seconds</kbd></dt> 2884052d159aSCy Schubert<dd><p>This EXPERIMENTAL option is only available if 2885276da39aSCy Schubert<code>ntpd(1ntpdmdoc)</code> 2886276da39aSCy Schubertwas built with the 2887276da39aSCy Schubert<code>--enable-leap-smear</code> 2888276da39aSCy Schubertoption to the 2889276da39aSCy Schubert<code>configure</code> 2890276da39aSCy Schubertscript. 2891276da39aSCy SchubertIt specifies the interval over which a leap second correction will be applied. 2892276da39aSCy SchubertRecommended values for this option are between 2893276da39aSCy Schubert7200 (2 hours) and 86400 (24 hours). 2894276da39aSCy Schubert.Sy DO NOT USE THIS OPTION ON PUBLIC-ACCESS SERVERS! 2895276da39aSCy SchubertSee http://bugs.ntp.org/2855 for more information. 2896052d159aSCy Schubert</p></dd> 2897052d159aSCy Schubert<dt><code>logconfig</code> <kbd>configkeyword</kbd></dt> 2898052d159aSCy Schubert<dd><p>This command controls the amount and type of output written to 28992b15cb3dSCy Schubertthe system 29002b15cb3dSCy Schubert<code>syslog(3)</code> 29012b15cb3dSCy Schubertfacility or the alternate 29022b15cb3dSCy Schubert<code>logfile</code> 29032b15cb3dSCy Schubertlog file. 29042b15cb3dSCy SchubertBy default, all output is turned on. 29052b15cb3dSCy SchubertAll 29062b15cb3dSCy Schubert<kbd>configkeyword</kbd> 29072b15cb3dSCy Schubertkeywords can be prefixed with 2908052d159aSCy Schubert‘=’, 2909052d159aSCy Schubert‘+’ 29102b15cb3dSCy Schubertand 2911052d159aSCy Schubert‘-’, 29122b15cb3dSCy Schubertwhere 2913052d159aSCy Schubert‘=’ 29142b15cb3dSCy Schubertsets the 29152b15cb3dSCy Schubert<code>syslog(3)</code> 29162b15cb3dSCy Schubertpriority mask, 2917052d159aSCy Schubert‘+’ 29182b15cb3dSCy Schubertadds and 2919052d159aSCy Schubert‘-’ 29202b15cb3dSCy Schubertremoves 29212b15cb3dSCy Schubertmessages. 29222b15cb3dSCy Schubert<code>syslog(3)</code> 29232b15cb3dSCy Schubertmessages can be controlled in four 29242b15cb3dSCy Schubertclasses 29252b15cb3dSCy Schubert(<code>clock</code>, <code>peer</code>, <code>sys</code> and <code>sync</code>). 29262b15cb3dSCy SchubertWithin these classes four types of messages can be 29272b15cb3dSCy Schubertcontrolled: informational messages 29282b15cb3dSCy Schubert(<code>info</code>), 29292b15cb3dSCy Schubertevent messages 29302b15cb3dSCy Schubert(<code>events</code>), 29312b15cb3dSCy Schubertstatistics messages 29322b15cb3dSCy Schubert(<code>statistics</code>) 29332b15cb3dSCy Schubertand 29342b15cb3dSCy Schubertstatus messages 29352b15cb3dSCy Schubert(<code>status</code>). 2936052d159aSCy Schubert</p> 29372b15cb3dSCy Schubert<p>Configuration keywords are formed by concatenating the message class with 29382b15cb3dSCy Schubertthe event class. 29392b15cb3dSCy SchubertThe 29402b15cb3dSCy Schubert<code>all</code> 29412b15cb3dSCy Schubertprefix can be used instead of a message class. 29422b15cb3dSCy SchubertA 29432b15cb3dSCy Schubertmessage class may also be followed by the 29442b15cb3dSCy Schubert<code>all</code> 29452b15cb3dSCy Schubertkeyword to enable/disable all 2946e27abb66SXin LImessages of the respective message class. 2947e27abb66SXin LIThus, a minimal log configuration 29482b15cb3dSCy Schubertcould look like this: 2949052d159aSCy Schubert</p><pre class="verbatim">logconfig =syncstatus +sysevents 29502b15cb3dSCy Schubert</pre> 29512b15cb3dSCy Schubert<p>This would just list the synchronizations state of 29522b15cb3dSCy Schubert<code>ntpd(1ntpdmdoc)</code> 29532b15cb3dSCy Schubertand the major system events. 29542b15cb3dSCy SchubertFor a simple reference server, the 29552b15cb3dSCy Schubertfollowing minimum message configuration could be useful: 2956052d159aSCy Schubert</p><pre class="verbatim">logconfig =syncall +clockall 29572b15cb3dSCy Schubert</pre> 29582b15cb3dSCy Schubert<p>This configuration will list all clock information and 29592b15cb3dSCy Schubertsynchronization information. 29602b15cb3dSCy SchubertAll other events and messages about 29612b15cb3dSCy Schubertpeers, system events and so on is suppressed. 2962052d159aSCy Schubert</p></dd> 2963052d159aSCy Schubert<dt><code>logfile</code> <kbd>logfile</kbd></dt> 2964052d159aSCy Schubert<dd><p>This command specifies the location of an alternate log file to 29652b15cb3dSCy Schubertbe used instead of the default system 29662b15cb3dSCy Schubert<code>syslog(3)</code> 29672b15cb3dSCy Schubertfacility. 29684990d495SXin LIThis is the same operation as the 29694990d495SXin LI<code>-l</code> 29704990d495SXin LIcommand line option. 2971052d159aSCy Schubert</p></dd> 2972052d159aSCy 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> 2973052d159aSCy Schubert<dd><p>Controls size limite of the monitoring facility’s Most Recently Used 297409100258SXin LI(MRU) list 297509100258SXin LIof client addresses, which is also used by the 297609100258SXin LIrate control facility. 2977052d159aSCy Schubert</p><dl compact="compact"> 2978052d159aSCy Schubert<dt><code>maxdepth</code> <kbd>count</kbd></dt> 2979052d159aSCy Schubert<dt><code>maxmem</code> <kbd>kilobytes</kbd></dt> 2980052d159aSCy Schubert<dd><p>Equivalent upper limits on the size of the MRU list, in terms of entries or kilobytes. 298109100258SXin LIThe acutal limit will be up to 298209100258SXin LI<code>incalloc</code> 298309100258SXin LIentries or 298409100258SXin LI<code>incmem</code> 298509100258SXin LIkilobytes larger. 298609100258SXin LIAs with all of the 298709100258SXin LI<code>mru</code> 298809100258SXin LIoptions offered in units of entries or kilobytes, if both 298909100258SXin LI<code>maxdepth</code> 299009100258SXin LIand 299109100258SXin 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> 299209100258SXin LIThe default is 1024 kilobytes. 2993052d159aSCy Schubert</p></dd> 2994052d159aSCy Schubert<dt><code>mindepth</code> <kbd>count</kbd></dt> 2995052d159aSCy Schubert<dd><p>Lower limit on the MRU list size. 299609100258SXin LIWhen the MRU list has fewer than 299709100258SXin LI<code>mindepth</code> 299809100258SXin LIentries, existing entries are never removed to make room for newer ones, 299909100258SXin LIregardless of their age. 300009100258SXin LIThe default is 600 entries. 3001052d159aSCy Schubert</p></dd> 3002052d159aSCy Schubert<dt><code>maxage</code> <kbd>seconds</kbd></dt> 3003052d159aSCy Schubert<dd><p>Once the MRU list has 300409100258SXin LI<code>mindepth</code> 300509100258SXin LIentries and an additional client is to ba added to the list, 300609100258SXin LIif the oldest entry was updated more than 300709100258SXin LI<code>maxage</code> 300809100258SXin LIseconds ago, that entry is removed and its storage is reused. 300909100258SXin LIIf the oldest entry was updated more recently the MRU list is grown, 301009100258SXin LIsubject to 301109100258SXin LI<code>maxdepth</code> <code>/</code> <code>moxmem</code>. 301209100258SXin LIThe default is 64 seconds. 3013052d159aSCy Schubert</p></dd> 3014052d159aSCy Schubert<dt><code>initalloc</code> <kbd>count</kbd></dt> 3015052d159aSCy Schubert<dt><code>initmem</code> <kbd>kilobytes</kbd></dt> 3016052d159aSCy Schubert<dd><p>Initial memory allocation at the time the monitoringfacility is first enabled, 301709100258SXin LIin terms of the number of entries or kilobytes. 301809100258SXin LIThe default is 4 kilobytes. 3019052d159aSCy Schubert</p></dd> 3020052d159aSCy Schubert<dt><code>incalloc</code> <kbd>count</kbd></dt> 3021052d159aSCy Schubert<dt><code>incmem</code> <kbd>kilobytes</kbd></dt> 3022052d159aSCy Schubert<dd><p>Size of additional memory allocations when growing the MRU list, in entries or kilobytes. 302309100258SXin LIThe default is 4 kilobytes. 3024052d159aSCy Schubert</p></dd> 302509100258SXin LI</dl> 3026052d159aSCy Schubert</dd> 3027052d159aSCy Schubert<dt><code>nonvolatile</code> <kbd>threshold</kbd></dt> 3028052d159aSCy Schubert<dd><p>Specify the 302909100258SXin LI<kbd>threshold</kbd> 303009100258SXin LIdelta in seconds before an hourly change to the 303109100258SXin LI<code>driftfile</code> 303209100258SXin LI(frequency file) will be written, with a default value of 1e-7 (0.1 PPM). 303309100258SXin LIThe frequency file is inspected each hour. 303409100258SXin LIIf the difference between the current frequency and the last value written 303509100258SXin LIexceeds the threshold, the file is written and the 303609100258SXin LI<code>threshold</code> 303709100258SXin LIbecomes the new threshold value. 303809100258SXin LIIf the threshold is not exceeeded, it is reduced by half. 303909100258SXin LIThis is intended to reduce the number of file writes 304009100258SXin LIfor embedded systems with nonvolatile memory. 3041052d159aSCy Schubert</p></dd> 3042052d159aSCy Schubert<dt><code>phone</code> <kbd>dial</kbd> <kbd>...</kbd></dt> 3043052d159aSCy Schubert<dd><p>This command is used in conjunction with 304409100258SXin LIthe ACTS modem driver (type 18) 304509100258SXin LIor the JJY driver (type 40, mode 100 - 180). 304609100258SXin LIFor the ACTS modem driver (type 18), the arguments consist of 304709100258SXin LIa maximum of 10 telephone numbers used to dial USNO, NIST, or European 304809100258SXin LItime service. 304909100258SXin LIFor the JJY driver (type 40 mode 100 - 180), the argument is 305009100258SXin LIone telephone number used to dial the telephone JJY service. 305109100258SXin LIThe Hayes command ATDT is normally prepended to the number. 305209100258SXin LIThe number can contain other modem control codes as well. 3053052d159aSCy Schubert</p></dd> 3054*a466cc55SCy 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> 30552d4e511cSCy Schubert<dd><p>Enable skewing of our poll requests to our servers. 30562d4e511cSCy Schubert<kbd>poll</kbd> 30572d4e511cSCy Schubertis a number between 3 and 17 inclusive, identifying a specific poll interval. 30582d4e511cSCy SchubertA poll interval is 2^n seconds in duration, 30592d4e511cSCy Schubertso a poll value of 3 corresponds to 8 seconds 30602d4e511cSCy Schubertand 30612d4e511cSCy Schuberta poll interval of 17 corresponds to 30622d4e511cSCy Schubert131,072 seconds, or about a day and a half. 30632d4e511cSCy SchubertThe next two numbers must be between 0 and one-half of the poll interval, 30642d4e511cSCy Schubertinclusive. 3065*a466cc55SCy SchubertAr early 3066*a466cc55SCy Schubertspecifies how early the poll may start, 30672d4e511cSCy Schubertwhile 3068*a466cc55SCy SchubertAr late 3069*a466cc55SCy Schubertspecifies how late the poll may be delayed. 30702d4e511cSCy SchubertWith no arguments, internally specified default values are chosen. 30712d4e511cSCy Schubert</p></dd> 3072052d159aSCy 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> 3073052d159aSCy Schubert<dd><p>Reset one or more groups of counters maintained by 307409100258SXin LI<code>ntpd</code> 307509100258SXin LIand exposed by 307609100258SXin LI<code>ntpq</code> 307709100258SXin LIand 307809100258SXin LI<code>ntpdc</code>. 3079052d159aSCy Schubert</p></dd> 3080052d159aSCy 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> 3081052d159aSCy Schubert<dd><dl compact="compact"> 3082052d159aSCy Schubert<dt><code>memlock</code> <kbd>Nmegabytes</kbd></dt> 3083052d159aSCy Schubert<dd><p>Specify the number of megabytes of memory that should be 308409100258SXin LIallocated and locked. 308509100258SXin LIProbably only available under Linux, this option may be useful 308609100258SXin LIwhen dropping root (the 308709100258SXin LI<code>-i</code> 308809100258SXin LIoption). 308909100258SXin LIThe default is 32 megabytes on non-Linux machines, and -1 under Linux. 3090052d159aSCy Schubert-1 means "do not lock the process into memory". 3091052d159aSCy Schubert0 means "lock whatever memory the process wants into memory". 3092052d159aSCy Schubert</p></dd> 3093052d159aSCy Schubert<dt><code>stacksize</code> <kbd>N4kPages</kbd></dt> 3094052d159aSCy Schubert<dd><p>Specifies the maximum size of the process stack on systems with the 309509100258SXin LI<code>mlockall()</code> 309609100258SXin LIfunction. 309709100258SXin LIDefaults to 50 4k pages (200 4k pages in OpenBSD). 3098052d159aSCy Schubert</p></dd> 3099052d159aSCy Schubert<dt><code>filenum</code> <kbd>Nfiledescriptors</kbd></dt> 3100052d159aSCy Schubert<dd><p>Specifies the maximum number of file descriptors ntpd may have open at once. 310109100258SXin LIDefaults to the system default. 3102052d159aSCy Schubert</p></dd> 310309100258SXin LI</dl> 3104052d159aSCy Schubert</dd> 3105052d159aSCy Schubert<dt><code>saveconfigdir</code> <kbd>directory_path</kbd></dt> 3106052d159aSCy Schubert<dd><p>Specify the directory in which to write configuration snapshots 310709100258SXin LIrequested with 3108052d159aSCy Schubert.Cm ntpq ’s 310909100258SXin LI<code>saveconfig</code> 311009100258SXin LIcommand. 311109100258SXin LIIf 311209100258SXin LI<code>saveconfigdir</code> 311309100258SXin LIdoes not appear in the configuration file, 311409100258SXin LI<code>saveconfig</code> 311509100258SXin LIrequests are rejected by 311609100258SXin LI<code>ntpd</code>. 3117052d159aSCy Schubert</p></dd> 3118052d159aSCy Schubert<dt><code>saveconfig</code> <kbd>filename</kbd></dt> 3119052d159aSCy Schubert<dd><p>Write the current configuration, including any runtime 312009100258SXin LImodifications given with 312109100258SXin LI<code>:config</code> 312209100258SXin LIor 312309100258SXin LI<code>config-from-file</code> 312409100258SXin LIto the 312509100258SXin LI<code>ntpd</code> 3126052d159aSCy Schuberthost’s 312709100258SXin LI<kbd>filename</kbd> 312809100258SXin LIin the 312909100258SXin LI<code>saveconfigdir</code>. 313009100258SXin LIThis command will be rejected unless the 313109100258SXin LI<code>saveconfigdir</code> 313209100258SXin LIdirective appears in 3133052d159aSCy Schubert.Cm ntpd ’s 313409100258SXin LIconfiguration file. 313509100258SXin LI<kbd>filename</kbd> 313609100258SXin LIcan use 313709100258SXin LI<code>strftime(3)</code> 313809100258SXin LIformat directives to substitute the current date and time, 313909100258SXin LIfor example, 314009100258SXin LI<code>saveconfig\ ntp-%Y%m%d-%H%M%S.conf</code>. 314109100258SXin LIThe filename used is stored in the system variable 314209100258SXin LI<code>savedconfig</code>. 314309100258SXin LIAuthentication is required. 3144052d159aSCy Schubert</p></dd> 3145052d159aSCy Schubert<dt><code>setvar</code> <kbd>variable</kbd> <code>[<code>default</code>]</code></dt> 3146052d159aSCy Schubert<dd><p>This command adds an additional system variable. 31472b15cb3dSCy SchubertThese 31482b15cb3dSCy Schubertvariables can be used to distribute additional information such as 31492b15cb3dSCy Schubertthe access policy. 31502b15cb3dSCy SchubertIf the variable of the form 31512b15cb3dSCy Schubert<code>name</code><code>=</code><kbd>value</kbd> 31522b15cb3dSCy Schubertis followed by the 31532b15cb3dSCy Schubert<code>default</code> 31542b15cb3dSCy Schubertkeyword, the 31552b15cb3dSCy Schubertvariable will be listed as part of the default system variables 31562b15cb3dSCy Schubert(<code>rv</code> command)). 31572b15cb3dSCy SchubertThese additional variables serve 31582b15cb3dSCy Schubertinformational purposes only. 31592b15cb3dSCy SchubertThey are not related to the protocol 31602b15cb3dSCy Schubertother that they can be listed. 31612b15cb3dSCy SchubertThe known protocol variables will 31622b15cb3dSCy Schubertalways override any variables defined via the 31632b15cb3dSCy Schubert<code>setvar</code> 31642b15cb3dSCy Schubertmechanism. 31652b15cb3dSCy SchubertThere are three special variables that contain the names 31662b15cb3dSCy Schubertof all variable of the same group. 31672b15cb3dSCy SchubertThe 31682b15cb3dSCy Schubert<code>sys_var_list</code> 31692b15cb3dSCy Schubertholds 31702b15cb3dSCy Schubertthe names of all system variables. 31712b15cb3dSCy SchubertThe 31722b15cb3dSCy Schubert<code>peer_var_list</code> 31732b15cb3dSCy Schubertholds 31742b15cb3dSCy Schubertthe names of all peer variables and the 31752b15cb3dSCy Schubert<code>clock_var_list</code> 31762b15cb3dSCy Schubertholds the names of the reference clock variables. 3177052d159aSCy Schubert</p></dd> 3178052d159aSCy Schubert<dt><code>sysinfo</code></dt> 3179052d159aSCy Schubert<dd><p>Display operational summary. 3180052d159aSCy Schubert</p></dd> 3181052d159aSCy Schubert<dt><code>sysstats</code></dt> 3182052d159aSCy Schubert<dd><p>Show statistics counters maintained in the protocol module. 3183052d159aSCy Schubert</p></dd> 3184052d159aSCy 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> 3185052d159aSCy Schubert<dd><p>This command can be used to alter several system variables in 31862b15cb3dSCy Schubertvery exceptional circumstances. 31872b15cb3dSCy SchubertIt should occur in the 31882b15cb3dSCy Schubertconfiguration file before any other configuration options. 31892b15cb3dSCy SchubertThe 31902b15cb3dSCy Schubertdefault values of these variables have been carefully optimized for 31912b15cb3dSCy Schuberta wide range of network speeds and reliability expectations. 31922b15cb3dSCy SchubertIn 31932b15cb3dSCy Schubertgeneral, they interact in intricate ways that are hard to predict 31942b15cb3dSCy Schubertand some combinations can result in some very nasty behavior. 31952b15cb3dSCy SchubertVery 31962b15cb3dSCy Schubertrarely is it necessary to change the default values; but, some 31972b15cb3dSCy Schubertfolks cannot resist twisting the knobs anyway and this command is 31982b15cb3dSCy Schubertfor them. 31992b15cb3dSCy SchubertEmphasis added: twisters are on their own and can expect 32002b15cb3dSCy Schubertno help from the support group. 3201052d159aSCy Schubert</p> 32022b15cb3dSCy Schubert<p>The variables operate as follows: 3203052d159aSCy Schubert</p><dl compact="compact"> 3204052d159aSCy Schubert<dt><code>allan</code> <kbd>allan</kbd></dt> 3205052d159aSCy Schubert<dd><p>The argument becomes the new value for the minimum Allan 32062b15cb3dSCy Schubertintercept, which is a parameter of the PLL/FLL clock discipline 32072b15cb3dSCy Schubertalgorithm. 32082b15cb3dSCy SchubertThe value in log2 seconds defaults to 7 (1024 s), which is also the lower 32092b15cb3dSCy Schubertlimit. 3210052d159aSCy Schubert</p></dd> 3211052d159aSCy Schubert<dt><code>dispersion</code> <kbd>dispersion</kbd></dt> 3212052d159aSCy Schubert<dd><p>The argument becomes the new value for the dispersion increase rate, 32132b15cb3dSCy Schubertnormally .000015 s/s. 3214052d159aSCy Schubert</p></dd> 3215052d159aSCy Schubert<dt><code>freq</code> <kbd>freq</kbd></dt> 3216052d159aSCy Schubert<dd><p>The argument becomes the initial value of the frequency offset in 32172b15cb3dSCy Schubertparts-per-million. 32182b15cb3dSCy SchubertThis overrides the value in the frequency file, if 32192b15cb3dSCy Schubertpresent, and avoids the initial training state if it is not. 3220052d159aSCy Schubert</p></dd> 3221052d159aSCy Schubert<dt><code>huffpuff</code> <kbd>huffpuff</kbd></dt> 3222052d159aSCy Schubert<dd><p>The argument becomes the new value for the experimental 3223052d159aSCy Schuberthuff-n’-puff filter span, which determines the most recent interval 32242b15cb3dSCy Schubertthe algorithm will search for a minimum delay. 32252b15cb3dSCy SchubertThe lower limit is 32262b15cb3dSCy Schubert900 s (15 m), but a more reasonable value is 7200 (2 hours). 32272b15cb3dSCy SchubertThere 32282b15cb3dSCy Schubertis no default, since the filter is not enabled unless this command 32292b15cb3dSCy Schubertis given. 3230052d159aSCy Schubert</p></dd> 3231052d159aSCy Schubert<dt><code>panic</code> <kbd>panic</kbd></dt> 3232052d159aSCy Schubert<dd><p>The argument is the panic threshold, normally 1000 s. 32332b15cb3dSCy SchubertIf set to zero, 32342b15cb3dSCy Schubertthe panic sanity check is disabled and a clock offset of any value will 32352b15cb3dSCy Schubertbe accepted. 3236052d159aSCy Schubert</p></dd> 3237052d159aSCy Schubert<dt><code>step</code> <kbd>step</kbd></dt> 3238052d159aSCy Schubert<dd><p>The argument is the step threshold, which by default is 0.128 s. 32392b15cb3dSCy SchubertIt can 32402b15cb3dSCy Schubertbe set to any positive number in seconds. 32412b15cb3dSCy SchubertIf set to zero, step 32422b15cb3dSCy Schubertadjustments will never occur. 32432b15cb3dSCy SchubertNote: The kernel time discipline is 32442b15cb3dSCy Schubertdisabled if the step threshold is set to zero or greater than the 32452b15cb3dSCy Schubertdefault. 3246052d159aSCy Schubert</p></dd> 3247052d159aSCy Schubert<dt><code>stepback</code> <kbd>stepback</kbd></dt> 3248052d159aSCy Schubert<dd><p>The argument is the step threshold for the backward direction, 3249a25439b6SCy Schubertwhich by default is 0.128 s. 3250a25439b6SCy SchubertIt can 3251a25439b6SCy Schubertbe set to any positive number in seconds. 3252a25439b6SCy SchubertIf both the forward and backward step thresholds are set to zero, step 3253a25439b6SCy Schubertadjustments will never occur. 3254a25439b6SCy SchubertNote: The kernel time discipline is 3255a25439b6SCy Schubertdisabled if 3256a25439b6SCy Schuberteach direction of step threshold are either 3257a25439b6SCy Schubertset to zero or greater than .5 second. 3258052d159aSCy Schubert</p></dd> 3259052d159aSCy Schubert<dt><code>stepfwd</code> <kbd>stepfwd</kbd></dt> 3260052d159aSCy Schubert<dd><p>As for stepback, but for the forward direction. 3261052d159aSCy Schubert</p></dd> 3262052d159aSCy Schubert<dt><code>stepout</code> <kbd>stepout</kbd></dt> 3263052d159aSCy Schubert<dd><p>The argument is the stepout timeout, which by default is 900 s. 32642b15cb3dSCy SchubertIt can 32652b15cb3dSCy Schubertbe set to any positive number in seconds. 32662b15cb3dSCy SchubertIf set to zero, the stepout 32672b15cb3dSCy Schubertpulses will not be suppressed. 3268052d159aSCy Schubert</p></dd> 32692b15cb3dSCy Schubert</dl> 3270052d159aSCy Schubert</dd> 3271052d159aSCy Schubert<dt><code>writevar</code> <kbd>assocID\ name</kbd> <kbd>=</kbd> <kbd>value</kbd> <kbd>[,...]</kbd></dt> 3272052d159aSCy Schubert<dd><p>Write (create or update) the specified variables. 327309100258SXin LIIf the 327409100258SXin LI<code>assocID</code> 327509100258SXin LIis zero, the variablea re from the 327609100258SXin LIsystem variables 327709100258SXin LIname space, otherwise they are from the 327809100258SXin LIpeer variables 327909100258SXin LIname space. 328009100258SXin LIThe 328109100258SXin LI<code>assocID</code> 328209100258SXin LIis required, as the same name can occur in both name spaces. 3283052d159aSCy Schubert</p></dd> 3284052d159aSCy 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> 3285052d159aSCy Schubert<dd><p>This command configures a trap receiver at the given host 32862b15cb3dSCy Schubertaddress and port number for sending messages with the specified 32872b15cb3dSCy Schubertlocal interface address. 32882b15cb3dSCy SchubertIf the port number is unspecified, a value 32892b15cb3dSCy Schubertof 18447 is used. 32902b15cb3dSCy SchubertIf the interface address is not specified, the 32912b15cb3dSCy Schubertmessage is sent with a source address of the local interface the 32922b15cb3dSCy Schubertmessage is sent through. 32932b15cb3dSCy SchubertNote that on a multihomed host the 32942b15cb3dSCy Schubertinterface used may vary from time to time with routing changes. 3295052d159aSCy Schubert</p></dd> 3296052d159aSCy Schubert<dt><code>ttl</code> <kbd>hop</kbd> <kbd>...</kbd></dt> 3297052d159aSCy Schubert<dd><p>This command specifies a list of TTL values in increasing order. 329809100258SXin LIUp to 8 values can be specified. 329909100258SXin LIIn 330009100258SXin LI<code>manycast</code> 330109100258SXin LImode these values are used in-turn in an expanding-ring search. 330209100258SXin LIThe default is eight multiples of 32 starting at 31. 3303052d159aSCy Schubert</p> 33042b15cb3dSCy Schubert<p>The trap receiver will generally log event messages and other 33052b15cb3dSCy Schubertinformation from the server in a log file. 33062b15cb3dSCy SchubertWhile such monitor 33072b15cb3dSCy Schubertprograms may also request their own trap dynamically, configuring a 33082b15cb3dSCy Schuberttrap receiver will ensure that no messages are lost when the server 33092b15cb3dSCy Schubertis started. 3310052d159aSCy Schubert</p></dd> 3311052d159aSCy Schubert<dt><code>hop</code> <kbd>...</kbd></dt> 3312052d159aSCy Schubert<dd><p>This command specifies a list of TTL values in increasing order, up to 8 33132b15cb3dSCy Schubertvalues can be specified. 33142b15cb3dSCy SchubertIn manycast mode these values are used in turn in 33152b15cb3dSCy Schubertan expanding-ring search. 33162b15cb3dSCy SchubertThe default is eight multiples of 32 starting at 33172b15cb3dSCy Schubert31. 3318052d159aSCy Schubert</p></dd> 33192b15cb3dSCy Schubert</dl> 33202b15cb3dSCy Schubert 33212b15cb3dSCy Schubert<p>This section was generated by <strong>AutoGen</strong>, 33222b15cb3dSCy Schubertusing the <code>agtexi-cmd</code> template and the option descriptions for the <code>ntp.conf</code> program. 33232b15cb3dSCy SchubertThis software is released under the NTP license, <http://ntp.org/license>. 3324052d159aSCy Schubert</p> 3325052d159aSCy Schubert<table class="menu" border="0" cellspacing="0"> 3326*a466cc55SCy Schubert<tr><td align="left" valign="top">• <a href="#ntp_002econf-Files" accesskey="1">ntp.conf Files</a></td><td> </td><td align="left" valign="top">Files 3327052d159aSCy Schubert</td></tr> 3328*a466cc55SCy Schubert<tr><td align="left" valign="top">• <a href="#ntp_002econf-See-Also" accesskey="2">ntp.conf See Also</a></td><td> </td><td align="left" valign="top">See Also 3329052d159aSCy Schubert</td></tr> 3330*a466cc55SCy Schubert<tr><td align="left" valign="top">• <a href="#ntp_002econf-Bugs" accesskey="3">ntp.conf Bugs</a></td><td> </td><td align="left" valign="top">Bugs 3331052d159aSCy Schubert</td></tr> 3332*a466cc55SCy Schubert<tr><td align="left" valign="top">• <a href="#ntp_002econf-Notes" accesskey="4">ntp.conf Notes</a></td><td> </td><td align="left" valign="top">Notes 3333052d159aSCy Schubert</td></tr> 3334052d159aSCy Schubert</table> 33352b15cb3dSCy Schubert 3336052d159aSCy Schubert<hr> 3337*a466cc55SCy Schubert<span id="ntp_002econf-Files"></span><div class="header"> 3338052d159aSCy Schubert<p> 3339052d159aSCy 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> </p> 33402b15cb3dSCy Schubert</div> 3341*a466cc55SCy Schubert<span id="ntp_002econf-Files-1"></span><h4 class="subsection">1.1.8 ntp.conf Files</h4> 3342052d159aSCy Schubert<dl compact="compact"> 3343052d159aSCy Schubert<dt><samp>/etc/ntp.conf</samp></dt> 3344052d159aSCy Schubert<dd><p>the default name of the configuration file 3345052d159aSCy Schubert</p></dd> 3346052d159aSCy Schubert<dt><samp>ntp.keys</samp></dt> 3347052d159aSCy Schubert<dd><p>private MD5 keys 3348052d159aSCy Schubert</p></dd> 3349052d159aSCy Schubert<dt><samp>ntpkey</samp></dt> 3350052d159aSCy Schubert<dd><p>RSA private key 3351052d159aSCy Schubert</p></dd> 3352052d159aSCy Schubert<dt><samp>ntpkey_</samp><kbd>host</kbd></dt> 3353052d159aSCy Schubert<dd><p>RSA public key 3354052d159aSCy Schubert</p></dd> 3355052d159aSCy Schubert<dt><samp>ntp_dh</samp></dt> 3356052d159aSCy Schubert<dd><p>Diffie-Hellman agreement parameters 3357052d159aSCy Schubert</p></dd> 33582b15cb3dSCy Schubert</dl> 3359052d159aSCy Schubert<hr> 3360*a466cc55SCy Schubert<span id="ntp_002econf-See-Also"></span><div class="header"> 3361052d159aSCy Schubert<p> 3362052d159aSCy 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> </p> 33632b15cb3dSCy Schubert</div> 3364*a466cc55SCy Schubert<span id="ntp_002econf-See-Also-1"></span><h4 class="subsection">1.1.9 ntp.conf See Also</h4> 33652b15cb3dSCy Schubert<p><code>ntpd(1ntpdmdoc)</code>, 33662b15cb3dSCy Schubert<code>ntpdc(1ntpdcmdoc)</code>, 33672b15cb3dSCy Schubert<code>ntpq(1ntpqmdoc)</code> 3368052d159aSCy Schubert</p> 33692b15cb3dSCy Schubert<p>In addition to the manual pages provided, 33702b15cb3dSCy Schubertcomprehensive documentation is available on the world wide web 33712b15cb3dSCy Schubertat 33722b15cb3dSCy Schubert<code>http://www.ntp.org/</code>. 33732b15cb3dSCy SchubertA snapshot of this documentation is available in HTML format in 3374052d159aSCy Schubert<samp>/usr/share/doc/ntp</samp>. 33752b15cb3dSCy Schubert<br> 3376052d159aSCy Schubert</p> 3377052d159aSCy Schubert<br> 3378052d159aSCy Schubert<p>David L. Mills, <em>Network Time Protocol (Version 4)</em>, RFC5905 3379052d159aSCy Schubert</p><hr> 3380*a466cc55SCy Schubert<span id="ntp_002econf-Bugs"></span><div class="header"> 3381052d159aSCy Schubert<p> 3382052d159aSCy 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> </p> 33832b15cb3dSCy Schubert</div> 3384*a466cc55SCy Schubert<span id="ntp_002econf-Bugs-1"></span><h4 class="subsection">1.1.10 ntp.conf Bugs</h4> 33852b15cb3dSCy Schubert<p>The syntax checking is not picky; some combinations of 33862b15cb3dSCy Schubertridiculous and even hilarious options and modes may not be 33872b15cb3dSCy Schubertdetected. 3388052d159aSCy Schubert</p> 33892b15cb3dSCy Schubert<p>The 3390052d159aSCy Schubert<samp>ntpkey_</samp><kbd>host</kbd> 33912b15cb3dSCy Schubertfiles are really digital 33922b15cb3dSCy Schubertcertificates. 33932b15cb3dSCy SchubertThese should be obtained via secure directory 33942b15cb3dSCy Schubertservices when they become universally available. 3395052d159aSCy Schubert</p><hr> 3396052d159aSCy Schubert<div class="header"> 3397052d159aSCy Schubert<p> 3398052d159aSCy Schubert </p> 33992b15cb3dSCy Schubert</div> 3400*a466cc55SCy Schubert<span id="ntp_002econf-Notes-1"></span><h4 class="subsection">1.1.11 ntp.conf Notes</h4> 34012b15cb3dSCy Schubert<p>This document was derived from FreeBSD. 3402052d159aSCy Schubert</p><hr> 34032b15cb3dSCy Schubert 34042b15cb3dSCy Schubert 3405052d159aSCy Schubert 3406052d159aSCy Schubert</body> 3407052d159aSCy Schubert</html> 3408