35.3 Configuring an NTP Client

   

NTP client configuration is also made in the /etc/ntp.conf file. An NTP client may be a polling client or a broadcast client. In the cases of a polling client, you provide the server name in the /etc/ntp.conf file.

Configuring a Client to Use Server Polling

A polling client has information about its server and contacts it for time information over a network. A typical /etc/ntp.conf file for a client that is using gama as its timeserver is as shown next .

 server gama driftfile /var/adm/ntp.drift 

Multiple timeservers may be used in the configuration file. The default polling time for the timeserver is once every 64 seconds. At every poll time, drift in the local time and the server time is recorded. If the drift is high, the next polling time is scheduled to occur earlier. If the drift is low, the next polling time is later.

Configuring a Client to Use Server Broadcast

A broadcast client does not contact any server for time information but listens for broadcast time information from a broadcast timeserver. The configuration for the broadcast NTP client is like the following.

 broadcastclient yes driftfile /var/adm/ntp.drift 

Using the ntpdate Command

This command can be used at startup and through cron to synchronize your clock with one or more servers at any given time. If you specify more than one server at the command line, the results are better. The following command corrects local time after consulting two servers.

 ntpdate ben.cs.wisc.edu bigben.cac.washington.edu 

   
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