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 NTP.org) 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.

NTP Server News – Calls to Abolish the Leap Second

Be careful when counting down to the New Year this week as an extra second is to be added to the last minute of 2008. Leap Seconds are added to UTC (Coordinated Universal Time) the time used by most NTP Server systems and has been going on since its inception in 1972 with a total of 33 seconds having already been added to UTC since then.

However there are calls to make this leap second the last ever. The International Telecommunications Union (ITU) is proposing to abolish them in favour of adding a “leap hour” every 600 years.

They claim that the Leap Second creates confusion and can cause software crashes. They cite 1996 as an example, when computers at Associated Press Radio crashed causing them to broadcast the wrong programmes, and a 2003 bug caused some GPS units to show the time as 62:30.

However, there is stiff opposition to abolishing the Leap Second, among them astronomers, Robert Massey of the Royal Astronomical Society told the London Times: “It would be a change with profound cultural implications.  We’d be decoupling our clocks from what the Sun is telling us.”

The implications for astronomers would require expensive changes to the software of astronomical telescopes and it would become almost impossible for sailors to navigate by sextant. It would also mean the Britain would lose its role as the World’s timekeepers as the Greenwich Meridian (the position of the sun at midday) would gradually move south to France until the proposed leap hour would return it to its original position after 600 years.

Useful NTP server related resources

NTP.org – The home for the NTP Project who provides support and additional development resources for the Official Reference Implementation of NTP.

NTP Project support pages

THE NTP pool – list of public servers

NPL – The National Physical Laboratory in the UK who control the MSF radio signal.

The University of Delaware and David Mills’ information page, Professor Mills is the original inventor and developer of NTP

David Mills’ list of Public NTP Time Servers a list of public NTP servers

National Institute of Standards and Technology (NIST) who operate the USA’s WWVB radio signal

Europe’s largest supplier of NTP server related products.

Galleon UK – NTP server products for the UK

ntp-time-server.com – one of the largest time and frequency suppliers in the United States

NTP – Wikipedia article on NTP

NTP server checker – free tool to ensure time server accuracy

NTP server – Instruments of Precision

Time synchronisation in the modern age is highly precise. Modern atomic clocks can keep time so accurately that in 100 million years these timekeeping devices will not lose even a second.

Bit is this sort of accuracy necessary in the modern world? How important can a second possibly be, after all, a second has always been seen as one of the smallest units of time.

However, when you consider modern technology such as the satellite navigation then a second suddenly becomes a huge gulf in time. Modern satellite navigation devices work by calculating distance by using the time form the atomic clocks on GPS (Global Positioning System) satellites.

However, when you consider that the speed of light is close to 300, 000 km a second then you can understand that if a GPS clock is a second out then your navigation could be inaccurate by hundreds of thousands of kilometres.

The same is true for modern computer networks. Computers can process thousands of transactions a second so when it comes to global network communication a second can be a huge amount of time.

That is why modern NTP server’s, responsible for synchronising networks offer precision to the millisecond, ensuring that network across the globe are within a hare’s breath of each other.