[aklug] How NTP Works

From: Christopher Howard <cmhoward@frigidcode.com>
Date: Mon Dec 06 2010 - 19:21:24 AKST

Okay, I'm probably going to sound like a dunce to some of you, but I am thinking that I am not the only person who has been confused on this subject. I knew that NTP was a time-sharing program/protocol. But I was always under the impression that the NTP Daemon program (ntpd) was something you were supposed to install /only/ if you wanted to /serve/ out time, whilst you needed a client program (like ntpdate) to receive time from an NTP server. I recently learned that this is a faulty (obsolete?) view of NTP.

Actually, NTP is more of a peer-to-peer protocol (though there is a top-down stratum heirarchy) and the ntpd daemon /both/ receives time from other computers /and/ provides time to other computers. Everybody should have ntpd installed and running, in order to keep machine time constantly syncronized with external sources. And if you don't want other computers to be able to receive time from you (for whatever unlikely reason) you just edit your ntp.conf file to restrict the outside world from making use of your NTP server.

There were two helpful commands I learned (both of which assume that ntpd is running):

  ntpq -c readvar | grep stratum

This will tell you the NTP "stratum" of your system. The closer you are to 1, the better, because those are the official sources of time.

  ntpq -c peers

This will tell you what external servers you are currently synchronizing with, as well as the stratum of those servers and a few other possibly relevant statistics.

-- 
Christopher Howard
frigidcode.com
theologia.indicium.us
---------
To unsubscribe, send email to <aklug-request@aklug.org>
with 'unsubscribe' in the message body.
Received on Mon Dec 6 19:21:39 2010

This archive was generated by hypermail 2.1.8 : Mon Dec 06 2010 - 19:21:39 AKST