[CentOS] NTP

Tue Apr 3 13:56:53 UTC 2007
Steve Huff <shuff at vecna.org>

On Apr 3, 2007, at 4:21 AM, Morten Torstensen wrote:

> Les Mikesell wrote:
>> Unless something has changed recently, ntp doesn't believe in  
>> multiple sources of time.  It will pick the one it thinks is best  
>> and ignore the
> Oh, ntp does indeed believe in multiple sources. Sure, only one is  
> preferred and will be used as timesource, but it is constantly  
> evaluating the other servers for lag/jitter and change primary  
> source if it feels like it.
> You should have an odd number of servers.. 1, 3, 5, ... and so on.

it appears that Morten, Les, and i are all correct. :)

from "Notes on setting up a NTP subnet" (http://www.eecis.udel.edu/ 

--- begin paste ---
Each client in the synchronization subnet (which may also be a server  
for other, higher stratum clients) chooses exactly one of the  
available servers to synchronize to, usually from among the lowest  
stratum servers it has access to. This is, however, not always an  
optimal configuration, for indeed NTP operates under another premise  
as well, that each server's time should be viewed with a certain  
amount of distrust. NTP really prefers to have access to several  
sources of lower stratum time (at least three) since it can then  
apply an agreement algorithm to detect insanity on the part of any  
one of these. Normally, when all servers are in agreement, NTP will  
choose the best of these, where "best" is defined in terms of lowest  
stratum, closest (in terms of network delay) and claimed precision,  
along with several other considerations. The implication is that,  
while one should aim to provide each client with three or more  
sources of lower stratum time, several of these will only be  
providing backup service and may be of lesser quality in terms of  
network delay and stratum (i.e., a same-stratum peer which receives  
time from lower stratum sources the local server doesn't access  
directly can also provide good backup service).
--- end paste ---

in a nutshell: while a NTP client is only using one timeserver at any  
given time for synchronization, the client prefers to be able to  
select among several different time sources and will switch preferred  
servers as it sees fit.  thus, while it is perfectly possible to make  
NTP work with a single source of time, you are likely to see better  
performance if you configure several sources.

the reason i asked about network size is that it seems a bit silly to  
configure three time servers for a small home network of, say, four  
hosts - you may as well just make every host on your network an NTP  
peer, and point them all at each other and at some external time  
source.  of course, this scheme doesn't scale very well.


If this were played upon a stage now, I could condemn it as an  
improbable fiction. - Fabian, Twelfth Night, III,v