Operating System - HP-UX
1822143 Members
3889 Online
109640 Solutions
New Discussion юеВ

How to setup and configure NTP?

 
SOLVED
Go to solution
Ngoh Chean Siung
Super Advisor

How to setup and configure NTP?

Dear all,
May I know the step by step on how to use NTP feature? Currently I have 2 HP-UX servers named Pluto and Jupiter (ver 11i & ver 11.0). How to configure the Pluto as the master and Jupiter as the slave in order these 2 servers will have the same time?

What do I need to prepare first before start to configure in these 2 servers?

Thanks for anyone who can give me some guideline...
22 REPLIES 22
KCS_1
Respected Contributor

Re: How to setup and configure NTP?

Hi,

This is a procedure how to configure the NTP on HP-UX 11.x.

Have a look at attached file.



Easy going at all.
Sanjay Kumar Suri
Honored Contributor

Re: How to setup and configure NTP?

Check this link:

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

sks
A rigid mind is very sure, but often wrong. A flexible mind is generally unsure, but often right.
Vijaya Kumar_3
Respected Contributor

Re: How to setup and configure NTP?

There is a nice overview of the process at here

http://docs.hp.com/hpux/onlinedocs/B2355-90685/B2355-90685.html
Known is a drop, unknown is ocean - visit me at http://vijay.theunixplace.com
Sanjay Kumar Suri
Honored Contributor

Re: How to setup and configure NTP?

Some notes:

Configuring an NTP Server

1. Modify the /etc/rc.config.d/netdaemons file to configure xntpd daemon. Set XNTPD=1.
export NTPDATE_SERVER=
export XNTPD=1
export XNTPD_ARGS=

2. Modify /etc/TIMEZONE file. See /usr/lib/tztab for a list of all available time zones.
TZ=CST6CDT
export TZ

3. Modify /etc/ntp.conf file and define NTP server.

4. Run the xntpd daemon manually. #/sbin/init.d xntpd start

5. Wait. It could take up to 6 minutes for the xntpd daemon to start.

6. Verify the NTP server configuration (and its association with peer servers) by executing the command: #ntpq -p

Configuring an NTP Client

1. Modify the /etc/rc.config.d/netdaemons file on all clients and servers.
export NTPDATE_SERVER=├Г┬в├В ├В server1 server2├Г┬в├В ├В
export XNTPD=1
export XNTPD_ARGS=

2. Modify /etc/TIMEZONE file. See /usr/lib/tztab for a list of all available time zones.
TZ=CST6CDT
export TZ

3. Modify /etc/ntp.conf file and define NTP client.

4. Run the xntpd daemon manually. #/sbin/init.d xntpd start
Wait. It could take up to 6 minutes for the xntpd daemon to establish an association with the corresponding NTP servers and peers.

6. Verify the NTP server configuration (and its association with peer servers) by executing the command: #nt
A rigid mind is very sure, but often wrong. A flexible mind is generally unsure, but often right.
Steven E. Protter
Exalted Contributor

Re: How to setup and configure NTP?

Test configuration with:

ntpq -p

SEP

Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Ngoh Chean Siung
Super Advisor

Re: How to setup and configure NTP?

From the Sanjay's reply, there is one part I not very clear after the statement export NTPDATE_SERVER due to strange characters.

Configuring an NTP Client

1. Modify the /etc/rc.config.d/netdaemons file on all clients and servers.
export NTPDATE_SERVER=├Г ├В┬в├Г ├В ├Г ├В server1 server2├Г ├В┬в├Г ├В ├Г ├В
export XNTPD=1
export XNTPD_ARGS=

Beside that, is the solution provided enable the Jupiter server (as slave/client) follow the time on the Pluto server (as master)? Actually these 2 servers are performing different transaction but have data crossin
Sanjay Kumar Suri
Honored Contributor

Re: How to setup and configure NTP?

Sorry Sir.

export NTPDATE_SERVER='server1 server2'

In your case you have to enter:

export NTPDATE_SERVER='Pluto'

