[ntp:questions] Resolving Hostnames

Steve Kostecke kostecke at ntp.org
Thu Dec 20 14:40:05 UTC 2007


On 2007-12-19, throindarts at yahoo.com <throindarts at yahoo.com> wrote:

> So to summarize, I can achieve the load--balancing via the DNS (which
> will return the IPs in different order each query) because each of my
> clients will query DNS at different times (i.e. they each will startup
> NTP at different times). This part is fine except what happens when
> the selected server fails? Well this can be solved by providing my
> clients with more than 1 server host name in ntp.conf and letting the
> client use one as sys.peer and the other(s) as candidate. So then if
> sys.peer fails then the candidate becomes sys.peer (at least this is
> my understanding of NTP).

ntpd automatically manages the selection of the sys.peer. All you have
to do is provide ntpd with enough time sources.

*** In general...

If ntpd is using 1 remote time server it has not choice but to accept
that server as "correct".

If ntpd is using 2 remote time servers it now way of determining server
is correct (unless special steps are taken).

If ntpd is using 3 remote time servers it can determine if one of these
servers is "wrong". However, if one of those servers is no longer
reachable then ntpd ends up in the situation of having only 2 remote
time servers.

If ntpd is using more than 3 remote time servers additional levels of
fault tolerance are gained.

*** If you are providing your own time servers and are willing to properly
monitor and maintain them you may be able to get away with using fewer
than the generally accepted number of time sources.

In the case of having only 2 time servers on a LAN, the safest
configuration is to have each time server polling 4, or more, unique
time sources (i.e. a combination of off-site remote time servers and/or
on-site ref-clocks). Then designate one of your LAN time servers as the
master and the other as the slave. Configure the slave to poll and
prefer the master as follows: 'server master.lan.server iburst prefer'.
This should cause the slave to always sync to the master (unless the
master fails) and the stratum difference between the master and the
slave will cause the clients to use the former.

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




More information about the questions mailing list