NTP Server History Acquiring Precision

  |   By

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 using atomic clocks 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.

The NTP Server and the Atomic Clock Reason for Precision

  |   By

In an age of atomic clocks and the NTP server time keeping is now more accurate then ever with ever increasing precision having allowed many of the technologies and systems we now take for granted.

Whilst timekeeping has always been a preoccupation of mankind, it has only been in the last few decades that true accuracy has been possible thanks to the advent of the atomic clock.

Before atomic time, electrical oscillators like those found in the average digital watch were the most accurate measure of time and whilst electronic clocks like these are far more precise than their predecessors – the mechanical clocks, they can still drift by up to a second a week.

But why does time need to be so precise, after all, how important can a second be? In the day-to-day running of our lives a second isn’t that important and electronic clocks (and even mechanical ones) provide adequate timekeeping for our needs.

In our day-to-day lives a second makes little difference but in many modern applications a second can be an age.

Modern satellite navigation is one example. These devices can pinpoint a location anywhere on earth to within a few metres. Yet they can only do this because of the ultra-precise nature of the atomic clocks that control the system as the time signal sent from the navigation satellites travels at the speed of light which is nearly 300,000 km a second.

As light can travel such a vast distance in a second any atomic clock governing a satellite navigation system that was just one second out it would the positioning would be inaccurate by thousands of miles, rendering the positioning system useless.

There are many other technologies that require similar accuracy and also many of the ways we trade and communicate. Stocks and shares fluctuate up and down every second and global trade requires that everybody all over the world has to communicate using the same time.

Most computer networks are controlled by using a NTP server (Network Time Protocol). These devices allow computer networks to all use the same atomic clock based timescale UTC (coordinated universal time). By utilising UTC via a NTP server, computer networks can be synchronised to within a few milliseconds of each other.

NTP Server running a network (Part 2)

  |   By

Organising Strata

Stratum levels describe the distance between a device and the reference clock. For instance an atomic clock based in a physics laboratory or GPS satellite is a stratum 0 device. A stratum 1 device is a time server that receives time from a stratum 0 device so any dedicated NTP server is stratum 1. Devices that receive the time from the time server such as computers and routers are stratum 2 devices.

NTP can support up to 16 stratum levels and although there is a drop-off in accuracy the further away you go stratum levels are designed to allow huge networks to all receive a time from a single NTP server without causing network congestion or a blockage in the bandwidth.

When using a NTP server it is important to not overload the device with time requests so the network should be divided with a select number of machines taking requests from the NTP server (the NTP server manufacturer can recommend the number of requests it can handle). These stratum 2 devices can ten be used as time references for other devices (which become stratum 3 devices) on very large networks these can then be used as time references themselves.

NTP Server running a network (Part 1)

  |   By

NTP servers are a vital tool for any business that needs to communicate globally and securely. NTP servers distribute Coordinated Universal Time (UTC), the world’s global timescale based on the highly accurate time told by atomic clocks.

NTP (Network Time Protocol) is the protocol used to distribute the UTC time across a network it also ensures all time is accurate and stable. However, there are many pitfalls in setting up a NTP network, here are the most common:

Using the correct time source

Attaining the most suitable time source is fundamental in setting up a NTP network. The time source is going to be distributed amongst all machines and devices on a network so it is vital that it is not only accurate but also stable and secure.

Many system administrators cut corners with a time source. Some will decide to use an Internet based time source although these are not secure as the firewall will require an opening and also many internet sources are either wholly inaccurate or too far away to afford any useful precision.

There are two highly secure methods of receiving a UTC time source. The first is to utilise the GPS network which although doesn’t transmit UTC, GPS time is based on International atomic time and is therefore easy for NTP to convert. GPS time signals are also readily available all over the globe.

The second method is to use the long wave radio signals broadcast by some national physical laboratories. These signals, however, are not available in every country and they have a finite range and are susceptible to interference and local topography.

NTP Server Configuration for Windows and Linux

  |   By