sks
A rigid mind is very sure, but often wrong. A flexible mind is generally unsure, but often right.
Sanjay Kumar Suri
Honored Contributor

Re: How to setup and configure NTP?

More inputs:

In case you are using a server that uses its internal clock, its ntp.conf should look like:

server 127.127.1.1
fudge 127.127.1.1 stratum=10

For the clients you can have the entries in ntp.conf:

broadcastclient=yes
driftfile /etc/ntp.drift

or

server server_name
driftfile /etc/ntp.drift

sks
A rigid mind is very sure, but often wrong. A flexible mind is generally unsure, but often right.
Ngoh Chean Siung
Super Advisor

Re: How to setup and configure NTP?

What is the main different between ntp and xntp? Which method is more suitable for my case? Because the solution that Sanjay proposed is based on ntp. I searched though internet and found that there is another solution that applied xntp method (the configuration is through SAM). So, which one that I should follow???

Thanks for anyone who can clear my doubt...
Shaikh Imran
Honored Contributor
Solution

Re: How to setup and configure NTP?

Hi,
ntp is the network time protocol service while xntpd is nothing but the daemon which is must to run the ntp service.
In Your case.
Login as root to Pluto server and:
1) Edit " /etc/rc.config.d/netdaemons " file on the Pluto Server as follows : export NTPDATE_SERVER=
export XNTPD=1
export XNTPD_ARGS=

2)Edit " /etc/ntp.conf " file in the pluto server with the below entries at the end of the file :

server
3) To Maually start xntpd daemon : # /sbin/init.d/xntpd start
ON Jupiter side :

1)Edit " /etc/rc.config.d/netdaemons " file on the clients side as follows :
export NTPDATE_SERVER=
export XNTPD=1
export XNTPD_ARGS=
2)Edit " /etc/ntp.conf " file on the Jupiter server and add below entries at the end of the file:
server
3)#/sbin/init.d/xntpd start

In case the time synchronisation doesn't start it will definately start at the reboot of respective servers. 95 % it will start w/o reboot.
Regards,


Imran Shaikh
I'll sleep when i am dead.
Mauro Gatti
Valued Contributor

Re: How to setup and configure NTP?

Check also www.ntp.org. You will find public stratum 1 and 2 ntp server.

RGDS


Mauro
Ubi maior, minor cessat!
Ngoh Chean Siung
Super Advisor

Re: How to setup and configure NTP?

Just have one part that I quite confuse here which is about the ntp.conf

I'm going to implement the ntp based on the server that using its own internal clock and others client is following this server's time.

Master - Pluto (HP-UX 11.0)
Client - Jupiter (HP-UX 11i) & Mercury (HP-UX 11.0 )

1) ntp.conf at SERVER (Pluto)
From Sanjay's solution, inside the ntp.conf, he proposed me to put in these 2 lines which are shown as below

server 127.127.1.1
fudge 127.127.1.1 stratum=10

While from Shaikh's solution, he proposed me to put in

server

2) ntp.conf at CLIENT (Jupiter)
From Sanjay's solution, inside the ntp.conf, he proposed me to put in

server server_name
driftfile /etc/ntp.drift

What's these 2 lines for? For my case, I should put server pluto instead of server server_name. Am I right?

From Shaikh's solution, he proposed me to put in

server

Sorry for the long question. But really need someone to clear my doubt. Thanks......
Shaikh Imran
Honored Contributor

Re: How to setup and configure NTP?

Hi,
Don't get confused do as per only one reply at a time.If u try do mix all u will be in trouble.
So,Pls don't get confused.
ntp.conf file is available in /etc directory.
put
export server 172.25.10.1

( i.e. say 172.25.10.1 is the IP address of the Pluto )
This will be common in both the ntp.conf files of server as well as client.

Regards,

I'll sleep when i am dead.
Sanjay Kumar Suri
Honored Contributor

Re: How to setup and configure NTP?

1. We put following lines in ntp.conf for a time server that uses its own internal clock.

