Operating System - HP-UX
1819696 Members
3364 Online
109605 Solutions
New Discussion юеВ

NTP server connectivity check

 
Vineesh K N
New Member

NTP server connectivity check

Hi all,

I have an HPUX server and want to configure as NTP client. I have only the IP address of the NTP server. How I can check the connectivity to the NTP server from my server ?

There is a firewall between both and when I tried configure, it returned the error [ntpq: read: Can't assign requested address]

Thanks / Vineesh
10 REPLIES 10
Jeeshan
Honored Contributor

Re: NTP server connectivity check

ping that NTP server.
a warrior never quits
Hemmetter
Esteemed Contributor

Re: NTP server connectivity check

Hi Vineesh,

try

ntpq -np $IP


rgds
HGH
V. Nyga
Honored Contributor

Re: NTP server connectivity check

Hi,

does the NTP server is in a different range of ip address? Then you have to add a route over a gateway to reach this server.

Check 'man route'.

Volkmar
*** Say 'Thanks' with Kudos ***
SKR_1
Trusted Contributor

Re: NTP server connectivity check

Check for the gateway IP and configured it in the file /etc/rc.config.d/netconf.

Thanks

SKR
Mustafa Gulercan
Respected Contributor

Re: NTP server connectivity check

hi vineesh;
if you couldn't ping NTP server, you should talk with your network administrator.
learn the gateway that you can use.
and then add a static route with command route, like as following;

route add [net | host] destination gateway [count]

regards,
mustafa
Vineesh K N
New Member

Re: NTP server connectivity check

Thanks for the reply.

I have a firewall in bw the client and server. Ping is disabled there. As per the firewall team the firewall port is enabled in the firewall. Any way I can that connectivity before scheduling the change to implement the NTP ?

I am not sure about the connectivity check of UDP...

Thanks / Vineesh
Vineesh K N
New Member

Re: NTP server connectivity check

I mean the NTP port is opened in firewall.

Thanks/ Vineesh
Matti_Kurkela
Honored Contributor

Re: NTP server connectivity check

You can use "ntpdate -d " to test connectivity to a NTP server, but the xntpd must not be running while you do the test.

If the test is successful, you'll get a lot of debug output, including the current time value.
Ntpdate will not change your system clock while you're using the -d option.

Both xntpd and ntpdate must use the UDP port number 123, so they cannot be both running at the same time.

MK
MK
Sandeep_Chaudhary
Trusted Contributor

Re: NTP server connectivity check

Before starting xntpd use ntpdate command to check connectivity:


suxde900 # ntpdate -d 160.70.15.89
transmit(160.70.15.89)
receive(160.70.15.89)
transmit(160.70.15.89)
receive(160.70.15.89)
transmit(160.70.15.89)
receive(160.70.15.89)
transmit(160.70.15.89)
receive(160.70.15.89)
transmit(160.70.15.89)
server 160.70.15.89, port 123
stratum 2, precision -17, leap 00, trust 000
refid [10.55.146.97], delay 0.02583, dispersion 0.00000
transmitted 4, in filter 4
reference time: cc79cb89.70c95000 Tue, Sep 16 2008 8:07:05.440
originate timestamp: cc79cea0.7d2f1000 Tue, Sep 16 2008 8:20:16.488
transmit timestamp: cc79cea0.7d267000 Tue, Sep 16 2008 8:20:16.488
filter delay: 0.02606 0.02585 0.02583 0.02585
0.00000 0.00000 0.00000 0.00000
filter offset: 0.000005 -0.00000 -0.00000 0.000004
0.000000 0.000000 0.000000 0.000000
delay 0.02583, dispersion 0.00000
offset -0.000007

16 Sep 08:20:16 ntpdate[20437]: adjust time server 160.70.15.89 offset -0.000007 sec
sandchau as root@suxde900 [/var/opt/ignite/clients/suxde067/recovery/latest]
suxde900 #

if everything is OK start xntpd
# /sbin/init.d/xntpd start



use ntpq command

suxde900 # ntpq -np
remote refid st t when poll reach delay offset disp
==============================================================================
*160.70.15.89 10.55.146.97 2 u 31 64 377 0.26 -0.001 0.03





Suraj K Sankari
Honored Contributor

Re: NTP server connectivity check

Hi,
Before configure the NTP your client should be reachabe to server for checking this give this command
ntpdate -d server.ipaddress

Then only you go for configure NTP,
Configure NTP first you edit
# vi /etc/ntp.conf
server 1stNTPSERVER ipaddress or hostname
server 2nd1NTPSERVER ipaddress or hostname
driftfile /etc/ntp.drift

create a ntp.drift file
touch /etc/ntp.drift

Modify the /etc/rc.config.d/netdaemons file
Daemon started at system boot
export XNTPD=1

/usr/sbin/ntpdate -b server

/usr/sbin/xntpd start


View NTP activity and errors over time
more /var/adm/syslog/syslog.log
Verify that the xntpd daemon is running
ps -e | grep xntpd
Check associations with other nodes
ntpq -p

I think this will help you to configure NTP


Suraj