Hochschule Augsburg
NTP Service - Realization
Configuration File
#
# /etc/ntp.conf
#
#
peer 127.127.1.1
#
server 127.127.8.0 mode 5 prefer
fudge 127.127.8.0 time1 0.271 stratum 1
#
server ntps1-0.uni-erlangen.de # 131.188.2.75
server ntps1-1.uni-erlangen.de # 131.188.2.45
server ntps1-2.uni-erlangen.de # 131.188.2.42
#
restrict default notrust nomodify
restrict 127.0.0.1
restrict 141.82.30.251
restrict 127.127.0.0 mask 255.255.0.0
restrict 141.82.0.0 mask 255.255.0.0 nomodify
restrict 131.188.2.75 ntpport # ntps1-0.uni-erlangen.de
restrict 131.188.2.45 ntpport # ntps1-1.uni-erlangen.de
restrict 131.188.2.42 ntpport # ntps1-2.uni-erlangen.de
#
driftfile /etc/ntp.drift
#
logconfig =syncall +clockall
logfile /var/log/ntp.log
#
statistics loopstats peerstats clockstats
statsdir /var/log/
filegen loopstats file ntp.loop type day link enable
filegen peerstats file ntp.peer type day link enable
#
This is our first ntp.conf file. It was originally
'borrowed' from Stephan Seidl of the computing centre
of Dresden Technical University (web pages unfortunately no
longer available). A single server supports the campus network.
The internal PC clock is our last hope if all else fails:
peer 127.127.1.1
Under normal conditions, accurate time should be
maintained using the attached radio clock receiver.
server 127.127.8.0 mode 5 prefer
This is our raw DCF77 receiver, Expert mouseCLOCK or IGEL:clock,
whichever label it may have. The IP number means
the clock is a local NTP server attached to this host (127.127),
using the generic reference driver type (8), and the clock is
connected to ttyS0 (0). Don't forget to create the symlink,
e.g. with: (cd /dev; ln -s ttyS0 refclock-0).
The driver operating mode for our type of clock is 5,
and it would be 8 for the IGEL:clock with adapter.
It should be the preferred time server in the local network.
fudge 127.127.8.0 time1 0.271 stratum 1
The fudge parameter time1 is the time offset calibration factor,
the phase offset of the synchronization character to the actual
time. It was evaluated by comparison against the Erlangen servers
and is fairly high on this machine, but it works.
Increment the time1 value if this offset is smaller than the
other one. You can set a particular stratum other than 0 with the
stratum option in the fudge command. We do so
to force our low precision server down to stratum 2.
server ntps1-0.uni-erlangen.de # 131.188.2.75
server ntps1-1.uni-erlangen.de # 131.188.2.45
server ntps1-2.uni-erlangen.de # 131.188.2.42
Local time is controlled by annoying the servers of
Erlangen University. I hope they don't mind,
after all it's Bavaria too.
restrict default notrust nomodify
restrict 127.0.0.1
restrict 141.82.30.251
restrict 127.127.0.0 mask 255.255.0.0
restrict 141.82.0.0 mask 255.255.0.0 nomodify
No other synchronization sources are used,
so access to the server is restricted.
Local hosts have client access only.
restrict 131.188.2.75 ntpport # ntps1-0.uni-erlangen.de
restrict 131.188.2.45 ntpport # ntps1-1.uni-erlangen.de
restrict 131.188.2.42 ntpport # ntps1-2.uni-erlangen.de
Of course the Erlangen servers are trusted, but for NTP only.
driftfile /etc/ntp.drift
The clock drift is written to a file every hour.
This reduces clock stabilization time
from hours to minutes in case of restart.
logconfig =syncall +clockall
logfile /var/log/ntp.log
All synchronization events and an hourly clock status
are logged in a text file. A simple reference server
like this doesn't need more logging. The log is written
to a file and not sent to syslogd.
statistics loopstats peerstats clockstats
statsdir /var/log/
filegen loopstats file ntp.loop type day link enable
filegen peerstats file ntp.peer type day link enable
Statistics for the stabilization loop and the synchronization
peers are enabled. There are no statistics for the generic
parse clock driver.
Statistics files are written daily to the log directory
and named by a fixed name part and the date.
1999-07-15