[Subject Prev][Subject Next][Thread Prev][Thread Next][Subject Index][Thread Index]

Re: ntp configuration




On Tue, 9 May 2000, Ram Kumar wrote:
> I did not find good documentation. Can

say, what? i found that the documentation on ntp was so much, that one
could not figure out how to use the thing easily. what is needed is a
simple setup procedure.

> anyone point me to a good documetation site or just tell me how to
> configure. I am using slackware Linux.
> 

ok, since prabhu has already called me an expert on ntp, i will give a
simple howto here. actually, the clock howto is very well written and
gives many options on how to do this, with or without ntp. ntp is not
needed for most applications - it gives a high degree of synchronization
and is useful for large networks with many nfs systems etc. if after all
this, you still want to use ntp, read on. to synchronize your clock, you
need something to use as a reference. if you are connected to the
internet, there are reference sources available. if not, one machine on
your local net can be arbitrarily made the master and all the others
slaved to it. the default config file comes set up to be this local
master. the config file is /etc/ntp.conf; the package will need some files
in the /etc/ntp directory as shown in this config file. ntp has a
hierarchy of server levels (strata). stratum 1 servers are primary
references and have a local atomic clock or gps clock. stratum 2 servers
do not have local clocks but use one or more stratum 1 servers as the
reference. stratum 3 servers ..... you get the drift (i hope). once a
reference source is identified, the ntp.conf file simply needs a server
entry pointing to this source. xntpd should then be started up at boot
time (xntpd -A, in most cases). after some time (minutes), the local clock
will fall in sync with the reference. the ntp scheme exchanges
packets in a continuous fashion, asymptotically going to one packet
every 15 min approx (1024 seconds, actually) as the local clock
falls in step with the reference. xntpdc is the control program
that acts as the interface to xntpd (like lpc for lp); help will list the
commands available. ntp is rather sophisticated and can use several
servers and decide on the fly which one is 'best'; thus, even if network
links go up and down, the synchronization is usually retained, typically,
with sub-second accuracy for some days. incidentally, iitm runs a (not
anounced to the public) xntpd stratum 2 server (time1.iitm.ac.in) that is
usually within some 50 milliseconds of 'standard time'. ntpdate is a
program that will query a ntp server and set the local clock to match
that - so this can be used at boot time. in fact, if accuracy requirement
is not very high, running ntpdate on a cron job works quite well. ntptrace
is a program that will trace the hierarchy of the machine down to the
lowest stratum. so, if you use time1.iitm.ac.in as your reference, your
machine will be stratum 3 and ntptrace will show time1 at stratum 2 and
also what the stratum 1 server is (at that time).

sriram

ps: if you want a quick check on 'standard' time, use sun tv; the clock
that comes up on the screen before the 8pm news is good. i compared
their time with time1.iitm.ac.in and found it matches to the second.
everyone else is bogus (including dd). wonder how they do it.....

---
Send e-mail to 'ilugc-request@xxxxxxxxxxxxxxxxxx' with 'unsubscribe' 
in either the subject or the body to unsubscribe from this list.