XNTPD is an operating system daemon that sets and maintains the system time of day in synchronization with Internet standard time servers.
The daemon can operate in any of several modes, including client-server and broadcast/multicast mode, as described in RFC-1305. A broadcast/multicast client can discover remote servers, compute client-server propagation delay correction factors, and configure itself automatically. This makes it possible to deploy numerous workstations without specifying configuration details specific to the local environment.
Ordinarily, XNTPD reads the ntp.conf configuration file at startup in order to determine the synchronization sources and operating modes. It is also possible to specify a working, although limited, configuration entirely on the command line, obviating the need for a configuration file. This might be particularly appropriate when the local host is to be configured as a broadcast or multicast client, with all peers being determined by listening to broadcasts at run time.
Various internal XNTPD variables can be displayed and configuration options altered while the daemon is running using the NTPQ and XNTPDC utility programs.
Usage:
XNTPD [ -aAbdhm ] [ -c configfile ] [ -f driftfile ] [ -k keyfile ] [ -l logfile ] [-n log file limit] [ -p pidfile ] [ -r broadcastdelay ] [ -s statsdir ] [ -t trustkey ] [ -v variable ] [ -V defaultvariable ] [-T noncp/slp ] [-S]
Table 6-7 XNTPD Parameters
Parameter |
Description |
---|---|
-a |
Enables authentication mode. The default is enabled, so this option is obsolete now. |
-A |
Disables authentication mode. |
-b |
Synchronizes by using NTP broadcast messages. |
-c configfile |
Specifies the name and path of the configuration file. NOTE:Novell® Remote Manager does not understand this user-defined configuration file, so it opens the default sys:\etc\ntp.conf file. |
-d |
Specifies the debugging mode. This flag might occur multiple times, with each occurrence indicating greater detail of display. |
-f driftfile |
Specifies the name and path of the drift file. |
-h |
Displays the help. |
-k keyfield |
Specifies the name and path of the file containing the NTP authentication keys. |
-l logfile |
Specifies the name and path of the log file. The default is the system log facility. NOTE:If the -S option (see -S for more information) is enabled along with -l option, the NTPDate events are also logged into the log file (ntpdate.log). |
-n |
Indicates the log file limit. |
-m |
Synchronizes by using NTP multicast messages on the IP multicast group address 224.0.1.1 (requires multicast kernel). |
-p pidfile |
Specifies the name and path to record the daemon’s process ID. |
-r broadcastdelay |
Specifies the default propagation delay from the broadcast/multicast server and this computer. This is used only if the delay cannot be computed automatically by the protocol. |
-s statsdir |
Specifies the directory path for files created by the statistics facility. |
-t key |
Adds a key number to the trusted key list. |
-v variable |
Adds a system variable. |
-V defaultvariable |
Adds a system variable listed by default. |
-T noncp |
Provides Timesync migration or backward compatibility options. Prevents running of the NCP™ engine on XNTPD, which services all NCP time requests from NetWare® 4, Novell clients, and dsrepair. |
-T slp |
Enables NTP to automatically discover SLP advertising a Timesync SINGLE server on the network and add the Timesync SINGLE server’s IP address in the ntp.conf configuration file as a time provider. WARNING:Do not use this option in the sys:\system\timeserv.ncf file. |
-S |
XNTPD steps the clock to the time of the best available server by calling NTPDate with the server list from the NTP configuration file (ntp.conf). This sets the clock status to "nearly in sync", meaning that time is synchronized in as close as 0.5 seconds. This basically helps XNTPD to synchronize† quickly. |
The XNTPD configuration file (ntp.conf) is read at initial startup in order to specify the synchronization sources, modes and other related information. It is installed in the sys:\system directory, but could be installed elsewhere (see -c configfile).
The ntp.conf looks similar to the following:
# sys:\etc\ntp.conf
#
# This configuration file is used by xntpd.nlm.
# xntpd.nlm is the NTPv3 Time Daemon used for
# synchronization of servers.
#
# Note : Please make a copy of
# this file before modification
# for further reference.
#
# Local Clock used as Time Provider - Self Synchronized Mode
#
# server 127.127.1.0
# fudge 127.127.1.0 stratum 3
#
# Client-Server Mode
# <IP Address> : Time provider IP address
#
# Time Provider
# server <IP Address>
#
# Time Provider
# server <IP Address>
#
# Peer-Peer Mode
# <IP Address> : Peer IP address
#
# peer <IP Address>
#
# To Configure this NetWare box to Broadcast the "time service"
#
# broadcast <Subnet broadcast Address> key <key_id>
# or
# broadcast 255.255.255.255 key <key_id>
#
# To Configure this NetWare box to Multicast the "time service"
#
# broadcast 224.0.1.1 key <key_id>
#
# To Configure NTP Broadcast Client
#
# broadcastclient
#
# To Configure NTP Multicast Client
#
# multicastclient
#
# Authentication Options
#
# enable auth monitor
# keys sys:\etc\ntp.keys
# trustedkey 0
# requestkey 0
# controlkey 0
#
# Backward Compatibility with Timesync
#
# Switch off the Timesync NCP service
# noncp
# Step the time to the source clock for slewing
# stepclock
#
# Monitoring/Logging Options
#
driftfile sys:\system\drift.ntp
# statsdir sys:\system\
# logfile sys:\system\ntp.log
# filegen peerstats file peerstat type none enable
# filegen loopstats file loopstat type none enable
# filegen clockstats file clkstat type none enable
Configuration commands consist of an initial keyword followed by a list of arguments, some of which can be optional, separated by white space. Commands cannot be continued over multiple lines. Arguments can be host names, host addresses written in numeric, dotted-quad form, integers, floating point numbers (when specifying times in seconds) and text strings. Optional arguments are delimited by [ ] in the following descriptions, while alternatives are separated by |. The notation [ ... ] means an optional, indefinite repetition of the last item before the [ ... ].
See the following for configuration and control options. Although there is a rich set of options available, the only required option is one or more server, peer, or broadcast commands described in Configuration Options.
sys:\etc\ntp.conf. The default name of the configuration file.
sys:\system\ntp.drift. The default name of the drift file.
sys:\etc\ntp.keys. The default name of the key file.
peer address [ key key ] [ version version ] [ prefer ] [ minpoll minpoll [ maxpoll maxpoll ]
server address [ key key ] [ version version ] [ prefer ]
broadcast address [ key key ] [ version version ] [ ttl ttl ]
These three commands specify the time server name or address to be used and the mode in which to operate. The address can be either a DNS name or a IP address in dotted-quad notation. The peer command specifies that the local server is to operate in symmetric active mode with the remote server. In this mode, the local server can be synchronized to the remote server and, in addition, the remote server can be synchronized by the local server. This is useful in a network of servers where, depending on various failure scenarios, either the local or remote server might be the better source of time.
The server command specifies that the local server is to operate in client mode with the specified remote server. In this mode, the local server can be synchronized to the remote server, but the remote server can never be synchronized to the local server.
The broadcast command specifies that the local server is to operate in broadcast mode, where the local server sends periodic broadcast messages to a client population at the broadcast/multicast address specified. Ordinarily, this specification applies only to the local server operating as a sender; for operation as a broadcast client, see the broadcastclient or multicastclient commands below. In this mode, address is usually the broadcast address on (one of) the local networks or a multicast address assigned to NTP. The IANA organization has assigned the address 224.0.1.1 to NTP; this is presently the only address that should be used.
NOTE:The use of multicast features requires a multicast kernel, which is not yet ubiquitous in vendor products.
For more information on the configuration options, see Table 6-8.
Table 6-8 XNTPD Configuration Options
enable auth | bclient | monitor | pll | pps | stats
disable auth | bclient | monitor | pll | pps | stats
Provides a way to enable or disable various server options. Flags not mentioned are unaffected.
NOTE:All these flags can be controlled remotely by using XNTPDC.
Table 6-9 XNTPD Parameters for Enabling and Disabling Server Options
The XNTPD -S and -T noncp options can also be added in the configuration file as stepclock and noncp respectively.
Table 6-10 Stepclock and Noncp
The NTP standard specifies an extension that provides cryptographic authentication of received NTP packets. This is implemented in XNTPD by using the DES or MD5 algorithms to compute a digital signature, or message digest. The specification allows any one of possibly four billion keys, numbered with 32-bit key identifiers, to be used to authenticate an association. The servers involved in an association must agree on the key and key identifier used to authenticate their messages.
Keys and related information are specified in a key file that should be exchanged and stored by using secure procedures beyond the scope of the protocol. There are three classes of keys involved in the current implementation. One class is used for ordinary NTP associations, another is used for the NTPQ utility program, and the third is used for the XNTPDC utility program.
Table 6-11 XNTPD Authentication Command Options
Parameter |
Description |
---|---|
keys keyfile |
Specifies the filename containing the encryption keys and key identifiers used by XNTPD, NTPQ and XNTPDC when operating in authenticated mode. For ntp.keys file format see ntp.keys. |
trustedkey key [ ... ] |
Specifies the encryption key identifiers that are trusted for the purposes of authenticating peers suitable for synchronization. The authentication procedures require that both the local and remote servers share the same key and key identifier for this purpose, although different keys can be used with different servers. The key arguments are 32-bit unsigned integers. NTP key 0 is fixed and globally known. If meaningful authentication is to be performed, the 0 key should not be trusted. |
requestkey key |
Specifies the key identifier to use with the XNTPDC program, which uses a proprietary protocol specific to this implementation of XNTPD. This program is useful to diagnose and repair problems that affect XNTPD operation. The key argument to this command is a 32-bit unsigned integer. If no requestkey command is included in the configuration file, or if the keys don’t match, such requests are ignored. |
controlkey key |
Specifies the key identifier to use with the NTPQ program, which uses the standard protocol defined in RFC-1305. This program is useful to diagnose and repair problems that affect the XNTPD operation. The key argument to this command is a 32-bit unsigned integer. If no requestkey command is included in the configuration file, or if the keys don’t match, such requests are ignored. |
For DES, the keys are 56 bits long with, depending on type, a parity check on each byte. For MD5, the keys are 64 bits (8 bytes). XNTPD reads its keys from a file specified by using the -k command line option or the keys statement in the configuration file. Although the key number 0 is fixed by the NTP standard (as 56 zero bits) and cannot be changed, one or more of the keys numbered 1 through 15 can be arbitrarily set in the keys file.
The key file uses the same comment conventions as the configuration file. Key entries use a fixed format of the form
keyno type key
where keyno is a positive integer, type is a single character that defines the key format, and key is the key itself.
The key can be given in one of three different formats, controlled by the type character. The three key types, and corresponding formats, are listed in the following table:
Table 6-12 XNTPD Key File Parameters
The keys used by the NTPQ and XNTPDC programs are checked against passwords requested by the programs and entered by hand, so it is generally appropriate to specify these keys in ASCII format.
XNTPD includes a comprehensive monitoring facility suitable for continuous, long-term recording of server and client timekeeping performance. See the statistics commands below for a listing and example of each type of statistics currently supported. Statistics files are managed by using file generation sets and scripts in the ./scripts directory of this distribution. Using these facilities and UNIX cron jobs, the data can be automatically summarized and archived for retrospective analysis.
Table 6-13 XNTPD Monitoring Command Parameters
It is convenient to be able to access the current element of a file generation set by a fixed name. This feature is enabled by specifying link and disabled by using nolink. If link is specified, a hard link from the current file set element to a file without a suffix is created. When there is already a file with this name and the number of links of this file is one, it is renamed appending a dot, the letter C, and the pid of the XNTPD server process. When the number of links is greater than one, the file is unlinked. This allows the current file to be accessed by a constant name.
XNTPD implements a general purpose address-and-mask-based restriction list. The list is sorted by address and by mask, and the list is searched in this order for matches, with the last match found defining the restriction flags associated with the incoming packets. The source address of incoming packets is used for the match, with the 32-bit address being added with the mask associated with the restriction entry and then compared with the entry’s address (which has also been added with the mask) to look for a match.
The restriction facility was implemented in conformance with the access policies for the original NSFnet backbone time servers. Although this facility might be otherwise useful for keeping unwanted or broken remote time servers from affecting your own, it should not be considered an alternative to the standard NTP authentication facility. Source address based restrictions are easily circumvented by a determined cracker.
Table 6-14 XNTPD Access Control Parameters
Table 6-15 Miscellaneous XNTPD Parameters
Most variables used by the NTP protocol can be examined with the XNTPDC (mode 7 messages) and the NTPQ (mode 6 messages). Currently, very few variables can be modified via mode 6 messages. These variables are either created with the setvar directive or the leap warning bits. The leap warning bits can be set in the leapwarning variable up to one month ahead. Both the leapwarning and leapindication variables have a slightly different encoding than the usual leap bits interpretation:
00: The daemon passes the leap bits of its synchronization source (usual mode of operation).
01/10: A leap second is added/deleted (operator forced leap second).
11: Leap information from the synchronization source is ignored (so LEAP_NOWARNING is passed on).