ntpdate synchronization often fails - NTP

This is a discussion on ntpdate synchronization often fails - NTP ; 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. ...

+ Reply to Thread
Results 1 to 3 of 3

Thread: ntpdate synchronization often fails

  1. 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.

  2. Re: ntpdate synchronization often fails

    On 2008-11-06, Yoann Fages 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
    NTP Public Services Project - http://support.ntp.org/

  3. 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

    > On 2008-11-06, Yoann Fages 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
    > NTP Public Services Project - http://support.ntp.org/
    >
    > _______________________________________________
    > questions mailing list
    > questions@lists.ntp.org
    > https://lists.ntp.org/mailman/listinfo/questions
    >


+ Reply to Thread