Category: Time Synchronisation

The NTP Server Time Synchronisation Made Easy

  |   By

Time synchronisation is often described as a ‘headache’ by network administrators. Keeping computers on a network all running the same time is increasingly important in modern network communications particularly if a network has to communicate with another network running independently.

For this reason UTC (Coordinated Universal Time) has been developed to ensure all networks are running the same accurate timescale. UTC is based on the time told by atomic clocks so it is highly precise, never losing even a second. Network time synchronisation is however, relatively straight forward thanks to the protocol NTP (Network Time Protocol).

UTC time sources are widely available with over a thousand online stratum 1 servers available on the Internet. The stratum level describes how far away a time server is to an atomic clock (an atomic clock that generates UTC is known as a stratum 0 device). Most time servers available on the Internet are in fact not stratum 1 devices but stratum in that they get their time from a device that in turn receives the UTC time signal.

For many applications this can be accurate enough but as these timing sources are on the Internet there is very little you can do to ensure both their accuracy and their precision. In fact even if an Internet source is highly accurate the distance away form it can cause delays int eh time signal.

Internet time sources are also unsecure as they are situated outside of the firewall forcing the network to be left open for the time requests. For this reason network administrators serious about time synchronisation opt to use their own external stratum 1 server.

These devices, often called a NTP server, receive a UTC time source from a trusted and secure source such as a GPS satellite then distribute it amongst the network. The NTP server is far more secure than an Internet based time source and are relatively inexpensive and highly accurate.

NTP Server Time synchronisation for Dummies

  |   By

Time synchronisation is extremely important for modern computer networks. In some industries time synchronisation is absolutely vital especially when you are dealing with technologies such as air traffic control or marine navigation where hundreds of lives could be put at risk by lack of precise time.

Even in the financial world, correct time synchronisation is vital as millions can be added or wiped off share prices every second. For this reason the entire world adheres to a global timescale known as coordinated universal time (UTC). However, adhering to UTC and keeping UTC precise are two different things.

Most computer clocks are simple oscillators that will slowly drift either faster or slower. Unfortunately this means that no matter how accurate they are set on Monday they will have drifted by Friday. This drift may be only a fraction of a second but it soon won’t take long for the originally UTC time to be over a second out.

In many industries this may not mean a matter of life and death of the loss of millions in stocks and shares but lack of time synchronisation can have unforeseen consequences such as leaving a company less protected from fraud. However, receiving and keeping true UTC time is quite straight forward.

Dedicated network time servers are available that uses the protocol NTP (Network Time Protocol) to continually check the time of a network against a source of UTC time. These devices are often referred to as an NTP server, time server or network time server. The NTP server constantly adjusts all devices on a network to ensure that the machines are not drifting from UTC.

UTC is available from several sources including the GPS network. This is an ideal source of UTC time as it is secure, reliable and available everywhere on the planet. UTC is also available via specialist national radio transmissions which are broadcast from national physics laboratories although they are not available everywhere.

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

Keeping Track of the Worlds Time and Difficulties in Synchronisation

  |   By

Until 1967 the second was defined using the motion of the Earth which rotates once on its axis every 24 hours, and there are 3,600 seconds in that hour and 86,400 in 24.

That would be fine if the earth was punctual but in fact it is not. The Earth’s rotation rate changes every day by thousands of nanoseconds, and this is due in a large part to wind and waves spinning around the Earth and causing drag.

Over the course of thousands of days, these changes in the rate of rotation can result in the Earth’s spin getting out of synch with the high-precision atomic clocks that we use to keep the UTC system (Coordinated Universal Time) ticking over. For this reason the Earth’s rotation is monitored and timed using the far off flashes from a type of collapsed star called a quasar that flash with an ultra precise rhythm many millions of light years away. By monitoring the Earth’s spin against these far away objects it can be worked out how much the rotation has slowed.

Once a second of slowing has been built up, The International Earth Rotation Service (IERS), recommends a Leap Second to be added, usually at the end of the year.

