Operating System - HP-UX
1825002 Members
2650 Online
109678 Solutions
New Discussion юеВ

Need to enable time udp on Port 123 -- HP 11.0

 
SOLVED
Go to solution
Debbie Fleith
Regular Advisor

Need to enable time udp on Port 123 -- HP 11.0

On our HP-11.0 system, I have time udp services running on port 37 only. (I'm looking at /etc/services for this info).

I need to enable time udp on Port 123 for a new application. Where/how do I do this?
5 REPLIES 5
Rich Wright
Trusted Contributor

Re: Need to enable time udp on Port 123 -- HP 11.0

Look in your /etc/ntp.conf file.
You may also want to look at /etc/rc.config.d/netdaemons
RAC_1
Honored Contributor
Solution

Re: Need to enable time udp on Port 123 -- HP 11.0

time 37/udp timeserver #
Change it to
time 123/udp timeserver #

Make sure no other application is using udp -
123 (NTP uses udp port 123)

And make sure you have this line in /etc/inetd.conf file

time dgram udp nowait root internal

There is no substitute to HARDWORK
Jeff Schussele
Honored Contributor

Re: Need to enable time udp on Port 123 -- HP 11.0

Hi Debbie,

Port 37 TCP or UDP is the timeserver port specified in RFC-868 which spells out how two systems can exchange time.
It is not the same as NTP (Network Time Protocol) which defines how a specific server can syncronize any agent system allowed to communicate to it on port 123/UDP.

You shouldn't need to change *anything* in the /etc/services file. Just set up the /etc/ntp.conf file by pointing it to a valid NTP server & start the xntpd daemon. Of course you need to have a valid "master" time server to keep your local time server in sync so it will keep it's agents synced.

Rgds,
Jeff

PERSEVERANCE -- Remember, whatever does not kill you only makes you stronger!
Debbie Fleith
Regular Advisor

Re: Need to enable time udp on Port 123 -- HP 11.0

How do I find a valid master time server for our area?
Bill Hassell
Honored Contributor

Re: Need to enable time udp on Port 123 -- HP 11.0

The easy answer (to find time servers) is http://ntp.org but NTP is designed to work with time servers all over a large, fast network. First, always pick 3 to 5 different servers. This allows NTP to fu=ine tune the exact time to milliseconds of accuracy.

To configure NTP, start by determining whether your firewall is already configured as an NTP server for your company. If so, then this will be your NTP time server. If not, then determine whether NTP port 123 has been opened on the firewall for your machine by using ntpq as in:

ntpq -p ntp-cup.external.hp.com

You'll see something like this:

ntpq -p ntp-cup.external.hp.com
remote refid st t when poll reach delay offset disp
==============================================================================
*PALISADE(1) .GPS. 0 l 3 32 377 0.00 0.007 0.02
+bigben.cac.wash .USNO. 1 u 11 128 377 37.96 -3.183 1.57
xclepsydra.dec.c .GPS. 1 u 292 1024 377 94.65 -32.820 19.71
192.5.5.250 gps.laguna.vix. 2 - 669d 1024 0 14.28 4.984 16000.0
+tick.ucla.edu .PSC. 1 u 120 128 377 23.70 -3.506 2.52
mx1.mncap.org .GPS. 1 u 63 64 76 121.61 -17.100 1882.46

(the alignment for the columns is incorrect due to the proportional font used in the ITRC Forums). The above data is explaining the state of the remote server and it's time sources. If instead you see an error message saying that the request timed out or server not responding, your firewall is preventing port 123 from getting through.

Once you get ntpq -p working (you can test other Internet time servers this way), setup the /etc/ntp.conf file. Here's a sample:

server ntp1.usno.navy.mil # US Naval Observatory
server ntp2.usno.navy.mil # US Naval Observatory
server tick.jrc.us # Jensen Research Center
server ntp-cup.external.hp.com # HP - Cupertino, CA
server bonehed.lcs.mit.edu # MIT, Boston

server 127.127.1.0 # local clock
fudge 127.127.1.0 stratum 10 # backup clock (internal)

driftfile /etc/ntp.drift # path for drift file


You can replace the very lengthy /etc/ntp.conf file with the above. If you ever need the original ntp.conf file, like most /etc/files, it is found in /usr/newconfig/etc. Now edit /etc/rc.config.d/netdaemons and change:

export NTPDATE_SERVER="tock.usno.navy.mil"
export XNTPD=1

Now before you sync your server, make sure you don't have any time-critical applications running like a database. Now start NTP with the command: /sbin/init.d/xntpd start

This will run ntpdate and set (change) your time to match the entry above for NTPDATE_SERVER. Then it runs xntpd which will slowly adjust the clock based on all the info from the time sources in /etc/ntp.conf. Just to be sure, look at the end of syslog.log to see that all is well.

And you're done. NTP is a start-and-forget protocol. It just works...and your HP-UX system is now a time server for the rest of your company. Just have the other machines point to your server for the current time. Don't put the same ntp.conf file in the other machines. You get very accurate sources of time for free, but create an NTP stratum so your server is the only one contacting the external servers. Then your server distributes timesync to everyone else in your company.


Bill Hassell, sysadmin