Simple Linux NTP Server Configuration

Having been designed on Linux, NTP (Network Time Protocol) is relatively simple to configure on a Linux machine. By using NTP (available free to download via any Linux machine can be easily set up to run as an NTP server.

Once downloaded the NTP distribution should contain the NTP daemon and also a number of utilities and configuration scripts. These aid the installation process and provide debugging facilities. The NTP daemon is configured using the file ‘ntp.conf’. A list of commands can be specified in the ‘ntp.conf’ file to indicate which servers to synchronise to and to specify various authentication and access options.

The NTP daemon synchronises to an external reference clock. The internet can be used as a time source but these can’t be authenticated and being the wrong side of the firewall could leave the system compromised. It’s much better to use an external source such as a GPS clock or radio clock that receive time from long wave transmissions (broadcast by such institutions as NIST or NPL).

Multiple external time servers can be specified in the configuration file, which allows NTP server to select the most appropriate time server and to use an average of the most reliable sources ensuing a higher level of accuracy.

The NTP daemon is controlled by a series of scripts such as ‘ntpd start’, ‘ntp stop’ or ‘ntpd restart’. Debugging and querying can be done by using the ‘ntpq’ utility. This utility provides information relating to the synchronisation status of the NTP daemon.

The NTP Server and Accurate Time

Accurate time on a network is essential for all businesses and institutions. Without an accurately synchronised system a computer network can be vulnerable to all sorts of problems, from malicious hackers and other security threats to fraud and data loss.

Network Time Protocol
is the key to keeping accurate time it is a software algorithm that has been constantly developed for over two decades. NTP takes a single time source that is received by the NTP server and distributes it across a network ensuring all machines in that network are running to exact same time.

Whilst NTP can maintain synchronisation of a network to within a few milliseconds it is only as good as the time source it receives. A dedicated NTP server will use a time signal from an external source and so keep the network secure as the firewall will not have to be disturbed.

The two preferred methods for most users of NTP servers is the GPS network (Global Positioning System) or specialist time and frequency transmissions put out be several national physics labs such as the UK’s NPL.

These time signals are UTC (Coordinated Universal Time) which is the world’s civil timescale. A NTP server receiving time source from either a frequency transmission or the GPS network can realistically provide accuracy to within a few milliseconds of UTC

The NTP Server – Selecting a Time Source Check List

In selecting a timing source to synchronise a computer network to using a NTP server (Network Time Protocol) it is important that the time source is accurate, secure and a source of UTC (Coordinated Universal Time). UTC is a global timescale used by computer networks, business and commerce across the globe.

Whilst UTC is freely available across the Internet it is neither accurate nor secure (being as it is external to your firewall).  Also Internet time sources cannot be authenticated which is NTP’s own method of ensuring a time source is what it says it is. There are two secure, accurate and reliable methods for receiving UTC via a NTP server and both come with their own advantages and drawbacks.

The first method is to use the GPS network (Global Positioning System).The main advantage of using the signals transmitted from a GPS satellite’s onboard atomic clock is that a signal is available anywhere on the planet. However it does come with a downside. As the signals are all line-of-sight it means that the GPS antenna needs to be placed on a roof to ensure connectivity with a satellite.

An alternative to the GPS signal but equally as accurate and reliable is to make use of the long wave radio transmissions broadcast by several national physics laboratories. These signals, such as the UK’s MSF, Germany’s DCF-77 and the United States’ WWVB transmissions, can often be picked up inside buildings making them ideal for a solution if a rooftop is unavailable for a GPS antenna. It must be noted that not every country broadcasts such a signal and whilst most transmissions can be picked up in neighbouring countries the signals are vulnerable to interference and local geography.

NTP Server the German DCF 77 signal

The NTP server is a tool for keeping computer networks synchronised. Without adequate synchronisation networks can be left vulnerable to security threats, data loss, fraud and may find it impossible to interact with other networks across the globe.

Computer networks are normally synchronised to the global timescale UTC (Coordinated Universal Time) enabling them to communicate effectively with other networks also running UTC.

In Europe there are several methods of receiving UTC time. The Internet is an obvious choice but as these time signals are external to the network firewall they can prove a security risk. Internet time sources can also be unreliable in their precision or too far away to make any useful synchronisation.

The GPS network is available everywhere on the planet as long as there is a good clear view of the sky and many NTP server devices are designed to receive such a signal.

In Europe there is another alternative, however, to provide accurate and reliable time. The National Physics Laboratory near Frankfurt, Germany broadcast a long wave frequency time signal based on a constellation of atomic clocks. This time signal is known as the DCF-77 signal and is available across much of Europe (as far as Portugal during the evening).

DCF 77 is an reliable and secure method of receiving UTC and as it is derived from a constellation for atomic clocks is highly accurate.  A NTP server received a DCF time signal can provide accuracy to within a few milliseconds of UTC.

NTP Server and Digital Wall Clocks

Many network administrators are aware of the NTP server (Network Time Protocol) and how it synchronises a computer network to UTC time (Coordinated Universal Time). These devices have revolutionised the way we work and trade in the global marketplace ensuring that computer networks from across the world are synchronised to the same time.

But computer networks are not the only part of an organisation that requires to know the time, people too are constantly relying on the time and if a computer network is running reliable and accurate time then it makes sense that the workforce is too.

However, in many organisations it is common for the office wall clock to be several minutes behind or ahead of the NTP server which is why many office managers now insist that digital wall clocks are used that connect to a NTP server.

Digital wall clocks can be used to display the correct UTC time in any location. These devices ensure that everybody in your organisation can be aware of the exact UTC time and that entire organisations can be synchronised to the exact same time.

Displaying hours, minute sand seconds these devices are easy to install and can be powered by Ethernet (POE).

Digital Wall Clock

Digital wall clock with seconds

Digital wall clock with seconds

1000 Free NTP Servers in Europe

The NTP Pool of time servers has announced that they now have a collection of over 1,000 time servers in Europe alone. The NTP pool was set up to prevent NTP server abuse and to insure there is not too much strain on the stratum 1 time servers.

The pool is now so popular over one million users choose top get their timing sources from there as most of the stratum 2 NTP servers on the NTP pool website are free to use and access over the Internet.

The NTP Pool is an ideal location for those running single machines or smaller networks were security and accuracy is not really an issue, however, for those charged with running a secure network or where accuracy is really important then internet time servers should not be seriously considered.

Unfortunately Internet time services cannot be authenticated (NTP’s security measure) which can leave a machine vulnerable, furthermore, Internet time sources are outside of a network’s firewall so a port needs to be left open to allow the time server can network to communicate.

For those serious about synchronisation there is no alternative other than to invest in a dedicated NTP server that receives its time securely from either radio signals or the GPS network.

NTP Server History – Acquiring Precision

When we take a glance at our watches or the office clock we often take for granted that the time we are given is correct. We may notice if our watches are ten minutes fast or slow but take little heed if they are a second or two out.

Yet for thousands of years mankind has strode to get ever increasingly accurate clocks the benefits of which are plentiful today in our age of satellite navigation, NTP servers, the Internet and global communications.

To understand how accurate time can be measured it is first important to understand the concept of time itself. Time as it has been measured on Earth for millennia is a different concept to time itself which as Einstein informed us was part of the fabric of the universe itself in what he described as a four dimensional space-time.

Yet we have historically measured time based not on the passing of time itself but the rotation of our planet in relation to the Sun and the Moon. A day is divided into 24 equal parts (hours) each of which is divided into 60 minutes and the minute is divided into 60 seconds.

However, it has now been realised that measuring time this way can not be considered accurate as the Earth’s rotation varies from day to day. All sorts of variable such as tidal forces, hurricanes, solar winds and even the amount of snow at the poles effects the speed of the Earth’s rotation. In fact when the dinosaurs first started roaming the Earth, the length of a day as we measure it now would have only been 22 hours.

We now base our timekeeping on the transition of atoms with a second based on 9,192,631,770 periods of the radiation emitted by the hyperfine transition of a unionized caesium atom in the ground state. Whilst this may sound complicated it really is just an atomic ‘tick’ that never alters and therefore can provide a highly accurate reference to base our time on.

Atomic clocks use this atomic resonance and can keep time that is so accurate a second isn’t lost in even a billion years. Modern technologies all take advantage of this precision enabling many of the communications and global trade we benefit from today with the utilisation of satellite navigation, NTP servers and air traffic control changing the way we live our lives.