1833323 Members
3132 Online
110051 Solutions
New Discussion

NTP Time difference

 
SOLVED
Go to solution
Andrew_80
Advisor

NTP Time difference

We have 3 HP-UX systems and they all use the same "/etc/ntp.conf" and the same "/etc/hosts" files. The problem is that all three reporting fdifferent times althoug they all use te same NTP server. Here is the output on each server of the command
ntpq -p ; date
SYSA:
remote refid st t when poll reach delay offset disp
==============================================================================
*LOCAL(0) LOCAL(0) 3 l 2 64 377 0.00 0.000 10.01
Fri Jan 2 16:09:55 CST 2004


SYSB:
remote refid st t when poll reach delay offset disp
==============================================================================
*LOCAL(0) LOCAL(0) 3 l 10 64 377 0.00 0.000 10.01
Fri Jan 2 16:10:44 CST 2004

SYSC:
remote refid st t when poll reach delay offset disp
==============================================================================
*LOCAL(0) LOCAL(0) 3 l 16 64 377 0.00 0.000 10.01
Fri Jan 2 16:09:37 CST 2004
The Sky is the Limit
4 REPLIES 4
Rick Garland
Honored Contributor

Re: NTP Time difference

You are pointing each system to itself only - there are no peers configured to check.

Example, have SYSA look at SYSB and SYSC as well; have SYSB look at SYSA and SYSC as well;have SYSC look at SYSA and SYSB as well.
Patrick Wallek
Honored Contributor

Re: NTP Time difference

According to this, you aren't actually syncing time with any outside time source. It appears to me that each machine is syncing with itself.

Post your ntp.conf file so we can confirm this.
Rick Garland
Honored Contributor
Solution

Re: NTP Time difference

An example of my ntp.conf file.

server SYSA prefer
peer SYSB
peer SYSC
peer SYSD
peer SYSE

The SYSA system is a stratum 2 server - it is going out to sync time with a stratum 1 server.

All of my internal systems look at SYSA and sync with it. In addition I have each system looking at their peers to sync with them as well. Look at the following web site, has some good info.

http://docsrv.sco.com/NET_tcpip/CTOC-ntpN.ntp.html

Do a search for ntp and another web site to look at is at udel.
Bill Hassell
Honored Contributor

Re: NTP Time difference

As mentioned, your systems are not synced to anything except themselves. Here is a more useful /etc/ntp.conf file:

server ntp1.usno.navy.mil prefer # US Naval Observatory - preferred
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 need several NTP sources for reliability. Most public timeservers limit the nunber of hosts from a single network so pick one machine to be the primary server with multiple NTP servers. Then point your other systems to that server. NOTE: external servers require that your firewall pass port 123 so you can sync to these servers. Alternatively, your network administrator can setup your firewall to sync to several NTP sources and then provide NTP services to everyone in your company.


Bill Hassell, sysadmin