NTP configuration
This is how I configured ntpd (Network Time Protocol Daemon) on sage
and nettle to keep their clocks synchronized to the correct time.
The main source of information for finding out what to do was the NTP distribution documentation.
ntpd is configured by editing the file /etc/ntp.conf
. The main change required is to list the NTP servers that are to be consulted about the time:
server ntp.nildram.co.uk
server 0.uk.pool.ntp.org
server 1.uk.pool.ntp.org
server 2.uk.pool.ntp.org
I discovered the first server some time ago, but I can't remember where
- probably somewhere on nildram's website. The other three use a UK
pooling service: you get three servers chosen at random from a pool (of
around 50) when you start ntpd - it's an attempt at load balancing that
we might as well cooperate with. See pool.ntp.org and uk.pool.ntp.org for details.
ntpd acts not only as a client of the servers that you specify, but also as a server itself. So on nettle, I also added:
server sage.wingpath.private
so that nettle uses sage as one of its servers.
The ntp.conf
supplied with Slackware will not work as it stands: you have to change the line:
restrict default noquery notrust nomodify
to:
restrict default noquery nomodify
Apparently (as I discovered from this forum thread) the meaning of notrust
was changed in the NTP distribution, and the Slackware distribution hasn't caught up.
I also commented out a couple of dubious-looking lines, although I don't suppose they would have done any harm:
#multicastclient # listen on default 224.0.1.1
#broadcastdelay 0.008
That's it for configuration. All that's left is to get it started each time you boot by adding the following to /etc/rc.d/rc.local
:
/usr/sbin/ntpd
You can check the operation of ntpd using the command:
ntpq -p
which should produce output similar to:
remote
refid st t when poll reach
delay offset jitter
==============================================================================
LOCAL(0)
LOCAL(0) 10
l 8 64 377
0.000 0.000 0.001
dns0.nildram.co 195.66.241.3 2
u 351 1024 7 17.140
28.092 0.367
+marksward.plus. 82.211.81.145 3 u
23 256 357 35.903
27.838 4.864
*skylar.fbagroup 193.62.22.98 2
u 5 256 377
16.031 24.286 0.792
+kochanski.plus. 194.199.122.122 3 u
1 256 363 32.284 22.988
1.357