Configuring NTP clients

Jurjen Bokma

September 2007


The ntp daemon used for timekeeping may not by default be configured well for all circumstances. In particular, the iburst and burst directives may be needed in server statements in order to let the machine under config trust its external time sources well enough to let it choose these for reference instead of the local clock. And it this is not enough, the local clock (recognizable as a 127.127.something server entry) may have to be taken out of the configuration altogether.

Example 1. Snippet from ntp.conf showing iburst flag to server statement
#server 127.127.1.0 1
#fudge 127.127.1.0 stratum 10 2
server 0.debian.pool.ntp.org burst iburst 3
server 1.debian.pool.ntp.org burst iburst 3
server 2.debian.pool.ntp.org burst iburst 3
server 3.debian.pool.ntp.org burst iburst 3
      

1

Local clock commented out, or it will be taken as the reference.

2

Fudging the local clock to al (low) stratum 10 appeared not to be enough to keep it from being taken as the reference clock.

3

This (i)burst needed here, or system clock won't be set.


This measure should result in something like the following output of ntpq -p:


      
     remote           refid      st t when poll reach   delay   offset  jitter
==============================================================================
+ntp1.hro.nl     192.87.106.2     2 u    6   64  377    7.027  4007.26 838.555
*ntp2.hro.nl     193.79.237.14    2 u   60   64  377    7.068  4067.85 577.443
-ns1.iseer.nl    193.67.79.202    2 u   12   64  377    4.415  4668.18 344.353
+news.vps.budget 193.79.237.14    2 u   24   64  377    4.595  3854.39 911.959
xRN2-R6509-RP.ne 192.36.143.150   2 u   22   64  377    0.798  4824.30 259.985
      

    

If the local system is really screwed up, removing the drift file may also help.

[Note]Note

It may take half an hour for the daemon to reign the local clock. If the drift file was removed, it will only be created again after an hour of continuous operation.

Extensive documentation on ntp is available as "The Network Time Protocol (NTP) Distribution" at www.eecis.udel.edu.

See also Conference under Docker