LATEST OFFERS FROM UK2

Joining the NTP Pool project

If you have your own server, why not consider joining the pool.ntp.org project to help provide accurate time to many client machines?

NTP, or Network Time Protocol, is a method for computers to obtain the current time accurately in order to keep their clocks correct. Even when set accurately, the clock on most computers will eventually drift until it is no longer accurate – often made worse when the computer is being heavily loaded.

NTP allows a client to ask a time server to tell it the current time. The “main” timeservers have accurate timekeeping equipment connected (GPS receivers are common) to give them the correct time. Other timeservers simply keep in sync with several main servers, and accept requests from client machines.

What is the pool.ntp.org project?

The pool.ntp.org project is a big virtual cluster of timeservers striving to provide reliable easy to use NTP service for millions of clients without putting a strain on the big popular timeservers.

The “pool” contains a number of servers, often operated by volunteers, using DNS to automatically spread clients between available servers. This allows client machines to simply use a hostname like uk.pool.ntp.org which will resolve to a suitable server.

The pool is now enormously popular, being used by millions of systems around the world. It’s the default “time server” for most of the major Linux distributions. At the time of writing there are 1,419 servers taking part in the pool.

How to join the pool

Configure NTP

Firstly, be aware that joining the pool is a relatively long-term commitment; it’s easy enough to remove your machine from the pool, but due to the way NTP clients operate it may take weeks before the inbound NTP traffic fully stops, and if your machine isn’t answering requests during that time, it may interfere with clients ability to obtain an accurate time.

You’ll need a reasonable server with a permanent, reliable Internet connection and a static IP address; ideally a server hosted in a datacentre somewhere. If you have a UK2 dedicated server, that will do the trick nicely 🙂

Running an NTP server doesn’t require massive CPU power or bandwidth (NTP packets are small UDP packets, generally 76 bytes). To give you an idea what to expect: my NTP server is currently answering requests at an average rate of 22 requests per second. At that rate, you can expect to transfer approximately 4GB per month, which is hardly a lot of bandwidth – especially if you have a UK2 server with our generous 10,000GB monthly data transfer allowance!

Firstly, you’ll need to install ntpd if you don’t already have it installed. I use Debian, and was able to install it quickly and easily with:

apt-get install ntp

You’ll need to edit /etc/ntp.conf to add several good servers. Look at the stratum 2 servers list and pick some geographically close to you. I would recommend 4-5 good servers, perhaps 6-7. For each server, add a line to ntp.conf like:

server server.name.here

Most servers are listed as OpenAccess, which means that anyone may use them; if the server has “Yes” in the Notify column then you’re asked to notify the owner of the server that you wish to peer with them – this is not a requirement but should be followed. If a server is listed as RestrictedAccess you should not use it until you’ve contacted the server owner and gained their approval.

Once you have ntp.conf filled out correctly, start NTP (for Debian/Ubuntu, /etc/init.d/ntp start ought to do it), you can use the ntpq command to list the servers your server is going to peer with:

List your server

You will not see traffic immediately; the pool.ntp.org system will monitor your server for a while and ensure that it seems reliable. Once your server has reached an “availability score” of 5 or more, it will be included in the DNS. You can expect this to take a few hours at least.