[ntp:questions] ntpdate synchronization often fails

Steve Kostecke kostecke at ntp.org
Thu Nov 6 17:00:36 UTC 2008


On 2008-11-06, Yoann Fages <yoannft at googlemail.com> wrote:

> I am trying to set up a ntp server on an embedded linux platform. My
> platform will be connected to a switch (not connected to internet) and all
> clients will synchronize their clock with my platform local clock.

The "synchronization" quality is directly related to the stability of
the clock on your "platform".

> I have downloaded and install ntpd, set up a conf file (ntp.conf) on my
> platform:

Assuming that you are using a stable release of NTP from www.ntp.org ...

> conf file:
>
> server 127.127.1.0

Ntpd will take a bit under 4 minutes to "synchronize" to the local clock
if you use that server line.  

You may reduce this time to a bit under 60 seconds by appending 'minpoll
4' to that server line.

> fudge 127.127.1.0 stratum 3 refid AmT3

You should set the statum to something higher (i.e. 10, or more) just in
case this private network is connected to a public network.

> logfile /var/log/ntp.log
> restrict default notrap nopeer nomodify
> restrict 192.168.0.0 mask 255.255.0.0

Those restrict lines are not affecting the issue you have raised. But
why do you feel that they are neccessary?

> On my platform I launch ntpd -c ntp.conf.
>
> On a linux PC connected to the switch, I launch: ntpdate -b -v server_ip_@
>
> Most of the time, I get this error message: "ntpdate : no server suitable
> for synchronization found", but sometimes the synchronization is OK.

You have to wait for ntpd on your "platform" to "synchronize" to the
localclock.

> What can I do to always have a synchronization?

Speed up "synchronization" as shown above.

Or use an NTP-dev snapshot; it accepts the Undisciplined Local Clock
after the first poll.

Or modify the source to suit your needs.

Or consider other solutions such as timed, or rdate (on the clients)
+ inetd (on the "platform").

-- 
Steve Kostecke <kostecke at ntp.org>
NTP Public Services Project - http://support.ntp.org/




More information about the questions mailing list