| « HOWTO Use dnsmasq |
NTP is a protocol designed to synchronize the clocks of computers over a network. NTP version 3 is an internet draft standard, formalized in RFC 1305. NTP version 4 is a significant revision of the NTP standard, and is the current development version, but has not been formalized in an RFC.
...
Installation.
Install Using The 'apt-get' Software
Start by installing the NTP software daemon some utilities and the documentation (ntp-doc) which is only necessary if you want to find out more.
Stop The Server And Create Some Backups
Before we do anything else we will:
sudo /etc/init.d/ntp stop
Finding Some Public Time Servers.
What Are Time Servers?
In very simple terms and without getting into all the maths involved regarding how the Time Servers work. you will not need to find some time servers to use with your computer or computers.
The NTP Time servers operate with a hierarchy of levels, these levels are called the stratum with each being assigned a number from 1 to 16. Stratum 1 (primary) servers, are the most accurate, at the lowest level and are directly synchronized to national time services.
Stratum 2 (secondary) servers at the next level up are synchronize to stratum 1 servers and so on. Unless you are maintaining this NTP for a commercial build cluster or some other network of machines. You will not be inconvenienced by a very slight inaccuracy (less than 20ms) in the synchronized time. We can therefore use Time Servers from the Public Pool. Even then you should find servers that are physically close to you, as the Internet goes, as this will give better accuracy. Since we are NTP clients and servers with a relatively small number of clients, we do not synchronize to public primary servers. We will use some of the hundreds of public Time Servers and still get astonishingly accurate time synchronization.
Time Server - Rules Of Engagement
Please read the Rules of Engagement before going any further with this HOWTO. It gives a nice clear concise explanation of which type of server to use and why.
Looking At The Lists Of Time Servers
Again without going into all the complex maths you need to find 4 time servers. This removes single point of failure if you only connect to one server and it goes down. Also connecting to two or three servers does not give protection again "Bad" Time Servers.
There are hundreds of NTP Pool Time Servers that have been added to form a virtual cluster, by the NTP Pool Project. You can very simply find the names of the servers you will use as they are arranged in to geographical pools. As I live in England I will be using the UK pool. There are more than 4 servers so I don't have to pick and mix. The pool servers are allocated at random via a DNS round robin (well not so random). For me I will be using four server from the UK pool. Now to start adding the chosen time servers to the file file. This is actually the very basic requirements for setting up an NTP server and should work, without any further changes. Okay, now load up the configuration file with your favourite editor and paste in the lines below. Remember to run this as root and save the new lines.
driftfile /var/lib/ntp/ntp.drift
Types Of Server
NTP documentation mentions server type. This was something that seemed to be accepted as a fact but what made a server a certain type was buried somewhere else. Here you can find a quick answer to this rather useful definition. The type the server is given by NTP is defined by the class of the IP address. Addresses are classed by type as: