summaryrefslogtreecommitdiffstats
path: root/usr.sbin/ntp/doc
diff options
context:
space:
mode:
Diffstat (limited to 'usr.sbin/ntp/doc')
-rw-r--r--usr.sbin/ntp/doc/ntp-keygen.8988
-rw-r--r--usr.sbin/ntp/doc/ntp.conf.5342
-rw-r--r--usr.sbin/ntp/doc/ntp.keys.516
-rw-r--r--usr.sbin/ntp/doc/ntpd.84
-rw-r--r--usr.sbin/ntp/doc/ntpdc.84
-rw-r--r--usr.sbin/ntp/doc/ntpq.8731
-rw-r--r--usr.sbin/ntp/doc/sntp.89
7 files changed, 1299 insertions, 795 deletions
diff --git a/usr.sbin/ntp/doc/ntp-keygen.8 b/usr.sbin/ntp/doc/ntp-keygen.8
index a5c62f7..e4b7eaf 100644
--- a/usr.sbin/ntp/doc/ntp-keygen.8
+++ b/usr.sbin/ntp/doc/ntp-keygen.8
@@ -1,11 +1,11 @@
-.Dd March 21 2017
+.Dd February 27 2018
.Dt NTP_KEYGEN 8 User Commands
.Os
.\" EDIT THIS FILE WITH CAUTION (ntp-keygen-opts.mdoc)
.\"
.\" $FreeBSD$
.\"
-.\" It has been AutoGen-ed March 21, 2017 at 10:45:59 AM by AutoGen 5.18.5
+.\" It has been AutoGen-ed February 27, 2018 at 05:16:00 PM by AutoGen 5.18.5
.\" From the definitions ntp-keygen-opts.def
.\" and the template file agmdoc-cmd.tpl
.Sh NAME
@@ -23,26 +23,29 @@ All arguments must be options.
.Sh DESCRIPTION
This program generates cryptographic data files used by the NTPv4
authentication and identification schemes.
-It generates MD5 key files used in symmetric key cryptography.
-In addition, if the OpenSSL software library has been installed,
-it generates keys, certificate and identity files used in public key
-cryptography.
+It can generate message digest keys used in symmetric key cryptography and,
+if the OpenSSL software library has been installed, it can generate host keys,
+signing keys, certificates, and identity keys and parameters used in Autokey
+public key cryptography.
These files are used for cookie encryption,
-digital signature and challenge/response identification algorithms
+digital signature, and challenge/response identification algorithms
compatible with the Internet standard security infrastructure.
.Pp
-All files are in PEM\-encoded printable ASCII format,
-so they can be embedded as MIME attachments in mail to other sites
+The message digest symmetric keys file is generated in a format
+compatible with NTPv3.
+All other files are in PEM\-encoded printable ASCII format,
+so they can be embedded as MIME attachments in email to other sites
and certificate authorities.
By default, files are not encrypted.
.Pp
-When used to generate message digest keys, the program produces a file
-containing ten pseudo\-random printable ASCII strings suitable for the
-MD5 message digest algorithm included in the distribution.
+When used to generate message digest symmetric keys, the program
+produces a file containing ten pseudo\-random printable ASCII strings
+suitable for the MD5 message digest algorithm included in the
+distribution.
If the OpenSSL library is installed, it produces an additional ten
-hex\-encoded random bit strings suitable for the SHA1 and other message
-digest algorithms.
-The message digest keys file must be distributed and stored
+hex\-encoded random bit strings suitable for SHA1, AES\-128\-CMAC, and
+other message digest algorithms.
+The message digest symmetric keys file must be distributed and stored
using secure means beyond the scope of NTP itself.
Besides the keys used for ordinary NTP associations, additional keys
can be defined as passwords for the
@@ -62,219 +65,131 @@ other than Autokey.
Some files used by this program are encrypted using a private password.
The
.Fl p
-option specifies the password for local encrypted files and the
+option specifies the read password for local encrypted files and the
.Fl q
-option the password for encrypted files sent to remote sites.
+option the write password for encrypted files sent to remote sites.
If no password is specified, the host name returned by the Unix
-.Fn gethostname
-function, normally the DNS name of the host is used.
+.Xr hostname 1
+command, normally the DNS name of the host, is used as the the default read
+password, for convenience.
+The
+.Nm
+program prompts for the password if it reads an encrypted file
+and the password is missing or incorrect.
+If an encrypted file is read successfully and
+no write password is specified, the read password is used
+as the write password by default.
.Pp
The
-.Ar pw
+.Cm pw
option of the
-.Ar crypto
+.Ic crypto
+.Xr ntpd 8
configuration command specifies the read
password for previously encrypted local files.
-This must match the local password used by this program.
+This must match the local read password used by this program.
If not specified, the host name is used.
-Thus, if files are generated by this program without password,
+Thus, if files are generated by this program without an explicit password,
they can be read back by
-.Ar ntpd
-without password but only on the same host.
+.Xr ntpd 8
+without specifying an explicit password but only on the same host.
+If the write password used for encryption is specified as the host name,
+these files can be read by that host with no explicit password.
.Pp
Normally, encrypted files for each host are generated by that host and
used only by that host, although exceptions exist as noted later on
this page.
The symmetric keys file, normally called
-.Ar ntp.keys ,
+.Pa ntp.keys ,
is usually installed in
.Pa /etc .
Other files and links are usually installed in
.Pa /usr/local/etc ,
which is normally in a shared filesystem in
NFS\-mounted networks and cannot be changed by shared clients.
-The location of the keys directory can be changed by the
-.Ar keysdir
-configuration command in such cases.
-Normally, this is in
-.Pa /etc .
+In these cases, NFS clients can specify the files in another
+directory such as
+.Pa /etc
+using the
+.Ic keysdir
+.Xr ntpd 8
+configuration file command.
.Pp
This program directs commentary and error messages to the standard
error stream
-.Ar stderr
+.Pa stderr
and remote files to the standard output stream
-.Ar stdout
+.Pa stdout
where they can be piped to other applications or redirected to files.
The names used for generated files and links all begin with the
string
-.Ar ntpkey
+.Pa ntpkey\&*
and include the file type, generating host and filestamp,
as described in the
-.Dq Cryptographic Data Files
+.Sx "Cryptographic Data Files"
section below.
.Ss Running the Program
-To test and gain experience with Autokey concepts, log in as root and
-change to the keys directory, usually
-.Pa /usr/local/etc
-When run for the first time, or if all files with names beginning with
-.Ar ntpkey
-have been removed, use the
-.Nm
-command without arguments to generate a
-default RSA host key and matching RSA\-MD5 certificate with expiration
-date one year hence.
-If run again without options, the program uses the
-existing keys and parameters and generates only a new certificate with
-new expiration date one year hence.
-.Pp
-Run the command on as many hosts as necessary.
-Designate one of them as the trusted host (TH) using
-.Nm
-with the
-.Fl T
-option and configure it to synchronize from reliable Internet servers.
-Then configure the other hosts to synchronize to the TH directly or
-indirectly.
-A certificate trail is created when Autokey asks the immediately
-ascendant host towards the TH to sign its certificate, which is then
-provided to the immediately descendant host on request.
-All group hosts should have acyclic certificate trails ending on the TH.
-.Pp
-The host key is used to encrypt the cookie when required and so must be
-RSA type.
-By default, the host key is also the sign key used to encrypt
-signatures.
-A different sign key can be assigned using the
-.Fl S
-option and this can be either RSA or DSA type.
-By default, the signature
-message digest type is MD5, but any combination of sign key type and
-message digest type supported by the OpenSSL library can be specified
-using the
-.Fl c
-option.
-The rules say cryptographic media should be generated with proventic
-filestamps, which means the host should already be synchronized before
-this program is run.
-This of course creates a chicken\-and\-egg problem
-when the host is started for the first time.
-Accordingly, the host time
-should be set by some other means, such as eyeball\-and\-wristwatch, at
-least so that the certificate lifetime is within the current year.
-After that and when the host is synchronized to a proventic source, the
-certificate should be re\-generated.
-.Pp
-Additional information on trusted groups and identity schemes is on the
-.Dq Autokey Public\-Key Authentication
-page.
-.Pp
-The
-.Xr ntpd 8
-configuration command
-.Ic crypto pw Ar password
-specifies the read password for previously encrypted files.
-The daemon expires on the spot if the password is missing
-or incorrect.
-For convenience, if a file has been previously encrypted,
-the default read password is the name of the host running
-the program.
-If the previous write password is specified as the host name,
-these files can be read by that host with no explicit password.
-.Pp
-File names begin with the prefix
-.Cm ntpkey_
-and end with the postfix
-.Ar _hostname.filestamp ,
-where
-.Ar hostname
-is the owner name, usually the string returned
-by the Unix gethostname() routine, and
-.Ar filestamp
-is the NTP seconds when the file was generated, in decimal digits.
-This both guarantees uniqueness and simplifies maintenance
-procedures, since all files can be quickly removed
-by a
-.Ic rm ntpkey\&*
-command or all files generated
-at a specific time can be removed by a
-.Ic rm
-.Ar \&*filestamp
-command.
-To further reduce the risk of misconfiguration,
-the first two lines of a file contain the file name
-and generation date and time as comments.
-.Pp
-All files are installed by default in the keys directory
-.Pa /usr/local/etc ,
-which is normally in a shared filesystem
-in NFS\-mounted networks.
-The actual location of the keys directory
-and each file can be overridden by configuration commands,
-but this is not recommended.
-Normally, the files for each host are generated by that host
-and used only by that host, although exceptions exist
-as noted later on this page.
-.Pp
-Normally, files containing private values,
-including the host key, sign key and identification parameters,
-are permitted root read/write\-only;
-while others containing public values are permitted world readable.
-Alternatively, files containing private values can be encrypted
-and these files permitted world readable,
-which simplifies maintenance in shared file systems.
-Since uniqueness is insured by the hostname and
-file name extensions, the files for a NFS server and
-dependent clients can all be installed in the same shared directory.
-.Pp
-The recommended practice is to keep the file name extensions
-when installing a file and to install a soft link
-from the generic names specified elsewhere on this page
-to the generated files.
-This allows new file generations to be activated simply
-by changing the link.
-If a link is present, ntpd follows it to the file name
-to extract the filestamp.
-If a link is not present,
-.Xr ntpd 8
-extracts the filestamp from the file itself.
-This allows clients to verify that the file and generation times
-are always current.
-The
-.Nm
-program uses the same timestamp extension for all files generated
-at one time, so each generation is distinct and can be readily
-recognized in monitoring data.
-.Ss Running the program
The safest way to run the
.Nm
program is logged in directly as root.
-The recommended procedure is change to the keys directory,
-usually
+The recommended procedure is change to the
+.Ar keys
+directory, usually
.Pa /usr/local/etc ,
then run the program.
-When run for the first time,
-or if all
-.Cm ntpkey
-files have been removed,
-the program generates a RSA host key file and matching RSA\-MD5 certificate file,
+.Pp
+To test and gain experience with Autokey concepts, log in as root and
+change to the
+.Ar keys
+directory, usually
+.Pa /usr/local/etc .
+When run for the first time, or if all files with names beginning with
+.Pa ntpkey\&*
+have been removed, use the
+.Nm
+command without arguments to generate a default
+.Cm RSA
+host key and matching
+.Cm RSA\-MD5
+certificate file with expiration date one year hence,
which is all that is necessary in many cases.
The program also generates soft links from the generic names
to the respective files.
-If run again, the program uses the same host key file,
-but generates a new certificate file and link.
+If run again without options, the program uses the
+existing keys and parameters and generates a new certificate file with
+new expiration date one year hence, and soft link.
.Pp
-The host key is used to encrypt the cookie when required and so must be RSA type.
+The host key is used to encrypt the cookie when required and so must be
+.Cm RSA
+type.
By default, the host key is also the sign key used to encrypt signatures.
When necessary, a different sign key can be specified and this can be
-either RSA or DSA type.
-By default, the message digest type is MD5, but any combination
+either
+.Cm RSA
+or
+.Cm DSA
+type.
+By default, the message digest type is
+.Cm MD5 ,
+but any combination
of sign key type and message digest type supported by the OpenSSL library
-can be specified, including those using the MD2, MD5, SHA, SHA1, MDC2
-and RIPE160 message digest algorithms.
+can be specified, including those using the
+.Cm AES128CMAC , MD2 , MD5 , MDC2 , SHA , SHA1
+and
+.Cm RIPE160
+message digest algorithms.
However, the scheme specified in the certificate must be compatible
with the sign key.
-Certificates using any digest algorithm are compatible with RSA sign keys;
-however, only SHA and SHA1 certificates are compatible with DSA sign keys.
+Certificates using any digest algorithm are compatible with
+.Cm RSA
+sign keys;
+however, only
+.Cm SHA
+and
+.Cm SHA1
+certificates are compatible with
+.Cm DSA
+sign keys.
.Pp
Private/public key files and certificates are compatible with
other OpenSSL applications and very likely other libraries as well.
@@ -285,19 +200,19 @@ However, the identification parameter files, although encoded
as the other files, are probably not compatible with anything other than Autokey.
.Pp
Running the program as other than root and using the Unix
-.Ic su
+.Xr su 1
command
to assume root may not work properly, since by default the OpenSSL library
looks for the random seed file
-.Cm .rnd
+.Pa .rnd
in the user home directory.
However, there should be only one
-.Cm .rnd ,
+.Pa .rnd ,
most conveniently
in the root directory, so it is convenient to define the
-.Cm $RANDFILE
+.Ev RANDFILE
environment variable used by the OpenSSL library as the path to
-.Cm /.rnd .
+.Pa .rnd .
.Pp
Installing the keys as root might not work in NFS\-mounted
shared file systems, as NFS clients may not be able to write
@@ -307,7 +222,8 @@ directory such as
.Pa /etc
using the
.Ic keysdir
-command.
+.Xr ntpd 8
+configuration file command.
There is no need for one client to read the keys and certificates
of other clients or servers, as these data are obtained automatically
by the Autokey protocol.
@@ -340,8 +256,11 @@ while others containing public values are permitted world readable.
Alternatively, files containing private values can be encrypted
and these files permitted world readable,
which simplifies maintenance in shared file systems.
-Since uniqueness is insured by the hostname and
-file name extensions, the files for a NFS server and
+Since uniqueness is insured by the
+.Ar hostname
+and
+.Ar filestamp
+file name extensions, the files for an NTP server and
dependent clients can all be installed in the same shared directory.
.Pp
The recommended practice is to keep the file name extensions
@@ -350,106 +269,111 @@ from the generic names specified elsewhere on this page
to the generated files.
This allows new file generations to be activated simply
by changing the link.
-If a link is present, ntpd follows it to the file name
-to extract the filestamp.
+If a link is present,
+.Xr ntpd 8
+follows it to the file name to extract the
+.Ar filestamp .
If a link is not present,
.Xr ntpd 8
-extracts the filestamp from the file itself.
+extracts the
+.Ar filestamp
+from the file itself.
This allows clients to verify that the file and generation times
are always current.
The
.Nm
-program uses the same timestamp extension for all files generated
+program uses the same
+.Ar filestamp
+extension for all files generated
at one time, so each generation is distinct and can be readily
recognized in monitoring data.
-.Ss Running the program
-The safest way to run the
+.Pp
+Run the command on as many hosts as necessary.
+Designate one of them as the trusted host (TH) using
.Nm
-program is logged in directly as root.
-The recommended procedure is change to the keys directory,
-usually
-.Pa /usr/local/etc ,
-then run the program.
-When run for the first time,
-or if all
-.Cm ntpkey
-files have been removed,
-the program generates a RSA host key file and matching RSA\-MD5 certificate file,
-which is all that is necessary in many cases.
-The program also generates soft links from the generic names
-to the respective files.
-If run again, the program uses the same host key file,
-but generates a new certificate file and link.
+with the
+.Fl T
+option and configure it to synchronize from reliable Internet servers.
+Then configure the other hosts to synchronize to the TH directly or
+indirectly.
+A certificate trail is created when Autokey asks the immediately
+ascendant host towards the TH to sign its certificate, which is then
+provided to the immediately descendant host on request.
+All group hosts should have acyclic certificate trails ending on the TH.
.Pp
-The host key is used to encrypt the cookie when required and so must be RSA type.
-By default, the host key is also the sign key used to encrypt signatures.
-When necessary, a different sign key can be specified and this can be
-either RSA or DSA type.
-By default, the message digest type is MD5, but any combination
-of sign key type and message digest type supported by the OpenSSL library
-can be specified, including those using the MD2, MD5, SHA, SHA1, MDC2
-and RIPE160 message digest algorithms.
-However, the scheme specified in the certificate must be compatible
-with the sign key.
-Certificates using any digest algorithm are compatible with RSA sign keys;
-however, only SHA and SHA1 certificates are compatible with DSA sign keys.
+The host key is used to encrypt the cookie when required and so must be
+RSA type.
+By default, the host key is also the sign key used to encrypt
+signatures.
+A different sign key can be assigned using the
+.Fl S
+option and this can be either
+.Cm RSA
+or
+.Cm DSA
+type.
+By default, the signature
+message digest type is
+.Cm MD5 ,
+but any combination of sign key type and
+message digest type supported by the OpenSSL library can be specified
+using the
+.Fl c
+option.
.Pp
-Private/public key files and certificates are compatible with
-other OpenSSL applications and very likely other libraries as well.
-Certificates or certificate requests derived from them should be compatible
-with extant industry practice, although some users might find
-the interpretation of X509v3 extension fields somewhat liberal.
-However, the identification parameter files, although encoded
-as the other files, are probably not compatible with anything other than Autokey.
+The rules say cryptographic media should be generated with proventic
+filestamps, which means the host should already be synchronized before
+this program is run.
+This of course creates a chicken\-and\-egg problem
+when the host is started for the first time.
+Accordingly, the host time
+should be set by some other means, such as eyeball\-and\-wristwatch, at
+least so that the certificate lifetime is within the current year.
+After that and when the host is synchronized to a proventic source, the
+certificate should be re\-generated.
.Pp
-Running the program as other than root and using the Unix
-.Ic su
-command
-to assume root may not work properly, since by default the OpenSSL library
-looks for the random seed file
-.Cm .rnd
-in the user home directory.
-However, there should be only one
-.Cm .rnd ,
-most conveniently
-in the root directory, so it is convenient to define the
-.Cm $RANDFILE
-environment variable used by the OpenSSL library as the path to
-.Cm /.rnd .
+Additional information on trusted groups and identity schemes is on the
+.Dq Autokey Public\-Key Authentication
+page.
.Pp
-Installing the keys as root might not work in NFS\-mounted
-shared file systems, as NFS clients may not be able to write
-to the shared keys directory, even as root.
-In this case, NFS clients can specify the files in another
-directory such as
-.Pa /etc
-using the
-.Ic keysdir
+File names begin with the prefix
+.Pa ntpkey Ns _
+and end with the suffix
+.Pa _ Ns Ar hostname . Ar filestamp ,
+where
+.Ar hostname
+is the owner name, usually the string returned
+by the Unix
+.Xr hostname 1
+command, and
+.Ar filestamp
+is the NTP seconds when the file was generated, in decimal digits.
+This both guarantees uniqueness and simplifies maintenance
+procedures, since all files can be quickly removed
+by a
+.Ic rm Pa ntpkey\&*
+command or all files generated
+at a specific time can be removed by a
+.Ic rm Pa \&* Ns Ar filestamp
command.
-There is no need for one client to read the keys and certificates
-of other clients or servers, as these data are obtained automatically
-by the Autokey protocol.
-.Pp
-Ordinarily, cryptographic files are generated by the host that uses them,
-but it is possible for a trusted agent (TA) to generate these files
-for other hosts; however, in such cases files should always be encrypted.
-The subject name and trusted name default to the hostname
-of the host generating the files, but can be changed by command line options.
-It is convenient to designate the owner name and trusted name
-as the subject and issuer fields, respectively, of the certificate.
-The owner name is also used for the host and sign key files,
-while the trusted name is used for the identity files.
-seconds.
-seconds.
-s Trusted Hosts and Groups
+To further reduce the risk of misconfiguration,
+the first two lines of a file contain the file name
+and generation date and time as comments.
+.Ss Trusted Hosts and Groups
Each cryptographic configuration involves selection of a signature scheme
and identification scheme, called a cryptotype,
as explained in the
.Sx Authentication Options
section of
.Xr ntp.conf 5 .
-The default cryptotype uses RSA encryption, MD5 message digest
-and TC identification.
+The default cryptotype uses
+.Cm RSA
+encryption,
+.Cm MD5
+message digest
+and
+.Cm TC
+identification.
First, configure a NTP subnet including one or more low\-stratum
trusted hosts from which all other hosts derive synchronization
directly or indirectly.
@@ -467,7 +391,7 @@ section of
.Pp
On each trusted host as root, change to the keys directory.
To insure a fresh fileset, remove all
-.Cm ntpkey
+.Pa ntpkey
files.
Then run
.Nm
@@ -492,7 +416,9 @@ is either
.Cm RSA
or
.Cm DSA .
-The most often need to do this is when a DSA\-signed certificate is used.
+The most frequent need to do this is when a
+.Cm DSA Ns \-signed
+certificate is used.
If it is necessary to use a different certificate scheme than the default,
run
.Nm
@@ -501,17 +427,17 @@ with the
option and selected
.Ar scheme
as needed.
-f
+If
.Nm
is run again without these options, it generates a new certificate
-using the same scheme and sign key.
+using the same scheme and sign key, and soft link.
.Pp
After setting up the environment it is advisable to update certificates
from time to time, if only to extend the validity interval.
Simply run
.Nm
with the same flags as before to generate new certificates
-using existing keys.
+using existing keys, and soft links.
However, if the host or sign key is changed,
.Xr ntpd 8
should be restarted.
@@ -522,13 +448,15 @@ Other dependent hosts will continue as usual until signatures are refreshed,
at which time the protocol is restarted.
.Ss Identity Schemes
As mentioned on the Autonomous Authentication page,
-the default TC identity scheme is vulnerable to a middleman attack.
+the default
+.Cm TC
+identity scheme is vulnerable to a middleman attack.
However, there are more secure identity schemes available,
-including PC, IFF, GQ and MV described on the
-.Qq Identification Schemes
-page
-(maybe available at
-.Li http://www.eecis.udel.edu/%7emills/keygen.html ) .
+including
+.Cm PC , IFF , GQ
+and
+.Cm MV
+schemes described below.
These schemes are based on a TA, one or more trusted hosts
and some number of nontrusted hosts.
Trusted hosts prove identity using values provided by the TA,
@@ -553,12 +481,15 @@ On trusted host alice run
.Fl P
.Fl p Ar password
to generate the host key file
-.Pa ntpkey_RSAkey_ Ns Ar alice.filestamp
+.Pa ntpkey Ns _ Cm RSA Pa key_alice. Ar filestamp
and trusted private certificate file
-.Pa ntpkey_RSA\-MD5_cert_ Ns Ar alice.filestamp .
+.Pa ntpkey Ns _ Cm RSA\-MD5 _ Pa cert_alice. Ar filestamp ,
+and soft links.
Copy both files to all group hosts;
they replace the files which would be generated in other schemes.
-On each host bob install a soft link from the generic name
+On each host
+.Ar bob
+install a soft link from the generic name
.Pa ntpkey_host_ Ns Ar bob
to the host key file and soft link
.Pa ntpkey_cert_ Ns Ar bob
@@ -567,26 +498,34 @@ Note the generic links are on bob, but point to files generated
by trusted host alice.
In this scheme it is not possible to refresh
either the keys or certificates without copying them
-to all other hosts in the group.
+to all other hosts in the group, and recreating the soft links.
.Pp
-For the IFF scheme proceed as in the TC scheme to generate keys
+For the
+.Cm IFF
+scheme proceed as in the
+.Cm TC
+scheme to generate keys
and certificates for all group hosts, then for every trusted host in the group,
-generate the IFF parameter file.
+generate the
+.Cm IFF
+parameter file.
On trusted host alice run
.Nm
.Fl T
.Fl I
.Fl p Ar password
to produce her parameter file
-.Pa ntpkey_IFFpar_ Ns Ar alice.filestamp ,
+.Pa ntpkey_IFFpar_alice. Ns Ar filestamp ,
which includes both server and client keys.
Copy this file to all group hosts that operate as both servers
and clients and install a soft link from the generic
-.Pa ntpkey_iff_ Ns Ar alice
+.Pa ntpkey_iff_alice
to this file.
If there are no hosts restricted to operate only as clients,
there is nothing further to do.
-As the IFF scheme is independent
+As the
+.Cm IFF
+scheme is independent
of keys and certificates, these files can be refreshed as needed.
.Pp
If a rogue client has the parameter file, it could masquerade
@@ -596,37 +535,53 @@ from the parameter file and distributed to all restricted clients.
After generating the parameter file, on alice run
.Nm
.Fl e
-and pipe the output to a file or mail program.
-Copy or mail this file to all restricted clients.
+and pipe the output to a file or email program.
+Copy or email this file to all restricted clients.
On these clients install a soft link from the generic
-.Pa ntpkey_iff_ Ns Ar alice
+.Pa ntpkey_iff_alice
to this file.
To further protect the integrity of the keys,
each file can be encrypted with a secret password.
.Pp
-For the GQ scheme proceed as in the TC scheme to generate keys
+For the
+.Cm GQ
+scheme proceed as in the
+.Cm TC
+scheme to generate keys
and certificates for all group hosts, then for every trusted host
-in the group, generate the IFF parameter file.
+in the group, generate the
+.Cm IFF
+parameter file.
On trusted host alice run
.Nm
.Fl T
.Fl G
.Fl p Ar password
to produce her parameter file
-.Pa ntpkey_GQpar_ Ns Ar alice.filestamp ,
+.Pa ntpkey_GQpar_alice. Ns Ar filestamp ,
which includes both server and client keys.
Copy this file to all group hosts and install a soft link
from the generic
-.Pa ntpkey_gq_ Ns Ar alice
+.Pa ntpkey_gq_alice
to this file.
-In addition, on each host bob install a soft link
+In addition, on each host
+.Ar bob
+install a soft link
from generic
.Pa ntpkey_gq_ Ns Ar bob
to this file.
-As the GQ scheme updates the GQ parameters file and certificate
+As the
+.Cm GQ
+scheme updates the
+.Cm GQ
+parameters file and certificate
at the same time, keys and certificates can be regenerated as needed.
.Pp
-For the MV scheme, proceed as in the TC scheme to generate keys
+For the
+.Cm MV
+scheme, proceed as in the
+.Cm TC
+scheme to generate keys
and certificates for all group hosts.
For illustration assume trish is the TA, alice one of several trusted hosts
and bob one of her clients.
@@ -638,9 +593,9 @@ where
.Ar n
is the number of revokable keys (typically 5) to produce
the parameter file
-.Pa ntpkeys_MVpar_ Ns Ar trish.filestamp
+.Pa ntpkeys_MVpar_trish. Ns Ar filestamp
and client key files
-.Pa ntpkeys_MVkeyd_ Ns Ar trish.filestamp
+.Pa ntpkeys_MVkey Ns Ar d _ Pa trish. Ar filestamp
where
.Ar d
is the key number (0 \&<
@@ -649,80 +604,217 @@ is the key number (0 \&<
.Ar n ) .
Copy the parameter file to alice and install a soft link
from the generic
-.Pa ntpkey_mv_ Ns Ar alice
+.Pa ntpkey_mv_alice
to this file.
Copy one of the client key files to alice for later distribution
to her clients.
-It doesn't matter which client key file goes to alice,
+It does not matter which client key file goes to alice,
since they all work the same way.
-Alice copies the client key file to all of her cliens.
+Alice copies the client key file to all of her clients.
On client bob install a soft link from generic
-.Pa ntpkey_mvkey_ Ns Ar bob
+.Pa ntpkey_mvkey_bob
to the client key file.
-As the MV scheme is independent of keys and certificates,
+As the
+.Cm MV
+scheme is independent of keys and certificates,
these files can be refreshed as needed.
.Ss Command Line Options
.Bl -tag -width indent
-.It Fl c Ar scheme
-Select certificate message digest/signature encryption scheme.
+.It Fl b Fl \-imbits Ns = Ar modulus
+Set the number of bits in the identity modulus for generating identity keys to
+.Ar modulus
+bits.
+The number of bits in the identity modulus defaults to 256, but can be set to
+values from 256 to 2048 (32 to 256 octets).
+Use the larger moduli with caution, as this can consume considerable computing
+resources and increases the size of authenticated packets.
+.It Fl c Fl \-certificate Ns = Ar scheme
+Select certificate signature encryption/message digest scheme.
The
.Ar scheme
can be one of the following:
-. Cm RSA\-MD2 , RSA\-MD5 , RSA\-SHA , RSA\-SHA1 , RSA\-MDC2 , RSA\-RIPEMD160 , DSA\-SHA ,
+.Cm RSA\-MD2 , RSA\-MD5 , RSA\-MDC2 , RSA\-SHA , RSA\-SHA1 , RSA\-RIPEMD160 , DSA\-SHA ,
or
.Cm DSA\-SHA1 .
-Note that RSA schemes must be used with a RSA sign key and DSA
-schemes must be used with a DSA sign key.
+Note that
+.Cm RSA
+schemes must be used with an
+.Cm RSA
+sign key and
+.Cm DSA
+schemes must be used with a
+.Cm DSA
+sign key.
The default without this option is
.Cm RSA\-MD5 .
-.It Fl d
-Enable debugging.
+If compatibility with FIPS 140\-2 is required, either the
+.Cm DSA\-SHA
+or
+.Cm DSA\-SHA1
+scheme must be used.
+.It Fl C Fl \-cipher Ns = Ar cipher
+Select the OpenSSL cipher to encrypt the files containing private keys.
+The default without this option is three\-key triple DES in CBC mode,
+.Cm des\-ede3\-cbc .
+The
+.Ic openssl Fl h
+command provided with OpenSSL displays available ciphers.
+.It Fl d Fl \-debug\-level
+Increase debugging verbosity level.
This option displays the cryptographic data produced in eye\-friendly billboards.
-.It Fl e
-Write the IFF client keys to the standard output.
-This is intended for automatic key distribution by mail.
-.It Fl G
-Generate parameters and keys for the GQ identification scheme,
-obsoleting any that may exist.
-.It Fl g
-Generate keys for the GQ identification scheme
-using the existing GQ parameters.
-If the GQ parameters do not yet exist, create them first.
-.It Fl H
-Generate new host keys, obsoleting any that may exist.
-.It Fl I
-Generate parameters for the IFF identification scheme,
-obsoleting any that may exist.
-.It Fl i Ar name
-Set the suject name to
-.Ar name .
-This is used as the subject field in certificates
-and in the file name for host and sign keys.
-.It Fl M
-Generate MD5 keys, obsoleting any that may exist.
-.It Fl P
-Generate a private certificate.
+.It Fl D Fl \-set\-debug\-level Ns = Ar level
+Set the debugging verbosity to
+.Ar level .
+This option displays the cryptographic data produced in eye\-friendly billboards.
+.It Fl e Fl \-id\-key
+Write the
+.Cm IFF
+or
+.Cm GQ
+public parameters from the
+.Ar IFFkey or GQkey
+client keys file previously specified
+as unencrypted data to the standard output stream
+.Pa stdout .
+This is intended for automatic key distribution by email.
+.It Fl G Fl \-gq\-params
+Generate a new encrypted
+.Cm GQ
+parameters and key file for the Guillou\-Quisquater (GQ) identity scheme.
+This option is mutually exclusive with the
+.Fl I
+and
+.Fl V
+options.
+.It Fl H Fl \-host\-key
+Generate a new encrypted
+.Cm RSA
+public/private host key file.
+.It Fl I Fl \-iffkey
+Generate a new encrypted
+.Cm IFF
+key file for the Schnorr (IFF) identity scheme.
+This option is mutually exclusive with the
+.Fl G
+and
+Fl V
+options.
+.It Fl i Fl \-ident Ns = Ar group
+Set the optional Autokey group name to
+.Ar group .
+This is used in the identity scheme parameter file names of
+.Cm IFF , GQ ,
+and
+.Cm MV
+client parameters files.
+In that role, the default is the host name if no group is provided.
+The group name, if specified using
+.Fl i
+or
+.Fl s
+following an
+.Ql @
+character, is also used in certificate subject and issuer names in the form
+.Ar host @ group
+and should match the group specified via
+.Ic crypto Cm ident
+or
+.Ic server Cm ident
+in the ntpd configuration file.
+.It Fl l Fl \-lifetime Ns = Ar days
+Set the lifetime for certificate expiration to
+.Ar days .
+The default lifetime is one year (365 days).
+.It Fl m Fl \-modulus Ns = Ar bits
+Set the number of bits in the prime modulus for generating files to
+.Ar bits .
+The modulus defaults to 512, but can be set from 256 to 2048 (32 to 256 octets).
+Use the larger moduli with caution, as this can consume considerable computing
+resources and increases the size of authenticated packets.
+.It Fl M Fl \-md5key
+Generate a new symmetric keys file containing 10
+.Cm MD5
+keys, and if OpenSSL is available, 10
+.Cm SHA
+keys.
+An
+.Cm MD5
+key is a string of 20 random printable ASCII characters, while a
+.Cm SHA
+key is a string of 40 random hex digits.
+The file can be edited using a text editor to change the key type or key content.
+This option is mutually exclusive with all other options.
+.It Fl p Fl \-password Ns = Ar passwd
+Set the password for reading and writing encrypted files to
+.Ar passwd .
+These include the host, sign and identify key files.
+By default, the password is the string returned by the Unix
+.Ic hostname
+command.
+.It Fl P Fl \-pvt\-cert
+Generate a new private certificate used by the
+.Cm PC
+identity scheme.
By default, the program generates public certificates.
-.It Fl p Ar password
-Encrypt generated files containing private data with
-.Ar password
-and the DES\-CBC algorithm.
-.It Fl q
-Set the password for reading files to password.
-.It Fl S Oo Cm RSA | DSA Oc
-Generate a new sign key of the designated type,
-obsoleting any that may exist.
-By default, the program uses the host key as the sign key.
-.It Fl s Ar name
-Set the issuer name to
-.Ar name .
-This is used for the issuer field in certificates
-and in the file name for identity files.
-.It Fl T
+Note: the PC identity scheme is not recommended for new installations.
+.It Fl q Fl \-export\-passwd Ns = Ar passwd
+Set the password for writing encrypted
+.Cm IFF , GQ and MV
+identity files redirected to
+.Pa stdout
+to
+.Ar passwd .
+In effect, these files are decrypted with the
+.Fl p
+password, then encrypted with the
+.Fl q
+password.
+By default, the password is the string returned by the Unix
+.Ic hostname
+command.
+.It Fl s Fl \-subject\-key Ns = Ar Oo host Oc Op @ Ar group
+Specify the Autokey host name, where
+.Ar host
+is the optional host name and
+.Ar group
+is the optional group name.
+The host name, and if provided, group name are used in
+.Ar host @ group
+form as certificate subject and issuer.
+Specifying
+.Fl s @ Ar group
+is allowed, and results in leaving the host name unchanged, as with
+.Fl i Ar group .
+The group name, or if no group is provided, the host name are also used in the
+file names of
+.Cm IFF , GQ ,
+and
+.Cm MV
+identity scheme client parameter files.
+If
+.Ar host
+is not specified, the default host name is the string returned by the Unix
+.Ic hostname
+command.
+.It Fl S Fl \-sign\-key Ns = Op Cm RSA | DSA
+Generate a new encrypted public/private sign key file of the specified type.
+By default, the sign key is the host key and has the same type.
+If compatibility with FIPS 140\-2 is required, the sign key type must be
+.Cm DSA .
+.It Fl T Fl \-trusted\-cert
Generate a trusted certificate.
By default, the program generates a non\-trusted certificate.
-.It Fl V Ar nkeys
-Generate parameters and keys for the Mu\-Varadharajan (MV) identification scheme.
+.It Fl V Fl \-mv\-params Ar nkeys
+Generate
+.Ar nkeys
+encrypted server keys and parameters for the Mu\-Varadharajan (MV)
+identity scheme.
+This option is mutually exclusive with the
+.Fl I
+and
+.Fl G
+options.
+Note: support for this option should be considered a work in progress.
.El
.Ss Random Seed File
All cryptographically sound key generation schemes must have means
@@ -746,14 +838,14 @@ but are outside the scope of this page.
.Pp
The entropy seed used by the OpenSSL library is contained in a file,
usually called
-.Cm .rnd ,
+.Pa .rnd ,
which must be available when starting the NTP daemon
or the
.Nm
program.
The NTP daemon will first look for the file
using the path specified by the
-.Ic randfile
+.Cm randfile
subcommand of the
.Ic crypto
configuration command.
@@ -769,44 +861,118 @@ If the
.Ev RANDFILE
environment variable is not present,
the library will look for the
-.Cm .rnd
+.Pa .rnd
file in the user home directory.
+Since both the
+.Nm
+program and
+.Xr ntpd 8
+daemon must run as root, the logical place to put this file is in
+.Pa /.rnd
+or
+.Pa /root/.rnd .
If the file is not available or cannot be written,
the daemon exits with a message to the system log and the program
exits with a suitable error message.
.Ss Cryptographic Data Files
-All other file formats begin with two lines.
-The first contains the file name, including the generated host name
-and filestamp.
-The second contains the datestamp in conventional Unix date format.
-Lines beginning with # are considered comments and ignored by the
+All file formats begin with two nonencrypted lines.
+The first line contains the file name, including the generated host name
+and filestamp, in the format
+.Pa ntpkey_ Ns Ar key _ Ar name . Ar filestamp ,
+where
+.Ar key
+is the key or parameter type,
+.Ar name
+is the host or group name and
+.Ar filestamp
+is the filestamp (NTP seconds) when the file was created.
+By convention,
+.Ar key
+names in generated file names include both upper and lower case
+characters, while
+.Ar key
+names in generated link names include only lower case characters.
+The filestamp is not used in generated link names.
+The second line contains the datestamp in conventional Unix
+.Pa date
+format.
+Lines beginning with
+.Ql #
+are considered comments and ignored by the
.Nm
program and
.Xr ntpd 8
daemon.
-Cryptographic values are encoded first using ASN.1 rules,
-then encrypted if necessary, and finally written PEM\-encoded
-printable ASCII format preceded and followed by MIME content identifier lines.
.Pp
-The format of the symmetric keys file is somewhat different
-than the other files in the interest of backward compatibility.
-Since DES\-CBC is deprecated in NTPv4, the only key format of interest
-is MD5 alphanumeric strings.
-Following hte heard the keys are
-entered one per line in the format
-.D1 Ar keyno type key
+The remainder of the file contains cryptographic data, encoded first using ASN.1
+rules, then encrypted if necessary, and finally written in PEM\-encoded
+printable ASCII text, preceded and followed by MIME content identifier lines.
+.Pp
+The format of the symmetric keys file, ordinarily named
+.Pa ntp.keys ,
+is somewhat different than the other files in the interest of backward compatibility.
+Ordinarily, the file is generated by this program, but it can be constructed
+and edited using an ordinary text editor.
+.Bd -literal -unfilled -offset center
+# ntpkey_MD5key_bk.ntp.org.3595864945
+# Thu Dec 12 19:22:25 2013
+1 MD5 L";Nw<\`.I<f4U0)247"i # MD5 key
+2 MD5 &>l0%XXK9O'51VwV<xq~ # MD5 key
+3 MD5 lb4zLW~d^!K:]RsD'qb6 # MD5 key
+4 MD5 Yue:tL[+vR)M\`n~bY,'? # MD5 key
+5 MD5 B;fx'Kgr/&4ZTbL6=RxA # MD5 key
+6 MD5 4eYwa\`o}3i@@V@..R9!l # MD5 key
+7 MD5 \`A.([h+;wTQ|xfi%Sn_! # MD5 key
+8 MD5 45:V,r4]l6y^JH6"Sh?F # MD5 key
+9 MD5 3\-5vcn*6l29DS?Xdsg)* # MD5 key
+10 MD5 2late4Me # MD5 key
+11 SHA1 a27872d3030a9025b8446c751b4551a7629af65c # SHA1 key
+12 SHA1 21bc3b4865dbb9e920902abdccb3e04ff97a5e74 # SHA1 key
+13 SHA1 2b7736fe24fef5ba85ae11594132ab5d6f6daba9 # SHA1 key
+14 SHA a5332809c8878dd3a5b918819108a111509aeceb # SHA key
+15 MD2 2fe16c88c760ff2f16d4267e36c1aa6c926e6964 # MD2 key
+16 MD4 b2691811dc19cfc0e2f9bcacd74213f29812183d # MD4 key
+17 MD5 e4d6735b8bdad58ec5ffcb087300a17f7fef1f7c # MD5 key
+18 MDC2 a8d5e2315c025bf3a79174c87fbd10477de2eabc # MDC2 key
+19 RIPEMD160 77ca332cafb30e3cafb174dcd5b80ded7ba9b3d2 # RIPEMD160 key
+20 AES128CMAC f92ff73eee86c1e7dc638d6489a04e4e555af878 # AES128CMAC key
+.Ed
+.D1 Figure 1. Typical Symmetric Key File
+.Pp
+Figure 1 shows a typical symmetric keys file used by the reference
+implementation.
+Following the header the keys are entered one per line in the format
+.D1 Ar keyno Ar type Ar key
where
.Ar keyno
-is a positive integer in the range 1\-65,535,
+is a positive integer in the range 1\-65534;
.Ar type
-is the string MD5 defining the key format and
+is the key type for the message digest algorithm, which in the absence of the
+OpenSSL library must be
+.Cm MD5
+to designate the MD5 message digest algorithm;
+if the OpenSSL library is installed, the key type can be any
+message digest algorithm supported by that library;
+however, if compatibility with FIPS 140\-2 is required,
+the key type must be either
+.Cm SHA
+or
+.Cm SHA1 ;
.Ar key
is the key itself,
-which is a printable ASCII string 16 characters or less in length.
-Each character is chosen from the 93 printable characters
-in the range 0x21 through 0x7f excluding space and the
+which is a printable ASCII string 20 characters or less in length:
+each character is chosen from the 93 printable characters
+in the range 0x21 through 0x7e (
+.Ql !
+through
+.Ql ~
+\&) excluding space and the
+.Ql #
+character, and terminated by whitespace or a
.Ql #
character.
+An OpenSSL key consists of a hex\-encoded ASCII string of 40 characters, which
+is truncated as necessary.
.Pp
Note that the keys used by the
.Xr ntpq 8
@@ -819,8 +985,8 @@ in human readable ASCII format.
.Pp
The
.Nm
-program generates a MD5 symmetric keys file
-.Pa ntpkey_MD5key_ Ns Ar hostname.filestamp .
+program generates a symmetric keys file
+.Pa ntpkey_MD5key_ Ns Ar hostname Ns . Ns Ar filestamp .
Since the file contains private shared keys,
it should be visible only to root and distributed by secure means
to other subnet hosts.
@@ -858,10 +1024,10 @@ The number of bits in the identity modulus. The default is 256.
certificate scheme.
.sp
scheme is one of
-RSA\-MD2, RSA\-MD5, RSA\-SHA, RSA\-SHA1, RSA\-MDC2, RSA\-RIPEMD160,
+RSA\-MD2, RSA\-MD5, RSA\-MDC2, RSA\-SHA, RSA\-SHA1, RSA\-RIPEMD160,
DSA\-SHA, or DSA\-SHA1.
.sp
-Select the certificate message digest/signature encryption scheme.
+Select the certificate signature encryption/message digest scheme.
Note that RSA schemes must be used with a RSA sign key and DSA
schemes must be used with a DSA sign key. The default without
this option is RSA\-MD5.
@@ -870,7 +1036,7 @@ privatekey cipher.
.sp
Select the cipher which is used to encrypt the files containing
private keys. The default is three\-key triple DES in CBC mode,
-equivalent to "@code{\-C des\-ede3\-cbc". The openssl tool lists ciphers
+equivalent to "\fB\-C des\-ede3\-cbc\fP". The openssl tool lists ciphers
available in "\fBopenssl \-h\fP" output.
.It Fl d , Fl \-debug\-level
Increase debug verbosity level.
@@ -884,8 +1050,9 @@ This option takes an integer number as its argument.
.It Fl e , Fl \-id\-key
Write IFF or GQ identity keys.
.sp
-Write the IFF or GQ client keys to the standard output. This is
-intended for automatic key distribution by mail.
+Write the public parameters from the IFF or GQ client keys to
+the standard output.
+This is intended for automatic key distribution by email.
.It Fl G , Fl \-gq\-params
Generate GQ parameters and keys.
.sp
@@ -908,21 +1075,17 @@ the file name of IFF, GQ, and MV client parameters files. In
that role, the default is the host name if this option is not
provided. The group name, if specified using \fB\-i/\-\-ident\fP or
using \fB\-s/\-\-subject\-name\fP following an '\fB@\fP' character,
-is also a part of the self\-signed host certificate's subject and
+is also a part of the self\-signed host certificate subject and
issuer names in the form \fBhost@group\fP and should match the
-\'\fBcrypto ident\fP' or '\fBserver ident\fP' configuration in
-\fBntpd\fP's configuration file.
+\'\fBcrypto ident\fP' or '\fBserver ident\fP' configuration in the
+\fBntpd\fP configuration file.
.It Fl l Ar lifetime , Fl \-lifetime Ns = Ns Ar lifetime
set certificate lifetime.
This option takes an integer number as its argument.
.sp
Set the certificate expiration to lifetime days from now.
-.It Fl M , Fl \-md5key
-generate MD5 keys.
-.sp
-Generate MD5 keys, obsoleting any that may exist.
.It Fl m Ar modulus , Fl \-modulus Ns = Ns Ar modulus
-modulus.
+prime modulus.
This option takes an integer number as its argument.
The value of
.Ar modulus
@@ -935,6 +1098,10 @@ in the range 256 through 2048
.in -4
.sp
The number of bits in the prime modulus. The default is 512.
+.It Fl M , Fl \-md5key
+generate symmetric keys.
+.sp
+Generate symmetric keys, obsoleting any that may exist.
.It Fl P , Fl \-pvt\-cert
generate PC private certificate.
.sp
@@ -956,12 +1123,6 @@ encrypted with the DES\-CBC algorithm and the specified password.
The same password must be specified to the remote ntpd via the
"crypto pw password" configuration command. See also the option
-\-id\-key (\-e) for unencrypted exports.
-.It Fl S Ar sign , Fl \-sign\-key Ns = Ns Ar sign
-generate sign key (RSA or DSA).
-.sp
-Generate a new sign key of the designated type, obsoleting any
-that may exist. By default, the program uses the host key as the
-sign key.
.It Fl s Ar host@group , Fl \-subject\-name Ns = Ns Ar host@group
set host and optionally group name.
.sp
@@ -969,12 +1130,18 @@ Set the Autokey host name, and optionally, group name specified
following an '\fB@\fP' character. The host name is used in the file
name of generated host and signing certificates, without the
group name. The host name, and if provided, group name are used
-in \fBhost@group\fP form for the host certificate's subject and issuer
+in \fBhost@group\fP form for the host certificate subject and issuer
fields. Specifying '\fB\-s @group\fP' is allowed, and results in
leaving the host name unchanged while appending \fB@group\fP to the
subject and issuer fields, as with \fB\-i group\fP. The group name, or
if not provided, the host name are also used in the file names
of IFF, GQ, and MV client parameter files.
+.It Fl S Ar sign , Fl \-sign\-key Ns = Ns Ar sign
+generate sign key (RSA or DSA).
+.sp
+Generate a new sign key of the designated type, obsoleting any
+that may exist. By default, the program uses the host key as the
+sign key.
.It Fl T , Fl \-trusted\-cert
trusted certificate (TC scheme).
.sp
@@ -1023,18 +1190,6 @@ The \fIhomerc\fP files are "\fI$HOME\fP", and "\fI.\fP".
If any of these are directories, then the file \fI.ntprc\fP
is searched for within those directories.
.Sh USAGE
-The
-.Fl p Ar password
-option specifies the write password and
-.Fl q Ar password
-option the read password for previously encrypted files.
-The
-.Nm
-program prompts for the password if it reads an encrypted file
-and the password is missing or incorrect.
-If an encrypted file is read successfully and
-no write password is specified, the read password is used
-as the write password by default.
.Sh "ENVIRONMENT"
See \fBOPTION PRESETS\fP for configuration environment variables.
.Sh "FILES"
@@ -1058,10 +1213,7 @@ The University of Delaware and Network Time Foundation
Copyright (C) 1992\-2017 The University of Delaware and Network Time Foundation all rights reserved.
This program is released under the terms of the NTP license, <http://ntp.org/license>.
.Sh BUGS
-It can take quite a while to generate some cryptographic values,
-from one to several minutes with modern architectures
-such as UltraSPARC and up to tens of minutes to an hour
-with older architectures such as SPARC IPC.
+It can take quite a while to generate some cryptographic values.
.Pp
Please report bugs to http://bugs.ntp.org .
.Pp
diff --git a/usr.sbin/ntp/doc/ntp.conf.5 b/usr.sbin/ntp/doc/ntp.conf.5
index be288c6..14632ce 100644
--- a/usr.sbin/ntp/doc/ntp.conf.5
+++ b/usr.sbin/ntp/doc/ntp.conf.5
@@ -1,11 +1,11 @@
-.Dd March 21 2017
+.Dd February 27 2018
.Dt NTP_CONF 5 File Formats
.Os
.\" EDIT THIS FILE WITH CAUTION (ntp.mdoc)
.\"
.\" $FreeBSD$
.\"
-.\" It has been AutoGen-ed March 21, 2017 at 10:31:09 AM by AutoGen 5.18.5
+.\" It has been AutoGen-ed February 27, 2018 at 05:14:42 PM by AutoGen 5.18.5
.\" From the definitions ntp.conf.def
.\" and the template file agmdoc-cmd.tpl
.Sh NAME
@@ -1534,6 +1534,7 @@ subcommand specifies the probability of discard
for packets that overflow the rate\-control window.
.It Xo Ic restrict address
.Op Cm mask Ar mask
+.Op Cm ippeerlimit Ar int
.Op Ar flag ...
.Xc
The
@@ -1559,6 +1560,15 @@ Note that text string
.Cm default ,
with no mask option, may
be used to indicate the default entry.
+The
+.Cm ippeerlimit
+directive limits the number of peer requests for each IP to
+.Ar int ,
+where a value of \-1 means "unlimited", the current default.
+A value of 0 means "none".
+There would usually be at most 1 peering request per IP,
+but if the remote peering requests are behind a proxy
+there could well be more than 1 per IP.
In the current implementation,
.Cm flag
always
@@ -1609,6 +1619,18 @@ basis, with later trap requestors being denied service.
This flag
modifies the assignment algorithm by allowing low priority traps to
be overridden by later requests for normal priority traps.
+.It Cm noepeer
+Deny ephemeral peer requests,
+even if they come from an authenticated source.
+Note that the ability to use a symmetric key for authentication may be restricted to
+one or more IPs or subnets via the third field of the
+.Pa ntp.keys
+file.
+This restriction is not enabled by default,
+to maintain backward compatability.
+Expect
+.Cm noepeer
+to become the default in ntp\-4.4.
.It Cm nomodify
Deny
.Xr ntpq 8
@@ -1626,10 +1648,10 @@ and
queries.
Time service is not affected.
.It Cm nopeer
-Deny packets which would result in mobilizing a new association.
-This
-includes broadcast and symmetric active packets when a configured
-association does not exist.
+Deny unauthenticated packets which would result in mobilizing a new association.
+This includes
+broadcast and symmetric active packets
+when a configured association does not exist.
It also includes
.Cm pool
associations, so if you want to use servers from a
@@ -1637,8 +1659,9 @@ associations, so if you want to use servers from a
directive and also want to use
.Cm nopeer
by default, you'll want a
-.Cm "restrict source ..." line as well that does
-.It not
+.Cm "restrict source ..."
+line as well that does
+.Em not
include the
.Cm nopeer
directive.
@@ -2013,9 +2036,10 @@ there is clear benefit to having the clients notice this change
as soon as possible.
Attacks such as replay attacks can happen, however,
and even though there are a number of protections built in to
-broadcast mode, attempts to perform a replay attack are possible.
+broadcast mode, attempts to perform a replay attack are possible.
This value defaults to 0, but can be changed
to any number of poll intervals between 0 and 4.
+.El
.Ss Manycast Options
.Bl -tag -width indent
.It Xo Ic tos
@@ -2361,7 +2385,7 @@ specific drivers in the
page
(available as part of the HTML documentation
provided in
-.Pa /usr/share/doc/ntp ) .
+.Pa /usr/share/doc/ntp ).
.It Cm stratum Ar int
Specifies the stratum number assigned to the driver, an integer
between 0 and 15.
@@ -2639,6 +2663,79 @@ This option is useful for sites that run
.Xr ntpd 8
on multiple hosts, with (mostly) common options (e.g., a
restriction list).
+.It Xo Ic interface
+.Oo
+.Cm listen | Cm ignore | Cm drop
+.Oc
+.Oo
+.Cm all | Cm ipv4 | Cm ipv6 | Cm wildcard
+.Ar name | Ar address
+.Oo Cm / Ar prefixlen
+.Oc
+.Oc
+.Xc
+The
+.Cm interface
+directive controls which network addresses
+.Xr ntpd 8
+opens, and whether input is dropped without processing.
+The first parameter determines the action for addresses
+which match the second parameter.
+The second parameter specifies a class of addresses,
+or a specific interface name,
+or an address.
+In the address case,
+.Ar prefixlen
+determines how many bits must match for this rule to apply.
+.Cm ignore
+prevents opening matching addresses,
+.Cm drop
+causes
+.Xr ntpd 8
+to open the address and drop all received packets without examination.
+Multiple
+.Cm interface
+directives can be used.
+The last rule which matches a particular address determines the action for it.
+.Cm interface
+directives are disabled if any
+.Fl I ,
+.Fl \-interface ,
+.Fl L ,
+or
+.Fl \-novirtualips
+command\-line options are specified in the configuration file,
+all available network addresses are opened.
+The
+.Cm nic
+directive is an alias for
+.Cm interface .
+.It Ic leapfile Ar leapfile
+This command loads the IERS leapseconds file and initializes the
+leapsecond values for the next leapsecond event, leapfile expiration
+time, and TAI offset.
+The file can be obtained directly from the IERS at
+.Li https://hpiers.obspm.fr/iers/bul/bulc/ntp/leap\-seconds.list
+or
+.Li ftp://hpiers.obspm.fr/iers/bul/bulc/ntp/leap\-seconds.list .
+The
+.Cm leapfile
+is scanned when
+.Xr ntpd 8
+processes the
+.Cm leapfile directive or when
+.Cm ntpd detects that the
+.Ar leapfile
+has changed.
+.Cm ntpd
+checks once a day to see if the
+.Ar leapfile
+has changed.
+The
+.Xr update\-leap 1update_leapmdoc
+script can be run to see if the
+.Ar leapfile
+should be updated.
.It Ic leapsmearinterval Ar seconds
This EXPERIMENTAL option is only available if
.Xr ntpd 8
@@ -2743,6 +2840,181 @@ facility.
This is the same operation as the
.Fl l
command line option.
+.It Xo Ic mru
+.Oo
+.Cm maxdepth Ar count | Cm maxmem Ar kilobytes |
+.Cm mindepth Ar count | Cm maxage Ar seconds |
+.Cm initialloc Ar count | Cm initmem Ar kilobytes |
+.Cm incalloc Ar count | Cm incmem Ar kilobytes
+.Oc
+.Xc
+Controls size limite of the monitoring facility's Most Recently Used
+(MRU) list
+of client addresses, which is also used by the
+rate control facility.
+.Bl -tag -width indent
+.It Ic maxdepth Ar count
+.It Ic maxmem Ar kilobytes
+Equivalent upper limits on the size of the MRU list, in terms of entries or kilobytes.
+The acutal limit will be up to
+.Cm incalloc
+entries or
+.Cm incmem
+kilobytes larger.
+As with all of the
+.Cm mru
+options offered in units of entries or kilobytes, if both
+.Cm maxdepth
+and
+.Cm maxmem are used, the last one used controls.
+The default is 1024 kilobytes.
+.It Cm mindepth Ar count
+Lower limit on the MRU list size.
+When the MRU list has fewer than
+.Cm mindepth
+entries, existing entries are never removed to make room for newer ones,
+regardless of their age.
+The default is 600 entries.
+.It Cm maxage Ar seconds
+Once the MRU list has
+.Cm mindepth
+entries and an additional client is to ba added to the list,
+if the oldest entry was updated more than
+.Cm maxage
+seconds ago, that entry is removed and its storage is reused.
+If the oldest entry was updated more recently the MRU list is grown,
+subject to
+.Cm maxdepth / moxmem .
+The default is 64 seconds.
+.It Cm initalloc Ar count
+.It Cm initmem Ar kilobytes
+Initial memory allocation at the time the monitoringfacility is first enabled,
+in terms of the number of entries or kilobytes.
+The default is 4 kilobytes.
+.It Cm incalloc Ar count
+.It Cm incmem Ar kilobytes
+Size of additional memory allocations when growing the MRU list, in entries or kilobytes.
+The default is 4 kilobytes.
+.El
+.It Ic nonvolatile Ar threshold
+Specify the
+.Ar threshold
+delta in seconds before an hourly change to the
+.Cm driftfile
+(frequency file) will be written, with a default value of 1e\-7 (0.1 PPM).
+The frequency file is inspected each hour.
+If the difference between the current frequency and the last value written
+exceeds the threshold, the file is written and the
+.Cm threshold
+becomes the new threshold value.
+If the threshold is not exceeeded, it is reduced by half.
+This is intended to reduce the number of file writes
+for embedded systems with nonvolatile memory.
+.It Ic phone Ar dial ...
+This command is used in conjunction with
+the ACTS modem driver (type 18)
+or the JJY driver (type 40, mode 100 \- 180).
+For the ACTS modem driver (type 18), the arguments consist of
+a maximum of 10 telephone numbers used to dial USNO, NIST, or European
+time service.
+For the JJY driver (type 40 mode 100 \- 180), the argument is
+one telephone number used to dial the telephone JJY service.
+The Hayes command ATDT is normally prepended to the number.
+The number can contain other modem control codes as well.
+.It Xo Ic reset
+.Oo
+.Ic allpeers
+.Oc
+.Oo
+.Ic auth
+.Oc
+.Oo
+.Ic ctl
+.Oc
+.Oo
+.Ic io
+.Oc
+.Oo
+.Ic mem
+.Oc
+.Oo
+.Ic sys
+.Oc
+.Oo
+.Ic timer
+.Oc
+.Xc
+Reset one or more groups of counters maintained by
+.Cm ntpd
+and exposed by
+.Cm ntpq
+and
+.Cm ntpdc .
+.It Xo Ic rlimit
+.Oo
+.Cm memlock Ar Nmegabytes |
+.Cm stacksize Ar N4kPages
+.Cm filenum Ar Nfiledescriptors
+.Oc
+.Xc
+.Bl -tag -width indent
+.It Cm memlock Ar Nmegabytes
+Specify the number of megabytes of memory that should be
+allocated and locked.
+Probably only available under Linux, this option may be useful
+when dropping root (the
+.Fl i
+option).
+The default is 32 megabytes on non\-Linux machines, and \-1 under Linux.
+-1 means "do not lock the process into memory".
+0 means "lock whatever memory the process wants into memory".
+.It Cm stacksize Ar N4kPages
+Specifies the maximum size of the process stack on systems with the
+.Fn mlockall
+function.
+Defaults to 50 4k pages (200 4k pages in OpenBSD).
+.It Cm filenum Ar Nfiledescriptors
+Specifies the maximum number of file descriptors ntpd may have open at once.
+Defaults to the system default.
+.El
+.It Ic saveconfigdir Ar directory_path
+Specify the directory in which to write configuration snapshots
+requested with
+.Cm ntpq 's
+.Cm saveconfig
+command.
+If
+.Cm saveconfigdir
+does not appear in the configuration file,
+.Cm saveconfig
+requests are rejected by
+.Cm ntpd .
+.It Ic saveconfig Ar filename
+Write the current configuration, including any runtime
+modifications given with
+.Cm :config
+or
+.Cm config\-from\-file
+to the
+.Cm ntpd
+host's
+.Ar filename
+in the
+.Cm saveconfigdir .
+This command will be rejected unless the
+.Cm saveconfigdir
+directive appears in
+.Cm ntpd 's
+configuration file.
+.Ar filename
+can use
+.Xr strftime 3
+format directives to substitute the current date and time,
+for example,
+.Cm saveconfig\ ntp\-%Y%m%d\-%H%M%S.conf .
+The filename used is stored in the system variable
+.Cm savedconfig .
+Authentication is required.
.It Ic setvar Ar variable Op Cm default
This command adds an additional system variable.
These
@@ -2781,6 +3053,10 @@ holds
the names of all peer variables and the
.Va clock_var_list
holds the names of the reference clock variables.
+.It Cm sysinfo
+Display operational summary.
+.It Cm sysstats
+Show statistics counters maintained in the protocol module.
.It Xo Ic tinker
.Oo
.Cm allan Ar allan |
@@ -2870,33 +3146,18 @@ be set to any positive number in seconds.
If set to zero, the stepout
pulses will not be suppressed.
.El
-.It Xo Ic rlimit
-.Oo
-.Cm memlock Ar Nmegabytes |
-.Cm stacksize Ar N4kPages
-.Cm filenum Ar Nfiledescriptors
-.Oc
-.Xc
-.Bl -tag -width indent
-.It Cm memlock Ar Nmegabytes
-Specify the number of megabytes of memory that should be
-allocated and locked.
-Probably only available under Linux, this option may be useful
-when dropping root (the
-.Fl i
-option).
-The default is 32 megabytes on non\-Linux machines, and \-1 under Linux.
--1 means "do not lock the process into memory".
-0 means "lock whatever memory the process wants into memory".
-.It Cm stacksize Ar N4kPages
-Specifies the maximum size of the process stack on systems with the
-.Fn mlockall
-function.
-Defaults to 50 4k pages (200 4k pages in OpenBSD).
-.It Cm filenum Ar Nfiledescriptors
-Specifies the maximum number of file descriptors ntpd may have open at once.
-Defaults to the system default.
-.El
+.It Cm writevar Ar assocID\ name = value [,...]
+Write (create or update) the specified variables.
+If the
+.Cm assocID
+is zero, the variablea re from the
+system variables
+name space, otherwise they are from the
+peer variables
+name space.
+The
+.Cm assocID
+is required, as the same name can occur in both name spaces.
.It Xo Ic trap Ar host_address
.Op Cm port Ar port_number
.Op Cm interface Ar interface_address
@@ -2911,6 +3172,13 @@ message is sent with a source address of the local interface the
message is sent through.
Note that on a multihomed host the
interface used may vary from time to time with routing changes.
+.It Cm ttl Ar hop ...
+This command specifies a list of TTL values in increasing order.
+Up to 8 values can be specified.
+In
+.Cm manycast
+mode these values are used in\-turn in an expanding\-ring search.
+The default is eight multiples of 32 starting at 31.
.Pp
The trap receiver will generally log event messages and other
information from the server in a log file.
diff --git a/usr.sbin/ntp/doc/ntp.keys.5 b/usr.sbin/ntp/doc/ntp.keys.5
index 68431c8..aeb7338 100644
--- a/usr.sbin/ntp/doc/ntp.keys.5
+++ b/usr.sbin/ntp/doc/ntp.keys.5
@@ -1,11 +1,11 @@
-.Dd March 21 2017
+.Dd February 27 2018
.Dt NTP_KEYS 5 File Formats
.Os SunOS 5.10
.\" EDIT THIS FILE WITH CAUTION (ntp.mdoc)
.\"
.\" $FreeBSD$
.\"
-.\" It has been AutoGen-ed March 21, 2017 at 10:44:22 AM by AutoGen 5.18.5
+.\" It has been AutoGen-ed February 27, 2018 at 05:14:46 PM by AutoGen 5.18.5
.\" From the definitions ntp.keys.def
.\" and the template file agmdoc-file.tpl
.Sh NAME
@@ -53,16 +53,24 @@ where
is a positive integer (between 1 and 65534),
.Ar type
is the message digest algorithm,
-and
.Ar key
is the key itself, and
.Ar opt_IP_list
is an optional comma\-separated list of IPs
+where the
+.Ar keyno
+should be trusted.
that are allowed to serve time.
+Each IP in
+.Ar opt_IP_list
+may contain an optional
+.Cm /subnetbits
+specification which identifies the number of bits for
+the desired subnet of trust.
If
.Ar opt_IP_list
is empty,
-any properly\-authenticated server message will be
+any properly\-authenticated message will be
accepted.
.Pp
The
diff --git a/usr.sbin/ntp/doc/ntpd.8 b/usr.sbin/ntp/doc/ntpd.8
index 179f5ea..7fb6529 100644
--- a/usr.sbin/ntp/doc/ntpd.8
+++ b/usr.sbin/ntp/doc/ntpd.8
@@ -1,11 +1,11 @@
-.Dd March 21 2017
+.Dd February 27 2018
.Dt NTPD 8 User Commands
.Os
.\" EDIT THIS FILE WITH CAUTION (ntpd-opts.mdoc)
.\"
.\" $FreeBSD$
.\"
-.\" It has been AutoGen-ed March 21, 2017 at 10:44:23 AM by AutoGen 5.18.5
+.\" It has been AutoGen-ed February 27, 2018 at 05:14:47 PM by AutoGen 5.18.5
.\" From the definitions ntpd-opts.def
.\" and the template file agmdoc-cmd.tpl
.Sh NAME
diff --git a/usr.sbin/ntp/doc/ntpdc.8 b/usr.sbin/ntp/doc/ntpdc.8
index ab3859e..c1b9c3e 100644
--- a/usr.sbin/ntp/doc/ntpdc.8
+++ b/usr.sbin/ntp/doc/ntpdc.8
@@ -1,11 +1,11 @@
-.Dd March 21 2017
+.Dd February 27 2018
.Dt NTPDC 8 User Commands
.Os
.\" EDIT THIS FILE WITH CAUTION (ntpdc-opts.mdoc)
.\"
.\" $FreeBSD$
.\"
-.\" It has been AutoGen-ed March 21, 2017 at 10:44:57 AM by AutoGen 5.18.5
+.\" It has been AutoGen-ed February 27, 2018 at 05:15:09 PM by AutoGen 5.18.5
.\" From the definitions ntpdc-opts.def
.\" and the template file agmdoc-cmd.tpl
.Sh NAME
diff --git a/usr.sbin/ntp/doc/ntpq.8 b/usr.sbin/ntp/doc/ntpq.8
index 03f50bd..f1b77d3 100644
--- a/usr.sbin/ntp/doc/ntpq.8
+++ b/usr.sbin/ntp/doc/ntpq.8
@@ -1,11 +1,11 @@
-.Dd March 21 2017
+.Dd February 27 2018
.Dt NTPQ 8 User Commands
.Os
.\" EDIT THIS FILE WITH CAUTION (ntpq-opts.mdoc)
.\"
.\" $FreeBSD$
.\"
-.\" It has been AutoGen-ed March 21, 2017 at 10:45:31 AM by AutoGen 5.18.5
+.\" It has been AutoGen-ed February 27, 2018 at 05:15:28 PM by AutoGen 5.18.5
.\" From the definitions ntpq-opts.def
.\" and the template file agmdoc-cmd.tpl
.Sh NAME
@@ -20,15 +20,12 @@
[ host ...]
.Pp
.Sh DESCRIPTION
+.Pp
The
.Nm
-utility program is used to query NTP servers which
-implement the standard NTP mode 6 control message formats defined
-in Appendix B of the NTPv3 specification RFC1305, requesting
+utility program is used to query NTP servers to monitor NTP operations
+and performance, requesting
information about current state and/or changes in that state.
-The same formats are used in NTPv4, although some of the
-variables have changed and new ones added. The description on this
-page is for the NTPv4 variables.
The program may be run either in interactive mode or controlled using
command line arguments.
Requests to read and write arbitrary
@@ -39,6 +36,7 @@ The
utility can also obtain and print a
list of peers in a common format by sending multiple queries to the
server.
+.Pp
If one or more request options is included on the command line
when
.Nm
@@ -56,6 +54,7 @@ The
.Nm
utility will prompt for
commands if the standard input is a terminal device.
+.Pp
.Nm
uses NTP mode 6 packets to communicate with the
NTP server, and hence can be used to query any compatible server on
@@ -69,6 +68,17 @@ utility makes
one attempt to retransmit requests, and will time requests out if
the remote host is not heard from within a suitable timeout
time.
+.Pp
+Note that in contexts where a host name is expected, a
+.Fl 4
+qualifier preceding the host name forces resolution to the IPv4
+namespace, while a
+.Fl 6
+qualifier forces resolution to the IPv6 namespace.
+For examples and usage, see the
+.Dq NTP Debugging Techniques
+page.
+.Pp
Specifying a
command line option other than
.Fl i
@@ -82,51 +92,46 @@ Otherwise,
will attempt to read
interactive format commands from the standard input.
.Ss "Internal Commands"
+.Pp
Interactive format commands consist of a keyword followed by zero
to four arguments.
Only enough characters of the full keyword to
uniquely identify the command need be typed.
+.Pp
A
number of interactive format commands are executed entirely within
the
.Nm
-utility itself and do not result in NTP mode 6
+utility itself and do not result in NTP
requests being sent to a server.
These are described following.
-.Bl -tag -width "? [command_keyword]" -compact -offset indent
-.It Ic ? Op Ar command_keyword
-.It Ic help Op Ar command_keyword
+.Bl -tag -width "help [command]" -compact -offset indent
+.It Ic ? Op Ar command
+.It Ic help Op Ar command
A
.Ql \&?
-by itself will print a list of all the command
-keywords known to this incarnation of
+by itself will print a list of all the commands
+known to
.Nm .
A
.Ql \&?
-followed by a command keyword will print function and usage
+followed by a command name will print function and usage
information about the command.
-This command is probably a better
-source of information about
-.Nm
-than this manual
-page.
-.It Ic addvars Ar variable_name Ns Xo Op Ic =value
-.Ic ...
-.Xc
-.It Ic rmvars Ar variable_name Ic ...
+.It Ic addvars Ar name Ns Oo \&= Ns Ar value Oc Ns Op ,...
+.It Ic rmvars Ar name Ns Op ,...
.It Ic clearvars
.It Ic showvars
-The data carried by NTP mode 6 messages consists of a list of
+The arguments to this command consist of a list of
items of the form
-.Ql variable_name=value ,
+.Ar name Ns Op \&= Ns Ar value ,
where the
-.Ql =value
+.No \&= Ns Ar value
is ignored, and can be omitted,
in requests to the server to read variables.
The
.Nm
-utility maintains an internal list in which data to be included in control
-messages can be assembled, and sent using the
+utility maintains an internal list in which data to be included in
+messages can be assembled, and displayed or set using the
.Ic readlist
and
.Ic writelist
@@ -141,35 +146,31 @@ The
.Ic rmvars
command can be used to remove individual variables from the list,
while the
-.Ic clearlist
+.Ic clearvars
command removes all variables from the
list.
The
.Ic showvars
command displays the current list of optional variables.
-.It Ic authenticate Op yes | no
+.It Ic authenticate Op Cm yes Ns | Ns Cm no
Normally
.Nm
does not authenticate requests unless
they are write requests.
The command
-.Ql authenticate yes
+.Ic authenticate Cm yes
causes
.Nm
to send authentication with all requests it
makes.
Authenticated requests causes some servers to handle
-requests slightly differently, and can occasionally melt the CPU in
-fuzzballs if you turn authentication on before doing a
-.Ic peer
-display.
+requests slightly differently.
The command
-.Ql authenticate
+.Ic authenticate
causes
.Nm
to display whether or not
-.Nm
-is currently autheinticating requests.
+it is currently authenticating requests.
.It Ic cooked
Causes output from query commands to be "cooked", so that
variables which are recognized by
@@ -178,20 +179,13 @@ will have their
values reformatted for human consumption.
Variables which
.Nm
-thinks should have a decodable value but didn't are
+could not decode completely are
marked with a trailing
.Ql \&? .
-.It Xo
-.Ic debug
-.Oo
-.Cm more |
-.Cm less |
-.Cm off
-.Oc
-.Xc
+.It Ic debug Op Cm more Ns | Ns Cm less Ns | Ns Cm off
With no argument, displays the current debug level.
-Otherwise, the debug level is changed to the indicated level.
-.It Ic delay Ar milliseconds
+Otherwise, the debugging level is changed as indicated.
+.It Ic delay Op Ar milliseconds
Specify a time interval to be added to timestamps included in
requests which require authentication.
This is used to enable
@@ -200,14 +194,21 @@ or between machines whose clocks are unsynchronized.
Actually the
server does not now require timestamps in authenticated requests,
so this command may be obsolete.
+Without any arguments, displays the current delay.
+.It Ic drefid Op Cm hash Ns | Ns Cm ipv4
+Display refids as IPv4 or hash.
+Without any arguments, displays whether refids are shown as IPv4
+addresses or hashes.
.It Ic exit
Exit
.Nm .
-.It Ic host Ar hostname
+.It Ic host Op Ar name
Set the host to which future queries will be sent.
-.Ar hostname
+The
+.Ar name
may be either a host name or a numeric address.
-.It Ic hostnames Op Cm yes | Cm no
+Without any arguments, displays the current host.
+.It Ic hostnames Op Cm yes Ns | Ns Cm no
If
.Cm yes
is specified, host names are printed in
@@ -222,7 +223,9 @@ unless
modified using the command line
.Fl n
switch.
-.It Ic keyid Ar keyid
+Without any arguments, displays whether host names or numeric addresses
+are shown.
+.It Ic keyid Op Ar keyid
This command allows the specification of a key number to be
used to authenticate configuration requests.
This must correspond
@@ -230,28 +233,20 @@ to the
.Cm controlkey
key number the server has been configured to use for this
purpose.
-.It Ic keytype Xo Oo
-.Cm md5 |
-.Cm OpenSSLDigestType
-.Oc
-.Xc
-Specify the type of key to use for authenticating requests.
-.Cm md5
-is alway supported.
+Without any arguments, displays the current
+.Ar keyid .
+.It Ic keytype Op Ar digest
+Specify the digest algorithm to use for authenticating requests, with default
+.Cm MD5 .
If
.Nm
-was built with OpenSSL support,
-any digest type supported by OpenSSL can also be provided.
+was built with OpenSSL support, and OpenSSL is installed,
+.Ar digest
+can be any message digest algorithm supported by OpenSSL.
If no argument is given, the current
-.Ic keytype
-is displayed.
-.It Ic ntpversion Xo Oo
-.Cm 1 |
-.Cm 2 |
-.Cm 3 |
-.Cm 4
-.Oc
-.Xc
+.Ic keytype Ar digest
+algorithm used is displayed.
+.It Ic ntpversion Op Cm 1 Ns | Ns Cm 2 Ns | Ns Cm 3 Ns | Ns Cm 4
Sets the NTP version number which
.Nm
claims in
@@ -269,13 +264,11 @@ requests.
The password must correspond to the key configured for
use by the NTP server for this purpose if such requests are to be
successful.
-.\" Not yet implemented.
-.\" .It Ic poll
-.\" .Op Ar n
-.\" .Op Ic verbose
-.\" Poll an NTP server in client mode
-.\" .Ar n
-.\" times.
+.It Ic poll Oo Ar n Oc Op Cm verbose
+Poll an NTP server in client mode
+.Ar n
+times.
+Poll not implemented yet.
.It Ic quit
Exit
.Nm .
@@ -285,95 +278,150 @@ from the remote server.
The only formating/interpretation done on
the data is to transform nonascii data into a printable (but barely
understandable) form.
-.It Ic timeout Ar milliseconds
+.It Ic timeout Op Ar milliseconds
Specify a timeout period for responses to server queries.
The
default is about 5000 milliseconds.
+Without any arguments, displays the current timeout period.
Note that since
.Nm
retries each query once after a timeout, the total waiting time for
a timeout will be twice the timeout value set.
.It Ic version
-Print the version of the
+Display the version of the
.Nm
program.
.El
.Ss "Control Message Commands"
-Association IDs are used to identify system, peer and clock variables.
-System variables are assigned an association ID of zero and system name space, while each association is assigned a nonzero association ID and peer namespace.
-Most control commands send a single mode\-6 message to the server and expect a single response message.
+Association ids are used to identify system, peer and clock variables.
+System variables are assigned an association id of zero and system name
+space, while each association is assigned a nonzero association id and
+peer namespace.
+Most control commands send a single message to the server and expect a
+single response message.
The exceptions are the
-.Li peers
+.Ic peers
command, which sends a series of messages,
and the
-.Li mreadlist
+.Ic mreadlist
and
-.Li mreadvar
+.Ic mreadvar
commands, which iterate over a range of associations.
.Bl -tag -width "something" -compact -offset indent
-.It Cm associations
+.It Ic apeers
+Display a list of peers in the form:
+.Dl [tally]remote refid assid st t when pool reach delay offset jitter
+where the output is just like the
+.Ic peers
+command except that the
+.Cm refid
+is displayed in hex format and the association number is also displayed.
+.It Ic associations
Display a list of mobilized associations in the form:
.Dl ind assid status conf reach auth condition last_event cnt
-.Bl -column -offset indent ".Sy Variable" ".Sy Description"
-.It Sy String Ta Sy Description
-.It Li ind Ta index on this list
-.It Li assid Ta association ID
-.It Li status Ta peer status word
-.It Li conf Ta Li yes : persistent, Li no : ephemeral
-.It Li reach Ta Li yes : reachable, Li no : unreachable
-.It Li auth Ta Li ok , Li yes , Li bad and Li none
-.It Li condition Ta selection status (see the Li select field of the peer status word)
-.It Li last_event Ta event report (see the Li event field of the peer status word)
-.It Li cnt Ta event count (see the Li count field of the peer status word)
+.Bl -column -offset indent ".Sy Variable" "see the select field of the peer status word"
+.It Sy Variable Ta Sy Description
+.It Cm ind Ta index on this list
+.It Cm assid Ta association id
+.It Cm status Ta peer status word
+.It Cm conf Ta Cm yes : No persistent, Cm no : No ephemeral
+.It Cm reach Ta Cm yes : No reachable, Cm no : No unreachable
+.It Cm auth Ta Cm ok , Cm yes , Cm bad No and Cm none
+.It Cm condition Ta selection status \&(see the Cm select No field of the peer status word\&)
+.It Cm last_event Ta event report \&(see the Cm event No field of the peer status word\&)
+.It Cm cnt Ta event count \&(see the Cm count No field of the peer status word\&)
.El
-.It Cm authinfo
-Display the authentication statistics.
-.It Cm clockvar Ar assocID Oo Ar name Ns Oo Cm = Ns Ar value Oc Oc Op ...
-.It Cm cv Ar assocID Oo Ar name Ns Oo Cm = Ns Ar value Oc Oc Op ...
-Display a list of clock variables for those associations supporting a reference clock.
-.It Cm :config Op ...
-Send the remainder of the command line, including whitespace, to the server as a run\-time configuration command in the same format as a line in the configuration file. This command is experimental until further notice and clarification. Authentication is of course required.
-.It Cm config\-from\-file Ar filename
-Send the each line of
+.It Ic authinfo
+Display the authentication statistics counters:
+time since reset, stored keys, free keys, key lookups, keys not found,
+uncached keys, expired keys, encryptions, decryptions.
+.It Ic clocklist Op Ar associd
+.It Ic cl Op Ar associd
+Display all clock variables in the variable list for those associations
+supporting a reference clock.
+.It Ic clockvar Oo Ar associd Oc Oo Ar name Ns Oo \&= Ns Ar value Oc Ns Oc Ns Op ,...
+.It Ic cv Oo Ar associd Oc Oo Ar name Ns Oo \&= Ns Ar value Oc Ns Oc Ns Op ,...
+Display a list of clock variables for those associations supporting a
+reference clock.
+.It Ic :config Ar "configuration command line"
+Send the remainder of the command line, including whitespace, to the
+server as a run\-time configuration command in the same format as a line
+in the configuration file.
+This command is experimental until further notice and clarification.
+Authentication is of course required.
+.It Ic config\-from\-file Ar filename
+Send each line of
.Ar filename
-to the server as run\-time configuration commands in the same format as a line in the configuration file. This command is experimental until further notice and clarification. Authentication is required.
+to the server as run\-time configuration commands in the same format as
+lines in the configuration file.
+This command is experimental until further notice and clarification.
+Authentication is required.
.It Ic ifstats
-Display statistics for each local network address. Authentication is required.
+Display status and statistics counters for each local network interface address:
+interface number, interface name and address or broadcast, drop, flag,
+ttl, mc, received, sent, send failed, peers, uptime.
+Authentication is required.
.It Ic iostats
-Display network and reference clock I/O statistics.
+Display network and reference clock I/O statistics:
+time since reset, receive buffers, free receive buffers, used receive buffers,
+low water refills, dropped packets, ignored packets, received packets,
+packets sent, packet send failures, input wakeups, useful input wakeups.
.It Ic kerninfo
-Display kernel loop and PPS statistics. As with other ntpq output, times are in milliseconds. The precision value displayed is in milliseconds as well, unlike the precision system variable.
+Display kernel loop and PPS statistics:
+associd, status, pll offset, pll frequency, maximum error,
+estimated error, kernel status, pll time constant, precision,
+frequency tolerance, pps frequency, pps stability, pps jitter,
+calibration interval, calibration cycles, jitter exceeded,
+stability exceeded, calibration errors.
+As with other ntpq output, times are in milliseconds; very small values
+may be shown as exponentials.
+The precision value displayed is in milliseconds as well, unlike the
+precision system variable.
.It Ic lassociations
-Perform the same function as the associations command, except display mobilized and unmobilized associations.
-.It Ic lopeers Xo
-.Oo Ic \-4 |
-.Ic \-6
-.Oc
-.Xc
-Obtain and print a list of all peers and clients showing
-.Ar dstadr
-(associated with any given IP version).
-.It Ic lpeers Xo
-.Oo Ic \-4 |
-.Ic \-6
-.Oc
-.Xc
-Print a peer spreadsheet for the appropriate IP version(s).
-.Ar dstadr
-(associated with any given IP version).
+Perform the same function as the associations command, except display
+mobilized and unmobilized associations, including all clients.
+.It Ic lopeers Op Fl 4 Ns | Ns Fl 6
+Display a list of all peers and clients showing
+.Cm dstadr
+(associated with the given IP version).
+.It Ic lpassociations
+Display the last obtained list of associations, including all clients.
+.It Ic lpeers Op Fl 4 Ns | Ns Fl 6
+Display a list of all peers and clients (associated with the given IP version).
.It Ic monstats
-Display monitor facility statistics.
-.It Ic mrulist Oo Ic limited | Ic kod | Ic mincount Ns = Ns Ar count | Ic laddr Ns = Ns Ar localaddr | Ic sort Ns = Ns Ar sortorder | Ic resany Ns = Ns Ar hexmask | Ic resall Ns = Ns Ar hexmask Oc
-Obtain and print traffic counts collected and maintained by the monitor facility.
+Display monitor facility status, statistics, and limits:
+enabled, addresses, peak addresses, maximum addresses,
+reclaim above count, reclaim older than, kilobytes, maximum kilobytes.
+.It Ic mreadlist Ar associdlo Ar associdhi
+.It Ic mrl Ar associdlo Ar associdhi
+Perform the same function as the
+.Ic readlist
+command for a range of association ids.
+.It Ic mreadvar Ar associdlo Ar associdhi Oo Ar name Oc Ns Op ,...
+This range may be determined from the list displayed by any
+command showing associations.
+.It Ic mrv Ar associdlo Ar associdhi Oo Ar name Oc Ns Op ,...
+Perform the same function as the
+.Ic readvar
+command for a range of association ids.
+This range may be determined from the list displayed by any
+command showing associations.
+.It Xo Ic mrulist Oo Cm limited | Cm kod | Cm mincount Ns \&= Ns Ar count |
+.Cm laddr Ns \&= Ns Ar localaddr | Cm sort Ns \&= Ns Oo \&\- Oc Ns Ar sortorder |
+.Cm resany Ns \&= Ns Ar hexmask | Cm resall Ns \&= Ns Ar hexmask Oc
+.Xc
+Display traffic counts of the most recently seen source addresses
+collected and maintained by the monitor facility.
With the exception of
-.Cm sort Ns = Ns Ar sortorder ,
+.Cm sort Ns \&= Ns Oo \&\- Oc Ns Ar sortorder ,
the options filter the list returned by
-.Cm ntpd.
+.Xr ntpd 8 .
The
.Cm limited
and
.Cm kod
-options return only entries representing client addresses from which the last packet received triggered either discarding or a KoD response.
+options return only entries representing client addresses from which the
+last packet received triggered either discarding or a KoD response.
The
.Cm mincount Ns = Ns Ar count
option filters entries representing less than
@@ -394,18 +442,21 @@ The
.Ar sortorder
defaults to
.Cm lstint
-and may be any of
+and may be
.Cm addr ,
-.Cm count ,
.Cm avgint ,
+.Cm count ,
.Cm lstint ,
-or any of those preceded by a minus sign (hyphen) to reverse the sort order.
+or any of those preceded by
+.Ql \&\-
+to reverse the sort order.
The output columns are:
.Bl -tag -width "something" -compact -offset indent
.It Column
Description
.It Ic lstint
-Interval in s between the receipt of the most recent packet from this address and the completion of the retrieval of the MRU list by
+Interval in seconds between the receipt of the most recent packet from
+this address and the completion of the retrieval of the MRU list by
.Nm .
.It Ic avgint
Average interval in s between packets from this address.
@@ -413,7 +464,8 @@ Average interval in s between packets from this address.
Restriction flags associated with this address.
Most are copied unchanged from the matching
.Ic restrict
-command, however 0x400 (kod) and 0x20 (limited) flags are cleared unless the last packet from this address triggered a rate control response.
+command, however 0x400 (kod) and 0x20 (limited) flags are cleared unless
+the last packet from this address triggered a rate control response.
.It Ic r
Rate control indicator, either
a period,
@@ -431,27 +483,15 @@ Packets received from this address.
.It Ic rport
Source port of last packet from this address.
.It Ic remote address
-DNS name, numeric address, or address followed by
+host or DNS name, numeric address, or address followed by
claimed DNS name which could not be verified in parentheses.
.El
-.It Ic mreadvar assocID assocID Oo Ar variable_name Ns Oo = Ns Ar value Oc Oc ...
-.It Ic mrv assocID assocID Oo Ar variable_name Ns Oo = Ns Ar value Oc Oc ...
-Perform the same function as the
-.Ic readvar
-command, except for a range of association IDs.
-This range is determined from the association list cached by the most recent
-.Ic associations
-command.
-.It Ic opeers Xo
-.Oo Ic \-4 |
-.Ic \-6
-.Oc
-.Xc
+.It Ic opeers Op Fl 4 | Fl 6
Obtain and print the old\-style list of all peers and clients showing
-.Ar dstadr
-(associated with any given IP version),
+.Cm dstadr
+(associated with the given IP version),
rather than the
-.Ar refid .
+.Cm refid .
.It Ic passociations
Perform the same function as the
.Ic associations
@@ -463,28 +503,32 @@ Display a list of peers in the form:
.Bl -tag -width "something" -compact -offset indent
.It Variable
Description
-.It Ic [tally]
+.It Cm [tally]
single\-character code indicating current value of the
.Ic select
field of the
.Lk decode.html#peer "peer status word"
-.It Ic remote
+.It Cm remote
host name (or IP number) of peer.
-The value displayed will be truncated to 15 characters unless the
+The value displayed will be truncated to 15 characters unless the
+.Nm
.Fl w
-flag is given, in which case the full value will be displayed
-on the first line,
-and the remaining data is displayed on the next line.
-.It Ic refid
-association ID or
+option is given, in which case the full value will be displayed
+on the first line, and if too long,
+the remaining data will be displayed on the next line.
+.It Cm refid
+source IP address or
.Lk decode.html#kiss "'kiss code"
-.It Ic st
-stratum
-.It Ic t
+.It Cm st
+stratum: 0 for local reference clocks, 1 for servers with local
+reference clocks, ..., 16 for unsynchronized server clocks
+.It Cm t
.Ic u :
unicast or manycast client,
.Ic b :
broadcast or multicast client,
+.Ic p :
+pool source,
.Ic l :
local (reference clock),
.Ic s :
@@ -495,115 +539,135 @@ manycast server,
broadcast server,
.Ic M :
multicast server
-.It Ic when
-sec/min/hr since last received packet
-.It Ic poll
-poll interval (log2 s)
-.It Ic reach
+.It Cm when
+time in seconds, minutes, hours, or days since the last packet
+was received, or
+.Ql \&\-
+if a packet has never been received
+.It Cm poll
+poll interval (s)
+.It Cm reach
reach shift register (octal)
-.It Ic delay
+.It Cm delay
roundtrip delay
-.It Ic offset
+.It Cm offset
offset of server relative to this host
-.It Ic jitter
-jitter
+.It Cm jitter
+offset RMS error estimate.
.El
-.It Ic apeers
-Display a list of peers in the form:
-.Dl [tally]remote refid assid st t when pool reach delay offset jitter
-where the output is just like the
-.Ic peers
-command except that the
-.Ic refid
-is displayed in hex format and the association number is also displayed.
-.It Ic pstats Ar assocID
-Show the statistics for the peer with the given
-.Ar assocID .
-.It Ic readlist Ar assocID
-.It Ic rl Ar assocID
-Read the system or peer variables included in the variable list.
-.It Ic readvar Ar assocID Ar name Ns Oo Ns = Ns Ar value Oc Oo , ... Oc
-.It Ic rv Ar assocID Ar name Ns Oo Ns = Ns Ar value Oc Oo , ... Oc
-Display the specified variables.
+.It Ic pstats Ar associd
+Display the statistics for the peer with the given
+.Ar associd :
+associd, status, remote host, local address, time last received,
+time until next send, reachability change, packets sent,
+packets received, bad authentication, bogus origin, duplicate,
+bad dispersion, bad reference time, candidate order.
+.It Ic readlist Op Ar associd
+.It Ic rl Op Ar associd
+Display all system or peer variables.
+If the
+.Ar associd
+is omitted, it is assumed to be zero.
+.It Ic readvar Op Ar associd Ar name Ns Oo Ns = Ns Ar value Oc Op , ...
+.It Ic rv Op Ar associd Ar name Ns Oo Ns = Ns Ar value Oc Op , ...
+Display the specified system or peer variables.
If
-.Ar assocID
+.Ar associd
is zero, the variables are from the
.Sx System Variables
name space, otherwise they are from the
.Sx Peer Variables
name space.
The
-.Ar assocID
+.Ar associd
is required, as the same name can occur in both spaces.
If no
.Ar name
is included, all operative variables in the name space are displayed.
In this case only, if the
-.Ar assocID
-is omitted, it is assumed zero.
+.Ar associd
+is omitted, it is assumed to be zero.
Multiple names are specified with comma separators and without whitespace.
Note that time values are represented in milliseconds
and frequency values in parts\-per\-million (PPM).
Some NTP timestamps are represented in the format
-YYYYMMDDTTTT ,
-where YYYY is the year,
-MM the month of year,
-DD the day of month and
-TTTT the time of day.
+.Ar YYYY Ns Ar MM Ar DD Ar TTTT ,
+where
+.Ar YYYY
+is the year,
+.Ar MM
+the month of year,
+.Ar DD
+the day of month and
+.Ar TTTT
+the time of day.
.It Ic reslist
-Show the access control (restrict) list for
+Display the access control (restrict) list for
.Nm .
+Authentication is required.
.It Ic saveconfig Ar filename
-Write the current configuration,
-including any runtime modifications given with
+Save the current configuration,
+including any runtime modifications made by
.Ic :config
or
.Ic config\-from\-file ,
-to the ntpd host's file
+to the NTP server host file
.Ar filename .
This command will be rejected by the server unless
.Lk miscopt.html#saveconfigdir "saveconfigdir"
appears in the
-.Ic ntpd
+.Xr ntpd 8
configuration file.
.Ar filename
can use
-.Xr strftime
-format specifies to substitute the current date and time, for example,
-.Ic q]saveconfig ntp\-%Y%m%d\-%H%M%S.confq] .
+.Xr date 1
+format specifiers to substitute the current date and time, for
+example,
+.D1 Ic saveconfig Pa ntp\-%Y%m%d\-%H%M%S.conf .
The filename used is stored in system variable
-.Ic savedconfig .
+.Cm savedconfig .
Authentication is required.
+.It Ic sysinfo
+Display system operational summary:
+associd, status, system peer, system peer mode, leap indicator,
+stratum, log2 precision, root delay, root dispersion,
+reference id, reference time, system jitter, clock jitter,
+clock wander, broadcast delay, symm. auth. delay.
+.It Ic sysstats
+Display system uptime and packet counts maintained in the
+protocol module:
+uptime, sysstats reset, packets received, current version,
+older version, bad length or format, authentication failed,
+declined, restricted, rate limited, KoD responses,
+processed for time.
.It Ic timerstats
-Display interval timer counters.
-.It Ic writelist Ar assocID
-Write the system or peer variables included in the variable list.
-.It Ic writevar Ar assocID Ar name Ns = Ns Ar value Op , ...
-Write the specified variables.
+Display interval timer counters:
+time since reset, timer overruns, calls to transmit.
+.It Ic writelist Ar associd
+Set all system or peer variables included in the variable list.
+.It Ic writevar Ar associd Ar name Ns = Ns Ar value Op , ...
+Set the specified variables in the variable list.
If the
-.Ar assocID
+.Ar associd
is zero, the variables are from the
.Sx System Variables
name space, otherwise they are from the
.Sx Peer Variables
name space.
The
-.Ar assocID
+.Ar associd
is required, as the same name can occur in both spaces.
-.It Ic sysinfo
-Display operational summary.
-.It Ic sysstats
-Print statistics counters maintained in the protocol module.
+Authentication is required.
.El
.Ss Status Words and Kiss Codes
The current state of the operating program is shown
in a set of status words
maintained by the system.
Status information is also available on a per\-association basis.
-These words are displayed in the
-.Ic rv
+These words are displayed by the
+.Ic readlist
and
-.Ic as
+.Ic associations
commands both in hexadecimal and in decoded short tip strings.
The codes, tips and short explanations are documented on the
.Lk decode.html "Event Messages and Status Words"
@@ -620,58 +684,59 @@ They are now displayed, when appropriate,
in the reference identifier field in various billboards.
.Ss System Variables
The following system variables appear in the
-.Ic rv
+.Ic readlist
billboard.
Not all variables are displayed in some configurations.
+.Pp
.Bl -tag -width "something" -compact -offset indent
.It Variable
Description
-.It Ic status
+.It Cm status
.Lk decode.html#sys "system status word"
-.It Ic version
+.It Cm version
NTP software version and build time
-.It Ic processor
+.It Cm processor
hardware platform and version
-.It Ic system
+.It Cm system
operating system and version
-.It Ic leap
+.It Cm leap
leap warning indicator (0\-3)
-.It Ic stratum
+.It Cm stratum
stratum (1\-15)
-.It Ic precision
+.It Cm precision
precision (log2 s)
-.It Ic rootdelay
+.It Cm rootdelay
total roundtrip delay to the primary reference clock
-.It Ic rootdisp
+.It Cm rootdisp
total dispersion to the primary reference clock
-.It Ic peer
-system peer association ID
-.It Ic tc
-time constant and poll exponent (log2 s) (3\-17)
-.It Ic mintc
-minimum time constant (log2 s) (3\-10)
-.It Ic clock
-date and time of day
-.It Ic refid
-reference ID or
+.It Cm refid
+reference id or
.Lk decode.html#kiss "kiss code"
-.It Ic reftime
+.It Cm reftime
reference time
-.It Ic offset
-combined offset of server relative to this host
-.It Ic sys_jitter
+.It Ic clock
+date and time of day
+.It Cm peer
+system peer association id
+.It Cm tc
+time constant and poll exponent (log2 s) (3\-17)
+.It Cm mintc
+minimum time constant (log2 s) (3\-10)
+.It Cm offset
+combined offset of server relative to this host
+.It Cm frequency
+frequency drift (PPM) relative to hardware clock
+.It Cm sys_jitter
combined system jitter
-.It Ic frequency
-frequency offset (PPM) relative to hardware clock
-.It Ic clk_wander
+.It Cm clk_wander
clock frequency wander (PPM)
-.It Ic clk_jitter
+.It Cm clk_jitter
clock jitter
-.It Ic tai
+.It Cm tai
TAI\-UTC offset (s)
-.It Ic leapsec
+.It Cm leapsec
NTP seconds when the next leap second is/was inserted
-.It Ic expire
+.It Cm expire
NTP seconds when the NIST leapseconds file expires
.El
The jitter and wander statistics are exponentially\-weighted RMS averages.
@@ -685,98 +750,102 @@ depending on the particular Autokey dance:
.Bl -tag -width "something" -compact -offset indent
.It Variable
Description
-.It Ic host
+.It Cm host
Autokey host name for this host
-.It Ic ident
+.It Cm ident
Autokey group name for this host
-.It Ic flags
+.It Cm flags
host flags (see Autokey specification)
-.It Ic digest
+.It Cm digest
OpenSSL message digest algorithm
-.It Ic signature
+.It Cm signature
OpenSSL digest/signature scheme
-.It Ic update
+.It Cm update
NTP seconds at last signature update
-.It Ic cert
+.It Cm cert
certificate subject, issuer and certificate flags
-.It Ic until
+.It Cm until
NTP seconds when the certificate expires
.El
.Ss Peer Variables
The following peer variables appear in the
-.Ic rv
+.Ic readlist
billboard for each association.
Not all variables are displayed in some configurations.
+.Pp
.Bl -tag -width "something" -compact -offset indent
.It Variable
Description
-.It Ic associd
-association ID
-.It Ic status
+.It Cm associd
+association id
+.It Cm status
.Lk decode.html#peer "peer status word"
-.It Ic srcadr
+.It Cm srcadr
source (remote) IP address
-.It Ic srcport
+.It Cm srcport
source (remote) port
-.It Ic dstadr
+.It Cm dstadr
destination (local) IP address
-.It Ic dstport
+.It Cm dstport
destination (local) port
-.It Ic leap
+.It Cm leap
leap indicator (0\-3)
-.It Ic stratum
+.It Cm stratum
stratum (0\-15)
-.It Ic precision
+.It Cm precision
precision (log2 s)
-.It Ic rootdelay
+.It Cm rootdelay
total roundtrip delay to the primary reference clock
-.It Ic rootdisp
+.It Cm rootdisp
total root dispersion to the primary reference clock
-.It Ic refid
-reference ID or
+.It Cm refid
+reference id or
.Lk decode.html#kiss "kiss code"
-.It Ic reftime
+.It Cm reftime
reference time
-.It Ic reach
+.It Cm rec
+last packet received time
+.It Cm reach
reach register (octal)
-.It Ic unreach
+.It Cm unreach
unreach counter
-.It Ic hmode
+.It Cm hmode
host mode (1\-6)
-.It Ic pmode
+.It Cm pmode
peer mode (1\-5)
-.It Ic hpoll
+.It Cm hpoll
host poll exponent (log2 s) (3\-17)
-.It Ic ppoll
+.It Cm ppoll
peer poll exponent (log2 s) (3\-17)
-.It Ic headway
+.It Cm headway
headway (see
.Lk rate.html "Rate Management and the Kiss\-o'\-Death Packet" )
-.It Ic flash
+.It Cm flash
.Lk decode.html#flash "flash status word"
-.It Ic offset
+.It Cm keyid
+symmetric key id
+.It Cm offset
filter offset
-.It Ic delay
+.It Cm delay
filter delay
-.It Ic dispersion
+.It Cm dispersion
filter dispersion
-.It Ic jitter
+.It Cm jitter
filter jitter
-.It Ic ident
-Autokey group name for this association
-.It Ic bias
+.It Cm bias
unicast/broadcast bias
-.It Ic xleave
+.It Cm xleave
interleave delay (see
.Lk xleave.html "NTP Interleaved Modes" )
.El
The
-.Ic bias
+.Cm bias
variable is calculated when the first broadcast packet is received
after the calibration volley.
-It represents the offset of the broadcast subgraph relative to the unicast subgraph.
+It represents the offset of the broadcast subgraph relative to the
+unicast subgraph.
The
-.Ic xleave
+.Cm xleave
variable appears only for the interleaved symmetric and interleaved modes.
It represents the internal queuing, buffering and transmission delays
for the preceding packet.
@@ -786,71 +855,73 @@ additional peer variables are displayed, including the following:
.Bl -tag -width "something" -compact -offset indent
.It Variable
Description
-.It Ic flags
+.It Cm flags
peer flags (see Autokey specification)
-.It Ic host
+.It Cm host
Autokey server name
-.It Ic flags
+.It Cm flags
peer flags (see Autokey specification)
-.It Ic signature
+.It Cm signature
OpenSSL digest/signature scheme
-.It Ic initsequence
-initial key ID
-.It Ic initkey
+.It Cm initsequence
+initial key id
+.It Cm initkey
initial key index
-.It Ic timestamp
+.It Cm timestamp
Autokey signature timestamp
+.It Cm ident
+Autokey group name for this association
.El
.Ss Clock Variables
The following clock variables appear in the
-.Ic cv
+.Ic clocklist
billboard for each association with a reference clock.
Not all variables are displayed in some configurations.
.Bl -tag -width "something" -compact -offset indent
.It Variable
Description
-.It Ic associd
-association ID
-.It Ic status
+.It Cm associd
+association id
+.It Cm status
.Lk decode.html#clock "clock status word"
-.It Ic device
+.It Cm device
device description
-.It Ic timecode
+.It Cm timecode
ASCII time code string (specific to device)
-.It Ic poll
+.It Cm poll
poll messages sent
-.It Ic noreply
+.It Cm noreply
no reply
-.It Ic badformat
+.It Cm badformat
bad format
-.It Ic baddata
+.It Cm baddata
bad date or time
-.It Ic fudgetime1
+.It Cm fudgetime1
fudge time 1
-.It Ic fudgetime2
+.It Cm fudgetime2
fudge time 2
-.It Ic stratum
+.It Cm stratum
driver stratum
-.It Ic refid
-driver reference ID
-.It Ic flags
+.It Cm refid
+driver reference id
+.It Cm flags
driver flags
.El
.Sh "OPTIONS"
.Bl -tag
.It Fl 4 , Fl \-ipv4
-Force IPv4 DNS name resolution.
+Force IPv4 name resolution.
This option must not appear in combination with any of the following options:
ipv6.
.sp
-Force DNS resolution of following host names on the command line
+Force resolution of following host names on the command line
to the IPv4 namespace.
.It Fl 6 , Fl \-ipv6
-Force IPv6 DNS name resolution.
+Force IPv6 name resolution.
This option must not appear in combination with any of the following options:
ipv4.
.sp
-Force DNS resolution of following host names on the command line
+Force resolution of following host names on the command line
to the IPv6 namespace.
.It Fl c Ar cmd , Fl \-command Ns = Ns Ar cmd
run a command and exit.
@@ -880,7 +951,7 @@ commands read from the standard input.
numeric host addresses.
.sp
Output all host addresses in dotted\-quad numeric format rather than
-converting to the canonical host names.
+converting to the canonical host names.
.It Fl \-old\-rv
Always output status line with readvar.
.sp
diff --git a/usr.sbin/ntp/doc/sntp.8 b/usr.sbin/ntp/doc/sntp.8
index 238fab7..813bcdd 100644
--- a/usr.sbin/ntp/doc/sntp.8
+++ b/usr.sbin/ntp/doc/sntp.8
@@ -1,11 +1,11 @@
-.Dd March 21 2017
+.Dd February 27 2018
.Dt SNTP 8 User Commands
.Os
.\" EDIT THIS FILE WITH CAUTION (sntp-opts.mdoc)
.\"
.\" $FreeBSD$
.\"
-.\" It has been AutoGen-ed March 21, 2017 at 10:36:52 AM by AutoGen 5.18.5
+.\" It has been AutoGen-ed February 27, 2018 at 05:13:14 PM by AutoGen 5.18.5
.\" From the definitions sntp-opts.def
.\" and the template file agmdoc-cmd.tpl
.Sh NAME
@@ -140,6 +140,11 @@ responses received from servers. If the file does not exist, a
warning message will be displayed. The file will not be created.
.It Fl k Ar file\-name , Fl \-keyfile Ns = Ns Ar file\-name
Look in this file for the key specified with \fB\-a\fP.
+The default
+.Ar file\-name
+for this option is:
+.ti +4
+ /etc/ntp.keys
.sp
This option specifies the keyfile.
\fBsntp\fP will search for the key specified with \fB\-a\fP
OpenPOWER on IntegriCloud