Configuring NTP (Network Time Protocol) on UNIX hosts

(Last modified: 10Mar2003)

This document (10080961) is provided subject to the disclaimer at the end of this document.

fact

NTP

Novell eDirectory 8.7 for AIX

Novell eDirectory 8.7 for Linux

Novell eDirectory 8.7 for Solaris

goal

Configuring NTP (Network Time Protocol) on UNIX hosts

fix

Quick steps to configure NTP on UNIX:

1. Add a time source to your configuration file (ntp.conf).
2. Time stamp your UNIX host with your time source (ntpdate).
3. Start the NTP daemon to keep time current.
4. Check the current time status (ntpq -p).

-------------------------------------------------------------
Detailed steps to configure NTP on UNIX:

1. Add a time source to your configuration file (ntp.conf).
The minimum information needed in the ntp.conf file is the time source server's IP address or DNS hostname. The configuration file locations are:

AIX: /etc/ntp.conf
Linux: /etc/ntp.conf
Solaris: /etc/inet/ntp.conf

A sample ntp.conf file follows:

bash-2.03# cat ntp.conf
server 137.65.1.123

2. Time stamp your UNIX host with your time source (ntpdate).
Use ntpdate to stamp your UNIX host to the current time reported from your time source.

bash-2.03# ntpdate 137.65.1.123
10 Mar 15:30:01 ntpdate[5250]: adjust time server 137.65.1.123 offset -0.001214 sec

The offset value is the difference in time between the time source and your host. If you repeat the command, the offset should be very close to zero (0).

3. Start the NTP daemon to keep time current.
The specific command used to start the NTP daemon for each UNIX platform is listed below:

AIX: /usr/sbin/xntpd
Linux: /etc/rc.d/init.d/ntpd start
Solaris: /etc/init.d/xntpd start

Using Solaris as an example, one would type:

bash-2.03# /etc/init.d/xntpd start

4. Check the current time status (ntpq -p).
Use the ntpq command to confirm that time is in synch.

bash-2.03# ntpq -p
     remote           refid      st t when poll reach   delay   offset    disp
==============================================================================
 137.65.1.123    0.0.0.0         16 -    -   64    0     0.00    0.000 16000.0

bash-2.03# ntpq -p
     remote           refid      st t when poll reach   delay   offset    disp
==============================================================================
 137.65.1.123    78.79.86.76      6 u   14   64    1     0.89   -1.156 15875.0


If the st column has a 16 and delay and offset are 0, and t and when have a dash "-", then the NTP daemon has not made contact with the time source server, and time is not in synch. Once the local UNIX host's NTP daemon makes contact with the time source server, then the st, delay, and offset will be updated. The "when" column shows the time in seconds until the next time synch negotiation takes place.

Additional information can be found at www.ntp.org

document

Document Title: Configuring NTP (Network Time Protocol) on UNIX hosts
Document ID: 10080961
Solution ID: NOVL87757
Creation Date: 10Mar2003
Modified Date: 10Mar2003
Novell Product Class:Novell eDirectory

disclaimer

The Origin of this information may be internal or external to Novell. Novell makes all reasonable efforts to verify this information. However, the information provided in this document is for your information only. Novell makes no explicit or implied claims to the validity of this information.
Any trademarks referenced in this document are the property of their respective owners. Consult your product manuals for complete trademark information.