[ntp:questions] Re: Undisciplined Local Clocks
Richard B. Gilbert
rgilbert88 at comcast.net
Tue Jan 11 02:17:40 UTC 2005
Allen C wrote:
>"Richard B. Gilbert" <rgilbert88 at comcast.net> wrote in
>news:V9CdnS2GwKK7lX7cRVn-uQ at comcast.com:
>>If you leave them out you can't serve time to clients if you become
>>unsynchronized. If you include them you should probably include comment
>>explaining them: mine look like this.
>># Declare the local clock to be the clock of last resort.
>># It will be used to serve time in the absence of any other.
>>server 127.127.1.0 # Local clock, unit 0
>>fudge 127.127.1.0 stratum 10
>That's pretty much as I had surmised.
>So taking the case of a group of peers losing touch with the outside world:
>If NONE ran a local clock, then all the servers would lose sync. They would
>then be unable to serve their clients, and all the clocks in the network
>would drift apart;
>If ONE server ran a local clock, everything would sync to that - however
>bad - but at least the clocks on the network would stay together;
>and if TWO OR MORE had a local clock then there would be some sort of
>arbitration and one server would be "elected" leader
>PS Doesn't an unsynchronised server use the drift file to keep the best
> NOTE - TO REPLY TO SENDER, REMOVE "Tue2427"
> FROM EMAIL ADDRESS - Automunge
DO NOT use two servers. Use one, three, or more. With only one
server, there is no question which to use. With three or more NTP has
algorithms to allow it to select the best of the lot. With two servers
that disagree, there is no way for a client to tell which is more nearly
The drift file provides a reasonable estimate of the initial frequency
correction to apply to the clock. This was correct as of the day and
hour it was recorded. The value is subject to change with temperature,
age of the quartz crystal, the phase of the moon and the whims of the
Gods. The drift file is only read when the daemon is started and the
initial value is used only until the daemon has sufficient data to
calculate a new one. If you lose synchronization, the last value will
continue to be used.
When you lose synchronization you may be able to keep reasonably good
time for several hours. If you maintain tight temperature control of
your computer room, several hours might stretch to a day or two.
Inevitably, your clock will drift and the longer it is unsynchronized,
the farther it will drift.
How long you can tolerate being unsynchronized depends on your
requirements. If you are working for a financial institution (bank,
stock broker, stock exchange, etc.), there are legal requirements for
the accuracy of your transaction timestamps. If there are no legal
constraints, make your own rules to suit your own needs.
More information about the questions