35.2 Configuring the NTP Server

   

The NTP daemon process is started at boot time. Startup operation of NTP is controlled by the XNTPD variable in the /etc/rc.config.d/netdaemons file. If the value of this variable is set to 1, xntpd is started at boot time. At start time, xntpd reads its configuration file /etc/ntp.conf and configures itself. It can also be started at the command line using the following command.

 /etc/init.d/xntpd start 

A typical /etc/ntp.conf file is shown here.

 server navobs1.gatech.edu server bitsy.mit.edu peer gama broadcast 192.168.2.255 driftfile /var/adm/ntp.drift 

This file shows that xntpd will try the navobs1.gatech.edu and bitsy.mit.edu servers to adjust its time clock. Both of these servers are running at stratum level 1. Another peer server gama is present on the network. This daemon will also broadcast time synchronization messages on the local network for other clients . The drift file is used to track the accuracy of the local clock over time. It is maintained by xntpd and used later to send fewer time synchronization requests to the server.

Some NTP servers may also require authentication from clients. In that case, the client machine maintains the /etc/ntp.keys file for this purpose.

When making any configuration, it must be remembered that the time zone setting on your system must be correct. For example if you are in the eastern daylight time zone, the /etc/TIMEZONE file must contain the EST5EDT time setting.

The activity of NTP can be verified using the ntpq -p command at any time. This command can be run in interactive mode when used without any option and is used as a debugging tool.

Configuring a Server to Use a Radio Clock

A radio broadcast clock is used through an external device that listens to radio signals. This device is usually attached to the system through a serial port. A typical /etc/ntp.conf entry for such a system is shown next .

 server 127.127.4.1 

The first three octets of the server address 127.127.4 tell xntpd to use an external device as the time source. The last octet shows the port number of the serial port to which the device is connected. The device files for the time source are /dev/wwvb1 to /dev/wwvb4 .

Configuring a Server to Use Another Server

Most often, an NTP server is configured to use another server at stratum level 1. In this case, you specify the server name or IP address in the /etc/ntp.conf file. The following entry in the file is used to set bitsy.mit.edu as the source of standard time.

 server bitsy.mit.edu 

Configuring a Server to Use a Local Clock

To configure a server to use its own clock as the standard time source, the following two lines in /etc/ntp.conf are used for the server entry.

 server 127.127.1.1 fudge 127.127.1.1 stratum 8 

The IP address used here is a pseudonumber that tells xntpd to use the local clock as its time source. The fudge line configures a stratum level 8 for the timeserver.


   
Top


HP Certified
HP Certified: HP-UX System Administration
ISBN: 0130183741
EAN: 2147483647
Year: 2000
Pages: 390
Authors: Rafeeq Rehman

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net