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.
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.
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
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 |