ntpdate synchronization often fails
Hi all,
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.
I have downloaded and install ntpd, set up a conf file (ntp.conf) on my
platform:
conf file:
server 127.127.1.0
fudge 127.127.1.0 stratum 3 refid AmT3
logfile /var/log/ntp.log
restrict default notrap nopeer nomodify
restrict 192.168.0.0 mask 255.255.0.0
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.
What can I do to always have a synchronization?
Is my conf file OK?
Thanks in advance.
Yoann.
Re: ntpdate synchronization often fails
On 2008-11-06, Yoann Fages <yoannft@googlemail.com> wrote:
[color=blue]
> 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.[/color]
The "synchronization" quality is directly related to the stability of
the clock on your "platform".
[color=blue]
> I have downloaded and install ntpd, set up a conf file (ntp.conf) on my
> platform:[/color]
Assuming that you are using a stable release of NTP from [url]www.ntp.org[/url] ...
[color=blue]
> conf file:
>
> server 127.127.1.0[/color]
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.
[color=blue]
> fudge 127.127.1.0 stratum 3 refid AmT3[/color]
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.
[color=blue]
> logfile /var/log/ntp.log
> restrict default notrap nopeer nomodify
> restrict 192.168.0.0 mask 255.255.0.0[/color]
Those restrict lines are not affecting the issue you have raised. But
why do you feel that they are neccessary?
[color=blue]
> 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.[/color]
You have to wait for ntpd on your "platform" to "synchronize" to the
localclock.
[color=blue]
> What can I do to always have a synchronization?[/color]
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@ntp.org>
NTP Public Services Project - [url]http://support.ntp.org/[/url]
Re: ntpdate synchronization often fails
Thanks Steve for your answer
I have changed my conf file with your advices.
Indeed, ntpd takes less time to synchronize at the beginning with the
"minipoll" instruction.
But I still have failed synchronizations.
So, I am going to try the last snapshot dev.
Thanks a lot.
Yoann.
2008/11/6 Steve Kostecke <kostecke@ntp.org>
[color=blue]
> On 2008-11-06, Yoann Fages <yoannft@googlemail.com> wrote:
>[color=green]
> > 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[/color]
> all[color=green]
> > clients will synchronize their clock with my platform local clock.[/color]
>
> The "synchronization" quality is directly related to the stability of
> the clock on your "platform".
>[color=green]
> > I have downloaded and install ntpd, set up a conf file (ntp.conf) on my
> > platform:[/color]
>
> Assuming that you are using a stable release of NTP from [url]www.ntp.org[/url] ...
>[color=green]
> > conf file:
> >
> > server 127.127.1.0[/color]
>
> 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.
>[color=green]
> > fudge 127.127.1.0 stratum 3 refid AmT3[/color]
>
> 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.
>[color=green]
> > logfile /var/log/ntp.log
> > restrict default notrap nopeer nomodify
> > restrict 192.168.0.0 mask 255.255.0.0[/color]
>
> Those restrict lines are not affecting the issue you have raised. But
> why do you feel that they are neccessary?
>[color=green]
> > On my platform I launch ntpd -c ntp.conf.
> >
> > On a linux PC connected to the switch, I launch: ntpdate -b -v[/color]
> server_ip_@[color=green]
> >
> > Most of the time, I get this error message: "ntpdate : no server suitable
> > for synchronization found", but sometimes the synchronization is OK.[/color]
>
> You have to wait for ntpd on your "platform" to "synchronize" to the
> localclock.
>[color=green]
> > What can I do to always have a synchronization?[/color]
>
> 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@ntp.org>
> NTP Public Services Project - [url]http://support.ntp.org/[/url]
>
> _______________________________________________
> questions mailing list
> [email]questions@lists.ntp.org[/email]
> [url]https://lists.ntp.org/mailman/listinfo/questions[/url]
>[/color]