server 127.127.1.1
fudge 127.127.1.1 stratum=10

The IP address (127.127.1.1) is psuedo IP address that identifies that local system as a time source.

2. In case of client following entries are right

server pluto (
driftfile /etc/ntp.drift

This means that the client will poll a specific NTP server (Pluto). I think you can put IP address as well.

The driftfile is used to track differences between the client's time and the server's time. As the driftfile stablizes it will be used more frequently to adjust the client's time and the server will be polled less frequently.

Hope this clears.

sks
A rigid mind is very sure, but often wrong. A flexible mind is generally unsure, but often right.
Ngoh Chean Siung
Super Advisor

Re: How to setup and configure NTP?

One more question.

Must I configure all the settings through console? Or, can I use normal pc and telnet to our server by login as "root" to configure all the settings?

regards...
Robert-Jan Goossens
Honored Contributor

Re: How to setup and configure NTP?

Hi,

You can login trough a normal rlogin/telnet session, only if you wish to change the local ipaddress you will have to login from console.

Regards,
Robert-Jan
Sanjay Kumar Suri
Honored Contributor

Re: How to setup and configure NTP?

There is no need that you have to be on console. You can use telnet and configure NTP.

SAM also provides options to configure NTP.

sks

A rigid mind is very sure, but often wrong. A flexible mind is generally unsure, but often right.
Ngoh Chean Siung
Super Advisor

Re: How to setup and configure NTP?

Still have some questions as below:-

1) If Pluto is NTP server and both Mercury and Jupiter are client. If Pluto down, will it caused traffic congested when both client waiting for Pluto to responce?

Any command to monitor traffic on server?

2) What is the recommended interval to synchronize time?

3) How to confirm that from both NTP server and client that time synchronization has/has not taken place? From /var/adm/syslog/syslog.log?

4) If we have another client in a far location which needs to refer to the Pluto thru router, any setting needed in router?

5) If lease line down, will the lease line traffic build up due to waiting response from Pluto?

Really appreciate that someone that can clear my doubt. Thanks....
Sanjay Kumar Suri
Honored Contributor

Re: How to setup and configure NTP?

My Answers are:

1. Define high available sever as NTP servers. If Pluto is down I am afraid clients will not be able to update NTP server. You can define another NTP server to overcome such situation.

1a) #ntpq -p

2) The default time interval for xntpd daemon time checking is 64 seconds. At the first check, the delta between the client├в s clock and NTP server├в s clock is recorded and then depending on the time difference, the next time is scheduled. If the time difference is high, then the next time check will occur soon. If the time difference is small, then the next time check will be scheduled further out.

3) Yes from /var/adm/syslog/syslog.log?

4) If NTP broadcast server is used then the client must be on the same subnet.

5) Not sure on this one
A rigid mind is very sure, but often wrong. A flexible mind is generally unsure, but often right.
Ngoh Chean Siung
Super Advisor

Re: How to setup and configure NTP?

Hi Sanjay,

For item 1, if the pluto server down and there is no backup server as the NTP server, that's means the network traffic will be very high due to the clients unable to update the time from NTP server. Am I right? Will it cause the client down or face the problem of slowness in performance due to unable to update time from NTP server?

For item 4, may I know what is meant by NTP broadcast server? Any special settings or ???

regards.

Re: How to setup and configure NTP?

Please find the details for the NTP server configuration

edit the /etc/ntp.conf file in Server Side
add following the entry if you want to use the server internal clock

server 127.127.1.1

and modify the /etc/rc.config.d/netdaemons file
export XNTPD=1

modify the /etc/TIMEZONE file also

and run /sbin/init.d/xntpd startup script

at Client Side
edit ?etc/rc.config.d/netdaemons fiel
export NTPDATE_SERVER=server ip address
export XNTPD=1

modify the /etc/TIMEZONE file

also add the the entry in /etc/ntp.conf in client end

Your Local Serve Name and Ip Address


and run /sbin/init.d/xntpd startup script

wait for NTP to establist the time

and run ntpq -p to query with with server/client