[ntp:questions] Best practices

Brian Inglis Brian.Inglis at SystematicSw.ab.ca
Mon Sep 15 07:54:14 UTC 2014


On 2014-09-04 03:41, Marco Marongiu wrote:
> I understand that clients in one DC will use both the NTP servers in the
> same DC and in the other one. Is my understanding correct?
>
> On 09/04/2014 10:03 AM, Mike Edwards wrote:
>> The DCs support remote offices. I am thinking of configuring the
>> Linux hosts with 3 time servers, the two at the closest DC, and one
>> from the other DC.
>
> the downside of this configuration is that if you lose connectivity to
> the DC that provides the single NTP server, you'll end up with the
> clients using two NTP servers, which gives poor results.
>
> I believe you can mitigate this in two ways:
>
> 1) have three servers in each DC and have the clients in the remote
> offices connect to all the six of them -- if you lose connectivity to
> one DC you will still run on more than two servers
>
> 2) use the configuration you mentioned but have the clients in the
> remote offices "prefer" one of the servers from the DC that serves two.
> This way you'll make ntpd "trust" (so to say) more one of the two and
> partially mitigate the bad side effects of having two.

If you have a client configured with six servers at two sites, if you
lose connectivity to one site, ntpd will be unable to form a majority
clique (you need four working servers from a total of six), establish
intersecting correctness intervals, and select a system peer, until
the servers are considered unreachable (8 poll intervals - over 2
hours at maxpoll 10).

Don't use prefer as that is designed to number ticks from PPS sources.

You could set up the stratum 1 servers at each site as peers with low
minpoll and maxpoll, and add one or two from the other site with larger
polls; set up the Linux hosts as stratum 2 servers using all the hosts
at the closest site as servers, maybe one or two from the other site,
and peer with four other Linux hosts nearby on the network.

Non-NTP servers can then use nearby Linux hosts as NTP servers.

You could also set up your routers as stratum 3 peering with other
nearby routers and using some nearby Linux hosts as stratum 2 servers.

Then clients could be set up using nearby (gateway) routers as NTP servers.
-- 
Take care. Thanks, Brian Inglis


More information about the questions mailing list