DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH PRINT BOOK
 
Configuring the Network Time Protocol (NTP)

NTP name resolution

The ntpd daemon can specify host names requiring resolution in peer and server statements in the configuration file. This task is actually accomplished by a separate program, ntpres. When the daemon comes across a peer or server statement in the configuration file where the host is identified by name rather than by IP address, it records the relevant information and continues. When the end of the configuration file has been reached and one or more entries requiring name resolution have been found, ntpres is started. The ntpd daemon continues running at the same time to process those hosts with numeric addresses.

The ntpres program attempts to resolve each host name, meaning that it tries to obtain the IP address associated with the named host. If it succeeds in resolving the name, it reconfigures the local host to add the newly resolved host to the list of time servers to be polled. The runtime reconfiguration of the local host is accomplished using the same mode 7 runtime reconfiguration facility that ntpdc uses. If ntpres is at first unable to resolve a hostname, it retries periodically until it succeeds or until it determines that the name cannot be resolved.

There are several configuration requirements if ntpres is to be used. The pathname of the ntpres program must be made known to the daemon with the resolver statement in the configuration file. Also, mode 7 runtime reconfiguration must be enabled with the requestkey statement and a list of valid keys (valid keys are specified in the keys file).

The following fragment might be added to /etc/ntp.conf to accomplish this:

   resolver /etc/ntpres
   keys /etc/ntp.keys
   requestkey 65535
Note that ntpres sends packets to the server with a source address of 127.0.0.1. If you are using the address-and-mask facility in the configuration file, you must take care not to restrict modification requests from this address or ntpres fails.
Next topic: NTP sample scenarios
Previous topic: NTP address and mask facility

© 2003 Caldera International, Inc. All rights reserved.
SCO OpenServer Release 5.0.7 -- 11 February 2003