1834228 Members
2726 Online
110066 Solutions
New Discussion

NTP

 
Danny Crisp
Frequent Advisor

NTP

Would someone please verify whether my NTP concept is correct and advise me accordingly? My NTP server (HP-UX 11i) is using an external source on the internet for its time. The tail end of the /etc/ntp.conf file on the server reads :-

broadcastclient yes
server 0.uk.pool.ntp.org
server 1.uk.pool.ntp.org
server 2.uk.pool.ntp.org

This that correct?

The following output from ntpd -q

ash.oak-wood.co 0.0.0.0 16 - - 64 0 0.00 0.000 16000.0
nakor.amazing-i 0.0.0.0 16 - - 64 0 0.00 0.000 16000.0
skylar.fbagroup 0.0.0.0 16 - - 64 0 0.00 0.000 16000.0

Is that all that needs to be done?

The tail end of the /etc/ntp.conf file on one of my NTP clients reads: -

fudge 127.127.1.1 stratum 10
server version 3 prefer

This that correct?

The following output from ntpd -q

0.0.0.0 16 u 4 64 0 0.00 0.000 16000.0


8 REPLIES 8
Chauhan Amit
Respected Contributor

Re: NTP

There are two ways Client can get information from Server:
a) 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.

# vi /etc/ntp.conf
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.

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

# vi /etc/ntp.conf
broadcastclient yes
driftfile /var/adm/ntp.drift

Hope this helps.
If you are not a part of solution , then you are a part of problem
Chauhan Amit
Respected Contributor

Re: NTP

Check out this thread as well :

http://forums1.itrc.hp.com/service/forums/bizsupport/questionanswer.do?threadId=981174

-Amit
If you are not a part of solution , then you are a part of problem
Danny Crisp
Frequent Advisor

Re: NTP

Thanks for the replys gents. Have I configurerd my NTP server correctly?
Chauhan Amit
Respected Contributor

Re: NTP

Hello Danny,

There seems some discripency in the configuration:

a) Server Side:

/etc/ntp.conf file on the server should look like

broadcastclient yes
server 0.uk.pool.ntp.org
server 1.uk.pool.ntp.org
server 2.uk.pool.ntp.org


b) Client Side :

#vi /etc/rc.config.d/netdaemons

export NTPDATE_SERVER=
export XNTPD=1
export XNTPD_ARGS=

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.

/etc/ntp.conf file on the client should look like


a) Configuring a Client to Use Server Polling
# vi /etc/ntp.conf
server
driftfile /var/adm/ntp.drift

b)Configuring a Client to Use Server Broadcast

# vi /etc/ntp.conf
broadcastclient yes
driftfile /var/adm/ntp.drift
If you are not a part of solution , then you are a part of problem
Danny Crisp
Frequent Advisor

Re: NTP

Amit,

I have done exactly what you have suggested. However, when I /sbin/rc2.d/disabled/S660xntpd stop then /sbin/rc2.d/disabled/S660xntpd start. The following message apeers: -

1 Jun 15:31:03 ntpdate[22095]: no server suitable for synchronization found

Please advise.
James R. Ferguson
Acclaimed Contributor

Re: NTP

Hi Danny:

The message that no suitable server for synchronization exists often occurs when the difference in time between your time source(s) and your server exceeds 1000 seconds. In that case, to prevent insane time adjustments, NTP gives up.

Adjust your server's time, if this is the case, and stop and restart 'xntpd'.

I suggest that you configure NTP to set the server time to that of its time source(s) during bootup (by configuring the NTPDATE_SERVER variable in '/etc/rc.config.d/netdaemons') and thereafter let NTP run continuously.

Setting your local time forward isn't a problem. Setting time backwards can cause great problems with database recovery, transaction synchronization, logs and cron tasks. Should you need to step the time backwards, having configured the NTPDATE_SERVER variable means that the time the change is made during startup before the time-sensitive things (databases) are started.

Hence, if you need to move time backwards, I would arrange a point where you can simply reboot with the above configuration in place. If your local time is behind true time, you can simply step (with 'date mmddhhmm') the time to very near what is correct and thereafter let NTP synchronize your clock.

Regards!

...JRF...
Bill Hassell
Honored Contributor

Re: NTP

Before starting NTP, always run ntpq -p to see that your NTP sources are reachable. ntpq will query the remote servers and report back on their sources for time sync. Until ntpq can report back on remote server status, NTP is non-functional. (it is not uncommon for a network administrator to disable the NTP port in a firewall, not recommended, but still common).

As mentioned, you'll get no sync if your local time is way off (more than 10 minutes). As mentioned, you can 'jump' the time with ntpdate but you must make sure the jump will not affect your current applications. The simplest way is to manually set the date/time to something close and then start xntpd. Always check syslog -- no server means NTP is not working.


Bill Hassell, sysadmin
rick jones
Honored Contributor

Re: NTP

Kudos though for configuring more than one source of time - all too many people don't configure more than one, which is plusungood.
there is no rest for the wicked yet the virtuous have no pillows