Other complications arise when it comes to synchronising the Earth to one timescale. In 1905, Albert Einstein’s theory of relativity showed that there is no such thing as absolute time. Every clock, everywhere in the universe, ticks at a different rate. For GPS, this is an enormous issue because it turns out that the clocks on the satellites drift by almost 40,000 nanoseconds per day relative to the clocks on the ground because they are high above the Earth’s surface (and therefore in a weaker gravitational field) and are moving fast relative to the ground.

And as light can travel Forty-thousand feet in that time, you can see the problem. Einstein’s equations first written down in 1905 and 1915 are used to correct for this time-shift, allowing GPS to work, planes to navigate safely and GPS NTP servers to receive the correct time.

MSF Technical Information

  |   By

The MSF transmission from Anthorn (latitude 54° 55′ N, longitude 3° 15′ W) is the principal means of disseminating the UK national standards of time and frequency which are maintained by the National Physical Laboratory. The effective monopole radiated power is 15 kW and the antenna is substantially omnidirectional. The signal strength is greater than 10 mV/m at 100 km and greater than 100 μV/m at 1000 km from the transmitter. The signal is widely used in northern and western Europe. The carrier frequency is maintained at 60 kHz to within 2 parts in 1012.

Simple on-off carrier modulation is used, the rise and fall times of the carrier are determined by the combination of antenna and transmitter. The timing of these edges is governed by the seconds and minutes of Coordinated Universal Time (UTC), which is always within a second of Greenwich Mean Time (GMT). Every UTC second is marked by an ‘off’ preceded by at least 500 ms of carrier, and this second marker is transmitted with an accuracy better than ±1 ms.

The first second of the minute begins with a period of 500 ms with the carrier off, to serve as a minute marker. The other 59 (or, exceptionally, 60 or 58) seconds of the minute always begin with at least 100 ms ‘off’ and end with at least 700 ms of carrier. Seconds 01-16 carry information for the current minute about the difference (DUT1) between astronomical time and atomic time, and the remaining seconds convey the time and date code. The time and date code information is always given in terms of UK clock time and date, which is UTC in winter and UTC+1h when Summer Time is in effect, and it relates to the minute following that in which it is transmitted.

Dedicated MSF NTP Server devices are available that can connect directly to the MSF transmission.

Information Courtesy of NPL

Utilising UTC

  |   By

To receive and distribute and authenticated UTC time source there are currently two types of NTP server, the GPS NTP server and the radio referenced NTP server. While both these systems distribute UTC in identical ways the way they receive the timing information differs.

A GPS NTP time server is an ideal time and frequency source because it can provide highly accurate time anywhere in the world using relatively cheap components.  Each GPS satellite transmits in two frequencies L2 for the military use and L1 for use by civilians transmitted at 1575 MHz, Low-cost GPS antennas and receivers are now widely available.

The radio signal transmitted by the satellite can pass through windows but can be blocked by buildings so the ideal location for a GPS antenna is on a rooftop with a good view of the sky. The more satellites it can receive from the better the signal. However, roof-mounted antennas can be prone to lighting strikes or other voltage surges so a suppressor is highly recommend being installed inline on the GPS cable.

The cable between the GPS antenna and receiver is also critical. The maximum distance that a cable can run is normally only 20-30 metres but a high quality coax cable combined with a GPS amplifier placed in-line to boost the gain of the antenna can allow in excess of 100 metre cable runs. This can provide difficulties in installation in larger buildings if the server is too far from the antenna.

An alternative solution is to use a radio referenced NTP time server. These rely on a number of national time and frequency radio transmissions that that broadcast UTC time. In Britain the signal (called MSF) is broadcast by the National Physics Laboratory in Cumbria which serves as the United Kingdom’s national time reference, there are also similar systems in the USA (WWVB) and in France, Germany and Japan.

A radio based NTP server usually consists of a rack-mountable time server, and an antenna, consisting of a ferrite bar inside a plastic enclosure, which receives the radio time and frequency broadcast. It should always be mounted horizontally at a right angle toward the transmission for optimum signal strength. Data is sent in pulses, 60 a second. These signals provides UTC time to an accuracy of 100 microseconds, however, the radio signal has a finite range and is vulnerable to interference.