Network Time Protocol has been developed to keep computers synchronized. All computers are prone to drift and accurate timing is essential for many time critical applications.

A version of NTP is installed on most versions of Windows (although a stripped down version called SNTP –Simplified NTP- is in older versions) and Linux but is free to download from NTP.org.

When synchronising a a network it is preferable to use a dedicated NTP server that receives a timing source from an atomic clock either via specialist radio transmissions or the GPS network. However, many Internet time references are available, some more reliable than others, although it must be noted Internet based time sources can’t be authenticated by NTP, leaving your computer vulnerable to threats.

NTP is hierarchical and arranged into stratum. Stratum 0 is timing reference, while stratum 1 is a server connected to a stratum 0 timing source and a stratum 2 is a computer (or device) attached to a stratum 1 server.

The Basic configuration of NTP is done using the /etc/ntp.conf file you have to edit it and place the IP address of stratum 1 and stratum 2 servers. Here is an example of a basic ntp.conf file:

server xxx.yyy.zzz.aaa prefer (time server address such as time.windows.com)

server 123.123.1.0

server 122.123.1.0 stratum 3

Driftfile /etc/ntp/drift

The most basic ntp.conf file will list 2 servers, one that it wishes to synchronise too and an IP address for itself. It is good housekeeping to have more than one server for reference in case one goes down.

A server with the tag ‘prefer’ is used for a trusted source ensuring NTP will always use that server when possible. The IP address will be used in case of problems when NTP will synchonise with itself is. The drift file is where NTP builds a record of the system clock’s drift rate and automatically adjusts for it.

NTP will adjust your system time but only slowly. NTP will await at least ten packets of information before trusting the time source. To test NTP simply change your system clock by half an hour at the end of the day and the time in the morning should be correct.

Atomic Clock Synchronization using WWVB

  |   By

Accurate time using Atomic Clocks is available across North America using the WWVB Atomic Clock time signal transmitted from Fort Collins, Colorado; it provides the ability to synchronize the time on computers and other electrical equipment.

The North American WWVB signal is operated by NIST – the National Institute of Standards and Technology. WWVB has high transmitter power (50,000 watts), a very efficient antenna and an extremely low frequency (60,000 Hz). For comparison, a typical AM radio station broadcasts at a frequency of 1,000,000 Hz. The combination of high power and low frequency gives the radio waves from WWVB a lot of bounce, and this single station can therefore cover the entire continental United States plus much of Canada and Central America.

The time codes are sent from WWVB using one of the simplest systems possible, and at a very low data rate of one bit per second. The 60,000 Hz signal is always transmitted, but every second it is significantly reduced in power for a period of 0.2, 0.5 or 0.8 seconds: • 0.2 seconds of reduced power means a binary zero • 0.5 seconds of reduced power is a binary one. • 0.8 seconds of reduced power is a separator. The time code is sent in BCD (Binary Coded Decimal) and indicates minutes, hours, day of the year and year, along with information about daylight savings time and leap years.

The time is transmitted using 53 bits and 7 separators, and therefore takes 60 seconds to transmit. A clock or watch can contain an extremely small and relatively simple antenna and receiver to decode the information in the signal and set the clock’s time accurately. All that you have to do is set the time zone, and the atomic clock will display the correct time.

Dedicated NTP time servers that are tuned to receive the WWVB time signal are available. These devices connect o a computer network like any other server only these receive the timing signal and distribute it to other machines on the network using NTP (Network Time Protocol).

Atomic Clock Synchronisation using MSF

  |   By

Accurate time using Atomic Clocks is available across Great Britain and parts of northern Europe using the MSF Atomic Clock time signal transmitted from Cumbria, UK; it provides the ability to synchronize the time on computers and other electrical equipment.

The UK MSF signal is operated by NPL – the National Physical Laboratory. MSF has high transmitter power (50,000 watts), a very efficient antenna and an extremely low frequency (60,000 Hz). For comparison, a typical AM radio station broadcasts at a frequency of 1,000,000 Hz. The combination of high power and low frequency gives the radio waves from MSF a lot of bounce, and this single station can therefore cover most of Britain and some of continental Europe.

