The NTP (network time protocol) mechanism is a protocol for synchronizing the system time over the network. First, a machine can obtain the time from a server that is a reliable time source. Second, a machine can itself act as a time source for other computers in the network. The goal is twofold—maintaining the absolute time and synchronizing the system time of all machines within a network.
Maintaining an exact system time is important in many situations. The built-in hardware (BIOS) clock does often not meet the requirements of applications like databases. Manual correction of the system time would lead to severe problems because, for example, a backward leap can cause malfunction of critical applications. Within a network, it is usually necessary to synchronize the system time of all machines, but manual time adjustment is a bad approach. xntp provides an mechanism to solve these problems. It continuously adjusts the system time with the help of reliable time servers in the network. It further enables the management of local reference clocks, such as radio-controlled clocks.
xntp is preset to use the local computer clock as a time reference. Using the (BIOS) clock, however, only serves as a fallback for the case that no time source of greater precision is available. SUSE Linux facilitates the configuration of an NTP client with YaST. Use the quick or complex configuration for clients that do no run the SuSEfirewall because they are part of a protected intranet. Both are described in the following.
The easy NTP client configuration (+ ) consists of two dialogs. Set the start mode of xntpd and the server to query in the first dialog. To start xntpd automatically when the system is booted, click . Then specify the . Either click , if you cannot use a local time server, or click to access a second dialog in which to select a suitable time server for your network.
In the detailed server selection dialog, determine whether to implement time synchronization using a time server from your local network () or an Internet-based time server that takes care of your time zone ( ). For a local time server, click to start an SLP query for available time servers in your network. Select the most suitable time server from the list of search results and exit the dialog with . For a public time server, select your country (time zone) and a suitable server from the list under then exit the dialog with . In the main dialog, test the availability of the selected server with and quit the dialog with .
The complex configuration of an NTP client can be accessed under Figure 24.1, “YaST: Configuring an NTP Client”, after selecting the start-up mode as described in the quick configuration.from the main dialog of the module, shown in
In, determine whether xntpd should be started in a chroot jail. This increases the security in the event of an attack over xntpd, because it prevents the attacker from compromising the entire system. sets up the NTP client to get a list of the NTP servers available in your network via DHCP.
The servers and other time sources for the client to query are listed in the lower part. Modify this list as needed with, , and . provides the possibility to view the log files of your client.
Clickto add a new source of time information. In the following dialog, select the type of source with which the time synchronization should be made. The following options are available:
Another dialog enables you to select an NTP server (as
described in Section 24.1.1, “Quick NTP Client Configuration”).
to trigger the synchronization of the time
information between the server and the client when the system is booted.
An input field allows you to specify additional options
for xntpd. Refer to
(part of the
xntp-doc package) for detailed
A peer is a machine to which a symmetric relationship is established: it acts both as a time server and as a client. To use a peer in the same network instead of a server, enter the address of the system. The rest of the dialog is identical to thedialog.
To use a radio clock in your system for the time
synchronization, enter the clock type, unit
number, device name, and other options in this dialog.
Time information and queries can also be transmitted by broadcast in the network. In this dialog, enter the address to which such broadcasts should be sent. Do not activate broadcasting unless you have a reliable time source like a radio controlled clock.
If you want your client to receive its information via broadcast, enter the address from which the respective packets should be accepted in this fields.