Operating System - HP-UX
1753401 Members
7400 Online
108792 Solutions
New Discussion юеВ

Re: NTP - how to force synchronization without an association?

 
SOLVED
Go to solution
Juli├бn Aimar
Frequent Advisor

Re: NTP - how to force synchronization without an association?

habyor
Occasional Advisor

Re: NTP - how to force synchronization without an association?

Julian,

I already read this document - hence my first question:

Is it possible to force NTP client to synchronize its time with a local (LAN)
NTP server despite the fact there is no stratum-1 server in the hierarchy?

I know I have to first figure out why I can't connect on port 123,
but my question remains valid. If I am able to connect, will I be able to force time sync despite the fact there is no stratum-1 server in the hierarchy?

Greetings,
Tomek.
BUPA IS
Respected Contributor
Solution

Re: NTP - how to force synchronization without an association?

Hello ,
The Fundamental problem here is that the LAN NTP server is not in sync with anything at all and it can't and won't therefore share out the time to any other system . You probably need to get the external communications and firewalls investigated .

The lines like
> smtp.certum.pl .INIT. 16 u - 1024 0 0.000 0.000 0.000
> europium.canoni .INIT. 16 u - 1024 0 0.000 0.000 0.000
indicate that your LAN NTP server is not "in sync" and that it has never reached any of the time servers listed .
It is possible to allow the LAN server to advertise its own internal (probably wrong) clock at any stratum you choose. A stratum 1 server is not required .
The method used depends on the release of NTP running in your LAN server.
Is it possible to post the output of
ntpq -c rv
ntpq -c v
and the ntp.conf file from your LAN server as well as its make, OS, and OS release.
then I can suggest an answer
I hope this is of some help
Mike
Help is out there always!!!!!
rick jones
Honored Contributor

Re: NTP - how to force synchronization without an association?

Only if the NTP server with which it is trying to sync has a "fudge" entry for its local clock, the ntp.conf syntax for that escapes me but it should be findable via web search.

If you have any interest in the *correct* time rather than merely *consistent* time, definitely fix the issue with reachability to the lower stratum NTP servers. ntp.isc.org may have some pointers on public servers to try to connect.
there is no rest for the wicked yet the virtuous have no pillows
habyor
Occasional Advisor

Re: NTP - how to force synchronization without an association?

Hello,

thanks a lot to all of you who replied. What I want to achieve is to have
consistent (rather than correct) time across several servers.


The repepwd NTP server is Debian (Linux repepwd 2.6.24-22-server).


ntpq -c rv returns this:

assID=0 status=c011 sync_alarm, sync_unspec,
1 event, event_restart,
version="ntpd 4.2.4p4@1.1520-o Wed May 13 21:05:57 UTC 2009 (1)",
processor="i686", system="Linux/2.6.24-22-server", leap=11, stratum=16,
precision=-20, rootdelay=0.000, rootdispersion=952.620, peer=0,
refid=INIT, reftime=00000000.00000000 Thu, Feb 7 2036 7:28:16.000,
poll=6, clock=cecc9bc6.58cde28c Fri, Dec 11 2009 11:21:58.346, state=1,
offset=0.000, frequency=0.000, jitter=0.001, noise=0.001,
stability=0.000, tai=0


ntpq -c v returns this:

ntpq 4.2.4p4@1.1520-o Wed May 13 21:06:04 UTC 2009 (1)

There are no fudge settings in ntp.conf (only servers settings).

Tomek.
habyor
Occasional Advisor

Re: NTP - how to force synchronization without an association?

I have found another NTP server in our LAN, which seems to be working as it should.
After switching the HP-UX clients to this new server, everything is OK.

Once again, many thanks to all of you for your kind help.

Tomek.
mvpel
Trusted Contributor

Re: NTP - how to force synchronization without an association?

Tomek - for future reference:

In order to have your time consistent, if not correct, you need to configure at least one of your systems to use the local clock as a time source, like so:

server 127.127.1.1
fudge 127.127.1.1 stratum 10

The first line tells the NTP daemon to use the system's local clock as a time source, and the second line tells NTP that it should use "stratum 10" for the clock. (An atomic clock is stratum 0, and a server attached to an atomic clock is stratum 1.)

Needless to say, NTP will be able to associate with the local system clock, and then any other system which uses that machine as a server or peer will also be able to associate with it, at stratum 11, and will maintain the same time as the local clock on the first system.

You can set up a few different machines to use their local clocks, and set them as NTP "peers" - using the "peer" config line instead of "server" - which means that they'll negotiate with one another to find the best clock and choose that one as the server. Without an external time source, it won't be the correct time, but it will be a consistent time.

You never want to set a freewheeling local system clock to a low stratum number. If you later add a GPS/WWVB clock to your network, you don't want the free-spinning clock to compete with the authoritative clock - you want to be sure that NTP clients have a way of knowing that the stratum 0 GPS clock should always be used if it's available, instead of the freewheeling clock.

For correct time, you should look into SpectraCom or Brandywine Communications - they both offer standalone GPS-sourced Ethernet NTP appliances, 1U rack-mountable with available window-mount GPS antennas. They're not very expensive - maybe $1,000 to $2,000 a pop - and they're brain-dead simple and maintenance-free.
rick jones
Honored Contributor

Re: NTP - how to force synchronization without an association?

One more bit of advice, perhaps repeated.

One should "always" configure at least three independent time sources. This will, among other things:

1) provide redundancy/high availability
2) give NTP the ability to detect a "bad" time source
there is no rest for the wicked yet the virtuous have no pillows
BUPA IS
Respected Contributor

Re: NTP - how to force synchronization without an association?

Hello,
Sorry that I did not get back to you sooner. the reason I asked for the rv information was to get the release of NTP
Since you are running NTP 4.2 you should use the new orphan mode feature in the v 4.2 NTP server,
This removes the need to advertise the local hardware clock (unlees of course you have installed a high precsion one) it also avoids the situation where the server with a poor internal clock keeps swapping from internal to external sychronisation.
in my experience it is far superior to the local clock driver and fudge method
please replace these lines
server 127.127.1.1
fudge 127.127.1.1 stratum 10
and use
tos orphan 10
instead in the Server where 10 is the stratum this server becomes when it is orphaned .
I hope this helps
Mike
P.S. the full NTP documentaion can be found here
http://www.eecis.udel.edu/~mills/ntp/html/index.html
tos is decsribed here
http://www.eecis.udel.edu/~mills/ntp/html/miscopt.html#tos
Help is out there always!!!!!
mvpel
Trusted Contributor

Re: NTP - how to force synchronization without an association?

BUPA: Thanks for the tip! I wasn't aware of the orphan mode option.

http://support.ntp.org/bin/view/Support/OrphanMode

NTP versions prior to 4.2.4p5 [August 2008] and 4.2.5p101 [2009] will not start up properly in Orphan Mode unless at least one time source is configured in ntp.conf. If no time sources are specified the refid stays at .INIT. and the rootdispersion continually increases. This makes these versions unsuitable for use as stand alone Orphan Mode servers in a time island.

NTP versions after, and including, 4.2.5p101 will start up correctly in pure Orphan Mode.
========

Version 4.2.6 was just released on Saturday.