The time codes are sent from MSF using one of the simplest systems possible, and at a very low data rate of one bit per second. The 60,000 Hz signal is always transmitted, but every second it is significantly reduced in power for a period of 0.2, 0.5 or 0.8 seconds: • 0.2 seconds of reduced power means a binary zero • 0.5 seconds of reduced power is a binary one. • 0.8 seconds of reduced power is a separator. The time code is sent in BCD (Binary Coded Decimal) and indicates minutes, hours, day of the year and year, along with information about daylight savings time and leap years.

The time is transmitted using 53 bits and 7 separators, and therefore takes 60 seconds to transmit. A clock or watch can contain an extremely small and relatively simple antenna and receiver to decode the information in the signal and set the clock’s time accurately. All that you have to do is set the time zone, and the atomic clock will display the correct time.

Dedicated time servers that are tuned to receive the MSF time signal are available. These devices connect o a computer network like any other server only these receive the timing signal and distribute it to other machines on the network using NTP (Network Time Protocol).

Correcting Network Time

  |   By

Distributed networks rely completely on the correct time. Computers need timestamps to order events and when a collection of machines are working together it is imperative they run the same time.

Unfortunately modern PC’s are not designed to be perfect timekeepers. Their system clocks are simple electronic oscillators and are prone to drift. This is not normally a problem when the machines are working independently but when they are communicating across a network all sorts of problems can occur.

From emails arriving before they have been sent to entire system crashes, lack of synchronisation can causes untold problems across a network and it is for this reason that network time servers are used to ensure the entire network is synchronised together.

Network time servers come in two forms – The GPS time server and the radio referenced time server. GPS NTP servers use the time signal broadcast from GPS satellites. This is extremely accurate as it is generated by an atomic clock on board the GPS satellite. Radio referenced NTP servers use a long wave transmission broadcast by several national physics laboratories.

Both these methods are a good source of Coordinated Universal Time (UTC) the world’s global timescale. UTC is used by networks across the globe and synchronising to it allows computer networks to communicate confidently and partake of time sensitive transactions without error.

Some administrators use the Internet to receive a UTC time source. Whilst a dedicated network time server is not required to do this it does have security drawbacks in that a port is needed to be left open in the firewall for the computer to communicate with the NTP server, this can leave a system vulnerable and open to attack. Furthermore, Internet time sources are notoriously unreliable with many either too inaccurate or too far away to serve any useful purpose.

Why the Need for NTP

  |   By

Network Time Protocol is an Internet protocol used to synchronize computer clocks to a stable and precise time reference. NTP was originally developed by Professor David L. Mills at the University of Delaware in 1985 and is an Internet standard protocol.

NTP was developed to solve the problem of multiple computers working together and having the different time. Whilst, time usually just advances, if programs are running on different computers time should advance even if you switch from one computer to another. However, if one system is ahead of the other, switching between these systems would cause time to jump forward and back.

As a consequence, networks may run their own time, but as soon as you connect to the Internet, effects become visible. Just Email messages arrive before they were sent, and are even replied to before they were mailed!

Whilst this sort of problem may seem innocuous when it comes to receiving email, however, in some environments a lack of synchronisation can have disastrous results this is why air traffic control was one of the first applications for NTP.

NTP uses a single time source and distributes it amongst all devices on a network it does this by using an algorithm that works out how much to adjust a system clock to ensure synchronisation.

NTP works on a hierarchical basis to ensure there are no network traffic and bandwidth problems. It uses a single time source, normally UTC (coordinated universal time) and receives time requests from the machines on the top of the hierarch which then pass the time on further down the chain.

Most networks that utilise NTP will use a dedicated network time server to receive their UTC time signal. These can receive the time from the GPS network or radio transmissions broadcast by national physics laboratories. These dedicated NTP time servers are ideal as they receive time direct from an atomic clock source they are also secure as they are situated externally and therefore do not require interruptions in the network firewall.