Hochschule Augsburg
NTP Service
Usage
The Aztecs, like the even more cultered Mayans, had several separate,
overlapping calendrical systems. This picture is said to symbolize
one of them. In the middle it shows two gods representing life and
death. The animal symbols on the left and right margins stand for
20 day or month names. Unlike our day counts and month names, the
ones in this religious calendar cycle simultaneously. A 13-day
count and 20 names result in 260 unique dates, forming the divine year.
Refer to the book 'Calendrical calculations' mentioned in the 'Time' page.
Uses
Usage means correcting the clocks of one or several workstations
by referring to hosts on your local network or on the Internet.
The kind of usage of this and other NTP services depends on your
needs and some restrictions.
If you only want to have correct time stamps on files, e-mails,
and news articles, it will be sufficient to call a simple client
program at boot time and/or regularly. Precision of time on your
machine will still be better than one second.
Windows 2000 or XP users in an enterprise or campus network don't
need to know anything about time synchronization, assumed their
network administrator has set up an authoritative time server.
Users of older MS Windows versions may call
net time /domain:DOMAIN_name /set /yes or
net time \\timehost /set /yes
in an autostart or logon script (batch file). timehost
is the NetBIOS name of some host on the local network having
correct system time.
Programs mentioned below in the 'MS Windows' section can do even
more for you. They might set the clock more accurately, set it
at startup, regularly, or on network dial-up.
Under Unix, call a clock synchronization program from a boot
script and/or from crontab (every day or hour). You may use the
ordinary Time service or the ntpdate program from the
ntpd distribution (see below). It is delivered ready-to-run with
most modern Unixes.
Internal users (in our campus network) should refer to one
of our distribution servers (see the
NTP subnet page).
All users accessing a timing host
fairly seldom may use our reference servers tick, tock and tack.
Conversely, that means that
external users should refer to
our servers only infrequently or themselves set up a NTP subnet.
We would be glad to let our stratum-2 servers peer with yours, what
would give you a clock accuracy better than ±10 milliseconds.
If you are seriously concerned in very precise timekeeping, you will
need a stratum-1 server requiring some primary source of legal time
like GPS or DCF77. Look around on this site for some basic
information.
In any case, if you intend to set up a NTP subnet of your own, you
should read the page about the
realization of our NTP service to use it as a template.
Read on for instructions to set up several workstations with
reasonable clock accuracy.
Unix/Linux
For a Unix or Linux machine you should use the original ntpd
software. It is shipped along with most modern Unix variants
(e.g. Solaris and AIX), though sometimes in an out-dated
version. So you better get a copy of the distribution archive.
You may download the old xntpd version 3 we are still using from
this server. Better you get the latest version from the
'Home of the Network Time Protocol'.
The file size is about 1.9 MB.
Unpack the archive file using gzip and tar to install all files
in an own subdirectory tree. There will be a directory named html
containing the complete ntp documentation. You must read the
'Building and Installing the Distribution' page on your machine.
The old version is on
this server
and the latest version at the
'Home of the Network Time Protocol'.
After checking the prerequisites configure and
compile from the root of the ntp subdirectory tree.
You should be 'root' doing this for some reasons:
# configure --disable-debugging \
--disable-all-clocks
# make
# make install
The ntpd daemon and some utilities are now
installed in /usr/local/bin.
Make sure that ntp is associated with 123/udp, not tcp,
in the /etc/services file. Some Unixes (AIX) were formerly
wrong about that point.
Create /etc/ntp.conf containing one line:
server kim.rz.fh-augsburg.de
or what your server is. That's the bare minimum. You better
have a
real configuration file.
If you mentioned the local clock as a peer in the
/etc/ntp.conf file, it will be ruled by the ntpd daemon.
Otherwise make an entry in /etc/crontab to call
clock -wu
every hour or so. This will set the internal (hardware)
clock to correct time. Leave the -u off if your system
clock is running at local time (not UTC).
Install a script to start and stop the ntpd daemon
in your system startup directory (rc.d or what you have)
to automatically handle it while booting and halting.
It's slightly different for a
Bourne shell
and for a
Korn shell.
You may get some suggestions from Stephan Seidl's
NTP installation guide for Dresden Technical
University (unfortunately no longer available) or from the
NTP cookbook of University of Michigan.
Internal clients may use the campus NTP broadcast service.
To get the necessary authentication keys you have to
contact the operator of this service.
MS Windows
In a MS Windows 2000 or XP network, there is an integrated time
client-server hierarchy based upon SNTP. Only one authoritative
server in an enterprise network should refer to an external
SNTP server. Server administrators should go to the
Microsoft Support Server
and search the Searcheable Knowledge Base for the keyword SNTP
to get more information. You will be advised to inspect the help
text for the
net time ... command (call
net time /?).
The ntpd software may be installed as a Windows service, but it would
pay only as a NTP server installation. You wouldn't get very
accurate time anyway under Windows NT since it is a not so good
timekeeper (at least compared to other operating systems).
There are many good and simple client programs for Microsoft Windows,
both shareware or freeware. Network time service clients for all
versions of MS Windows are available. Most of them use the
Simple Network Time Protocol (SNTP) which is sufficient for
normal time accuracy needs. Some are even aware of connecting
to the Net by dial-in and synchronize at that moment.
There is a category 'Windows > Internet > Time Synchronizers'
on the nearest
TUCOWS
server. Select one and try on your own. Installation and setup of
these programs is quite straightforward.
We for our former pool of PCs under MS Windows NT chose the
TimeSync client written by Raju Varghese.
It not only sets very accurate time, but also can run
as a Windows NT service (like a Unix daemon). Moreover,
it's free for educational institutions like us.
If you find that interesting: There are comprehensive
instructions how to use it and who may use it.
There's one special advantage using TimeSync: It is able
to fetch its configuration parameters from a server.
On all clients, TimeSync is installed equally and will get a
parameter file
from a server at every start-up. The file may be changed,
affecting all clients at once.
Other
If you are (still) a DEC VMS user you can install the
original ntpd daemon on your VAX system.
Consider setting it up as a NTP server since the
DEC machines are said to have good internal clocks.
CISCO routers may be able to serve as NTP peers.
Please consult the manual, I don't know much
(nearly nothing) about these boxes.
Check
There's a WWW page by David Schwartz from where you can
check your NTP server unless it's configured to block out
external queries (e.g.
restrict ignore).
Hint
Remember to configure your operating system
for the correct time zone and daylight saving
time regulations. Such settings are not part
of NTP.
2003-07-06