NTP Backup Server HP-Ux

Hi Can Anyone guide me in how to setup NTP backup server? say if server_A fails then client should automatically adjust time using server_B.

Currently my /etc/ntp.conf file is configured as following
server= server_A
peer=server_B

Will this configuration solve my purpose?

Need Urgent Help :frowning:

Thanks in Advance.

Well, in the man page for xntpd on HP-UX 11.11, I read that:-

This, to me, means that you are agreeing the time between yourself and server_B, i.e. local server can affect server_B. I would expect you can code more than one server statement. On AIX I have:-

broadcastclient
driftfile /etc/ntp.drift
tracefile /etc/ntp.trace
server u-dc-01.*****.co.uk version 3 prefer
server u-dc-02.*****.co.uk version 3 prefer

and that seems to work quite well.

There are other things to consider if your NTP server goes pop and you use this server for other things, such as DNS. You would need an alternate and a suitable timeout setting up.

I hope that this helps,
Robin
Liverpool/Blackburn
UK

1 Like

Thanks for the quick reply.

So if I configure /etc/ntp.conf as

server=server_A
server=server_B

now if server_A goes down, will client automatically adjust the time using server_B?

Moreover, does it require any other config changes?

Your syntax is wrong. There are no equals signs.

server server_A
server server_B

We have one NTP server on the Intranet which has an external connection through the firewall to multiple time servers on the Internet. This is not perfect but it works. For resilience we should have at least two more time servers such that the NTP algorithms can determine the correct time.

One basic point about using NTP is that you should run your server clock in UTC and ensure that the correct $TZ (timezone) variable is set for any processes run by users or background processes.

1 Like

Thanks methyl.

I will change the configuraitons accodringly.

Be sure to setup /etc/rc.config.d/netdaemons

With values in :

export NTPDATE_SERVER=yourntp
export XNTPD=1

This way, if server is rebooted, it will run ntpdate command against your ntp server during boot to sync time before services are started.

1 Like

Thanks peasnat.

I have configured netdaemons config file.

However NTPDATE_SERVER address have the address of primary time server only.

 
/etc/ntp.conf file
server SERVER_A prefer
server SERVER_B
 
netdaemons file
export NTPDATE_SERVER=SERVER_A
export XNTPD=1

Now say SERVER_A goes down and xntpd uses SERVER_B for time synchronization then I need to manually change the netdaemons file and update the NTPDATE_SERVER=SERVER_B.

Please confirm above understanding.

Hi Sai,

need some details :-

  1. Are u making two NTP server, using those clients will sync.
  2. If you are configuring NTP client only, the ur configuration is right now. u just need to run /sbin/init.d/xntpd stop and the start. ur client will sync everytime to available NTP server. (no manual intervention needed)
  3. after this run ntpq -np (after 3 -4 min). ur NTP client will be sync.

Hi Amit,

Thanks for the reply.

Yes I want to make two ntp servers using which clients will sync, main purpose here is if one of the ntp server fails,client should automatically sync using another server.

I can confirm that placing space separated values work (machines boots and gets the proper time )

This was done on HPVM host HPUX v2, with SERVER_A alive and this setup :

export NTPDATE_SERVER="SERVER_A SERVER_B"

Now i can't test if SERVER_A is not alive, but i belive it should work.

1 Like

Thanks Peasnt!!!

I will configure the netdaemons file accordingly.

Will post the configurations and findings after testing it.

1 Like

Hi Experts,

I configured ntp as below, and it is working fine now.

 
/etc/ntp.conf
server server1 minpoll 1 prefer
server server2 minpoll 1
driftfile /etc/ntp.drift
 
netdaemons
export NTPDATE_SERVER="server1 server2"
export XNTPD=1
export XNTPD_ARGS=

Thank you so much your help.