XNTP is a timeserver that makes it possible to synchronize your local computer-time with
an external time-server. Additionally, you can run your own time-server and let other
hosts contact you to synchronize your LAN-time.
First of all, what is NTP?
I quote http://www.eecis.udel.edu/~ntp/ntp_spool/html/index.htm
The Network Time Protocol (NTP) is used to synchronize the time of a computer client or server
to another server or reference time source, such as a radio or satellite receiver or modem.
It provides accuracies typically within a millisecond on LANs and up to a few tens of milliseconds
on WANs relative to Coordinated Universal Time (UTC) via a Global Positioning Service (GPS) receiver,
for example. Typical NTP configurations utilize multiple redundant servers and diverse network
paths in order to achieve high accuracy and reliability. Some configurations include cryptographic
authentication to prevent accidental or malicious protocol attacks and some provide automatic server
discovery using IP multicast.
The Network Time Protocol (NTP) Distribution
Configuration of NTP
I've searched for the latest package on
http://rpmfind.net. There you can search for the latest RPM for your distribution.
When you're using Red-Hat installation is easy.
rpm -Uvh xntp.rpm
I'm only going to cover a 'basic' installation. More information is provided on the
NTP uses one config file /etc/ntp.conf in which all settings are contained.
Open your favorite editor and edit this file so that it looks somewhat like this :
extract of /etc/ntp.conf
That's all there is for a simple, working configuration.
In this config file, I connect for the update to ntp.myexternalserver.com.
restrict default notrust lowpriotrap nopeer nomodify
restrict 220.127.116.11 mask 255.255.255.0 nopeer nomodify
restrict 192.168.1.0 mask 255.255.255.0 # local hosts
restrict 127.0.0.1 mask 255.255.255.255 # local config
restrict settings make sure that I only get an update from my default server
(ntp.myexternalserver.com has ip 18.104.22.168) and that only hosts on my LAN can contact
You can stop the xntp-daemon with the initialisation-scripts located in your inetd.d directory.
xntp start to start the daemon and
xntp stop to start the daemon.
One special remark. When I first started the daemon, even when all my regional settings were correct,
it gave me the following error-message :
time error 2069.757571 is way too large (set clock manually)
To resolve this, you need to edit the initialisation script and change the line where the
daemon gets started.
extract of /etc/inet.d/xntp
I have added the -g option to start the daemon. This way, the daemon starts and will synchronize
the clock, no matter what time it receives from the external server. Even when the difference
between external time and local time is to big (offset to high) the update will take place.
This can only happen once. When a second instance occurs, the daemon will exit with an error-code.
case "$1" in
# Adjust time to make life easy for xntpd
if [ -f /etc/ntp/step-tickers ]; then
echo -n "Syncing time for xntpd. "
/usr/sbin/ntpdate -s -b -p 8 -u `cat /etc/ntp/step-tickers`
# Start daemons.
echo -n "Starting xntpd: "
daemon xntpd -A -g
[ $RETVAL -eq 0 ] && touch /var/lock/subsys/xntpd
You can't use your GNU/Linux-timeserver to configure the time-settings on a Windows-machine.
Allthough there are some free tools available that do the trick, I advice you to use
the SMB-time protocol with Samba. More information can be found on another page on my site :
Tweaky Weaky : Using Samba as a timeserver
Easy...just install ntp of xntp and add one line to the configuration file :
In this case, mytimeserver.com is the local timeserver on your LAN.