Operating System - HP-UX
1819749 Members
3220 Online
109606 Solutions
New Discussion юеВ

How to know the ntp server name /ip address

 
so_2
Regular Advisor

How to know the ntp server name /ip address

Hi all,

How can i find any of the ntp servers name in my network. All the servers in the network are running HP-UX. I have 200 servers in network. It is difficult to login each server and check whether is it NTP server. Any method to find from my working server ?
thanks
s.o
5 REPLIES 5
James R. Ferguson
Acclaimed Contributor

Re: How to know the ntp server name /ip address

Hi:

# ntpq -pn

...for IPaddress(es)...

# ntpq -p

...for names...

See the 'ntpq(1M)' manpages for more information.

Regards!

...JRF...
Jaime Bolanos Rojas.
Honored Contributor

Re: How to know the ntp server name /ip address

SO,

Try using this command:

ntpq -p


Also for more info take a look at this thread:

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

Regards,

Jaime
Work hard when the need comes out.
Murat SULUHAN
Honored Contributor

Re: How to know the ntp server name /ip address

Hi

NTP uses 123/UDP port, so you can check your servers with network port scanner like nmap.

http://insecure.org/nmap/docs.html

Best Regards


Murat Suluhan
Hemmetter
Esteemed Contributor

Re: How to know the ntp server name /ip address

Hi

Put all your 200 Servers in /etc/ntp.conf
restart ntp and look at "ntpq -p". Joke!

I think you have to login on some other servers and look what ntp-servers they have configured. With this procedure you may also find some timesources not located on servers but on some e.g. LAN devices.

rgds
HGH
Bill Hassell
Honored Contributor

Re: How to know the ntp server name /ip address

Scanning to see who is running as an NTP server is NOT a good idea. Someone may have setup a server as a localhost server and if you use this server, you'll be synced to that server and drift around (a lot) with that server. Now you will see this with ntpq -p but it is a very lengthy task. The correct answer for any data center is that *ALL* servers (Unix, PCs), *ALL* network equipment (routers, firewalls, load balancers, email filters) and *ALL* UPS units are all using NTP from your corporate NTP servers.

If you have 200 servers then you must have a network administrator who manages the routers and firewalls. Any good network administrator will setup your firewall to sync with several Internet time servers and to act as an NTP server for the rest of your company and to offload the requests from the data center(s), a couple of lower level stratum servers would be set up to distribute NTP services.


Bill Hassell, sysadmin