Timescales of NTP and advanced time server information

  |   By

The NTP timescale is based on UTC (Coordinated Universal Time) which is a global civil timescale that is based on International Atomic Time (TAI) but accounts for the slowing of the Earth’s spin by intermittingly adding ‘leap seconds.’

This is done to ensure that UTC is kept in coincidence with GMT (Greenwich Meantime, often referred to as UT1). Failing to account for the Earth’s slowing in its rotation (and occasional speeding up) would mean that UTC would fall out of synchronisation with GMT and noon, when the sun is traditionally the highest in the sky would drift. In fact if leap seconds were not added eventually noon would fall at midnight and vice versa (albeit in several millennia).

Not everybody is happy with leap seconds, there are those that feel that adding of seconds to keep the Earth’s rotation and UTC inline is nothing but a fudge. However, failing to do so would make such things as astronomical observations impossible as astronomers need to know the exact positioning of the stellar bodies and farmers are pretty reliant on the Earth’s rotation too.

The NTP clock represents time in a totally different way to the way humans perceive time. Instead of formatting time into minutes, hours, days, months and years, NTP uses a continuous number that represents the number of seconds that have past since 0h 1 January 1900. This is known as the prime epoch.

The seconds counted from the prime epoch continue to rise but wraps around every 136 years. The first wrap-around will take place in 2036, 136 years since the prime epoch. To deal with this NTP will utilise an era integer, so when the seconds reset to zero, the integer 1 will represent the first era and negative integers represent the eras before the prime epoch.

Time servers that receive their time from the GPS system are not in fact receiving UTC, primarily because the GPS network was in development before the first leap second but they are based on TAI.  However, GPS time is converted to UTC by the GPS time server.

The radio transmission broadcast from national physics laboratories such as MSF, DCF or WWVB are all based on UTC and so the time servers do not need to do any conversion.

Network Time Protocol Security

  |   By

The protocol used by most network time servers is NTP (Network Time Protocol) and has been around for quite a long time yet it is constantly being updated and developed offering ever higher levels of accuracy and security.

Synchronisation is an essential part of modern computer networks and is essential for keeping a system secure. Without NTP and time synchronisation a computer network can be vulnerable o malicious attacks and even fraud.

Even with a perfectly synchronised network security can still be an issue but there are a few key steps that can be taken to ensure your network is kept secure.

Always use a dedicated Network Time Server. Whilst Internet time sources are common place they are a time source situated outside the firewall. This will have obvious security draw backs as a malicious user can take advantage of the ‘hole’ left in your firewall to communicate with the NTP server. A dedicated NTP server will receive a time signal from an external source.

Normally these types of dedicated time servers will utilise either the GPS network (Global Positioning System) or specialist national time and frequency radio transmissions. Both these time sources offer an accurate and reliable method of UTC time (coordinated universal time) whilst also being secure.

Another way to ensure security is to take advantage of NTP’s built-in security mechanism – authentication. Authentication is a set of encrypted keys that are used to establish if the time source is coming from where it is claiming to come from.

Authentication verifies that each timestamp has come from the intended time reference by analysing a set of agreed encryption keys that are sent along with the time information. NTP, using Message Digest encryption (MD5) to un-encrypt the key, analyses it and confirms whether it has come from the trusted time source by verifying it against a set of trusted keys.

Trusted authentication keys are listed in the NTP server configuration file (ntp.conf) and are stored in the ntp.keys file. The key file is normally very large but trusted keys tell the NTP server which set of subset of keys is currently active and which are not. Different subsets can be activated without editing the ntp.keys file using the trusted-keys config command.

Authentication is highly important in protecting a NTP server from malicious attack; however Internet time sources can’t be authenticated which doubles the risk of using an Internet based time reference.

Time Server Top Tips for Time Synchronisation

  |   By

Time synchronisation is an integral part of modern computer networking particularly with the Internet and online communication having become so dominant.

Communicating with machines across the globe requires exact time synchronisation otherwise many of the online tasks we take for granted would not be possible. Time in the form of timestamps is the only form of reference a computer has to identify the order of events. So with time sensitive transactions time synchronisation is pivotal.

Here are some tips to ensure your network is running precise and accurate time as possible:

NTP (Network Time Protocol) is the world’s leading time synchronisation software. There are other time protocols but NTP is the most widely used and best supported.

Most computer networks across the globe are synchronised to UTC (Coordinated Universal Time). This is a global timescale based on the time told by atomic clocks. Always use a UTC source to synchronise too.

Always use an external hardware source as a timing reference as time sources from the Internet can not be authenticated. Authentication is a security measure used by NTP to ensure a timing reference is coming from where it says it is from. Also using an Internet timing source means that the reference is outside your networks firewall, this can cause added security risks.

Dedicated time servers can receive UTC signals from radio transmissions and the GPs network. These offer the most secure, accurate and reliable method of receiving a UTC time reference.

Networks based in Britain, Germany, the USA and Japan have access to long-wave time and frequency transmissions that are broadcast by national physics labs. These broadcasts are accurate and reliable and often the dedicated time servers that receive them are less expensive than their GPS alternatives.

GPS is available everywhere on the globe as a source of UTC time. GPS antennas do good a good 180 degree view of the sky and require a good 48 hours to receive a stable ‘locked’ satellite fix.

Arrange your network into strata. Stratum levels signify the distance from a timing source. A stratum 0 server is an atomic clock while a stratum 1 server is a dedicated time server that receives the time from a stratum 0 source. Stratum 2 devices are machines that receive their timing source from a stratum 1 server but stratum 2 devices can also be used to pass on timing information. By ensuring you have enough stratum levels you will avoid congestion in your network and time server.

UTC A global Timescale

  |   By

Coordinated Universal Time (UTC – from the  French Temps Universel Coordonné) is an international timescale based on the time told by atomic clocks. Atomic clocks are accurate to within a second in several million years. They are so accurate that International Atomic Time, the time relayed by these devices, is even more accurate than the spin of the Earth.

The Earth’s rotation is affected by the gravity of the moon and can therefore slow or speed up. For this reason, International Atomic Time (TAI from the French Temps Atomique International) has to have ‘Leap seconds’ added to keep it in line with the original timescale GMT (Greenwich meantime) also referred to as UT1, which is based on solar time.

This new timescale known as UTC is now used all over the world allowing computer networks and communications to be conducted at opposite sides of the globe.

UTC is governed not by an individual country or administration but a collaboration of atomic clocks all over the world which ensures political neutrality and also added accuracy.

UTC is transmitted in numerous ways across the globe and is utilised by computer networks, airlines and satellites to ensure accurate synchronisation no matter what the location on the Earth.

In the USA NIST (National Institute of Standards and Technology) broadcast UTC from their atomic clock in Fort Collins, Colorado. The National Physics Laboratories of the UK and Germany have similar systems in Europe.

The internet is also another source of UTC time. Over a thousand time servers across the web can be used to receive a UTC time source, although many are not precise enough for most networking needs.

Another, secure and more accurate method of receiving UTC is to use the signals transmitted by the USA’s Global Positioning System. The satellites of the GPS network all contain atomic clocks that are used to enable positioning. These clocks transmit the time which can be received using a GPS receiver.

Many dedicated time servers are available that can receive a UTC time source from either the GPS network or the National physics Laboratory’s transmissions (all of which are broadcast at 60 kHz longwave).

Most time servers use NTP (Network Time Protocol) to distribute and synchronise computer networks to UTC time.

Receiving the Time with Time Servers and the MSF transmitter

  |   By

MSF is the name given to the dedicated time broadcast provided by the National Physical Laboratory in the UK, It is an accurate and reliable source of UK civil time, based on the time scale UTC (Coordinated Universal Time).

MSF is used throughout the UK and indeed other parts of Europe to receive a UTC time source which can be used by radio clocks and to synchronise computer networks by using a NTP time server.

It is available 24 hours a day across the whole of the UK although in some areas the signal can be weaker and it is susceptible to interference and local topography. The signal operates on a frequency of 60 kHz and carries a time and date code which relays the following information in binary format: Year, month, day of month,  day of week,  hour,  minute,  British Summer Time (in effect or imminent) and DUT1 (the difference between UTC and UT1 which is based on the Earths rotation)

The MSF signal is transmitted from Anthorn Radio Station in Cumbria but was only recently moved there after residing in Rugby, Warwickshire since it was started in the 1960’s. The signal’s carrier frequency is at 60 kHz, controlled by caesium atomic clocks at the radio station.

Caesium atomic clocks are the most reliably accurate atomic clocks anywhere, neither losing nor gaining a second in several millions of years.

To receive the MSF signal simple radio clocks can be used to display the exact UTC time or alternatively MSF referenced time servers can receive the long-wave transmission and distribute the timing information around computer networks using NTP (Network Time Protocol).

The only real alternative to the MSF signal in the UK is to use the onboard caesium clocks of the GPS network (Global Positioning System) that relay accurate time information that can be used as a UTC time source.

Global Positioning System (GPS) Operation and Implementation

  |   By

The GPS (Global Positioning System) network has been around for over thirty years but it was only since 1983 when a Korean airliner was accidentally shot down did the US military, who own and control the system, agree to open it up for civilian use in the hope of preventing such tragedies.

The GPS system is currently the world’s only global navigational satellite system (GNSS) although Europe and China are currently developing their own (Galileo and GLONASS). GPS, or to give it its official name Navstar GPS is based on a constellation of between 24 and 32 Medium Earth Orbit satellites.

These satellites transmit messages via precise microwave signals. These messages contain the time the message was sent, a precise orbit for the satellite sending the message and the general system health and rough orbits of all GPS satellites.

To work out a position a GPS receiver is required. This receives the signal from 4 (or more) satellites. Because the satellites broadcast their position and the time the message was sent, the GPS receiver can use the timing signal and distance information to workout by process of triangulation exactly where it is in the world.

GPS and other GNSS systems can only pinpoint the location so accurately because each relays timing information from an onboard atomic clock. Atomic clocks are so accurate that they either lose or gain a second in millions of years. It is only this accuracy that makes GPS positioning possible because as the signal transmitted by the satellites travel at the speed of light (up to 180,000 miles an second) a one second inaccuracy could make place positioning thousands of miles in the wrong place.

Because of this onboard atomic clock and high level of timing accuracy, a GPS satellite can be used as a source for UTC (Coordinated Universal Time). UTC is a global timescale based on the time told by atomic clocks and used across the globe to allow computer networks to all synchronize to the same time.

Computer networks use NTP time servers (network time protocol) to synchronise their systems. An  NTP server connected to a GPS antenna can receive a UTC time signal from the satellite and then distribute amongst the network.

Utilizing the GPs for timing information is one of the most accurate and secure methods of receiving a UTC source with accuracies of a few milliseconds quite feasibly possible.

Accuracy in Timekeeping Atomic clocks and Time Servers

  |   By

The development of atomic clocks throughout the twentieth century has been fundamental to many of the technologies we employ everyday. Without atomic clocks many of the innovations of the twentieth century would simply not exist.

Satellite communication, global positioning, computer networks and even the Internet would not be able to function in the way we are used to if it wasn’t for atomic clocks and their ultra-precision in timekeeping.

Atomic clocks are incredibly accurate chronometers not losing a second in millions of years. In comparison digital clocks may lose a second every week and the most intricately accurate mechanical clocks lose even more time.

The reason for an atomic clock’s incredible precision is that it is based on an oscillation of a single atom. An oscillation is merely a vibration at a particular energy level in the case of most atomic clocks they are based on the resonance of the caesium atom which oscillates at exactly 9,192,631,770 times every second.

Many technologies now rely on atomic clocks for their unbridled accuracy. The global positing system is a prime example. GPS satellites all have onboard an atomic clock and it is this timing information that is used to work out positioning. Because GPS satellites communicate using radio waves and they travel at the speed of light (180,000 miles a second in a vacuum), tiny inaccuracies in the time could make positioning inaccurate by hundreds of miles.

Another application that requires the use of atomic clocks is in computer networks. When computers talk to each other across the globe it is imperative that they all use the same timing source. If they didn’t, time sensitive transactions such as Internet shopping, online reservations, the stock exchange and even sending an email would be near to impossible. Emails would arrive before they were sent and the same item on an Internet shopping site could be sold to more than one person.

For this reason a global timescale called UTC (Coordinated Universal Time) based on the time told by atomic clocks has been developed. UTC is delivered to computer networks via times servers. Most time servers utilise NTP (network time protocol) to distribute and synchronize the networks.

NTP time servers can receive UTC time from a number of sources most commonly the onboard atomic clocks of the GPS system can be used as a UTC source by a time server connected to a GPS antenna.

Another method that is quite commonly used by NTP time servers is to utilise the long wave radio transmission broadcast by several countries’ national physics laboratories.  Whilst not available everywhere and quite susceptible to local topography the broadcasts do provide a secure method of receiving timing source.

If neither of these methods is available then a UTC timing source can be received from the Internet although accuracy and security are not guaranteed.

Introduction to Network Time Protocol

  |   By

Network Time Protocol (NTP) is one of the Internet’s oldest protocols still in use. Developed by Dr David Mills from the University of Delaware, it has been in constant use and continually updated since 1985. NTP is a protocol designed to synchronize the clocks on computers and networks across the Internet or Local or Wider Area Networks (LANs/WANS).

In a modern global economy time synchronisation is essential for carrying out time sensitive transactions such as booking an airline ticket to bidding on an Internet auction site. If clocks were not synchronised to the same time you may find your airline seat sold after you had bought it and Ebay’s administrators would not be able to discover whose bid was the latest.

NTP is a multi-tiered system, each tier being called a stratum. Servers at each tier communicate with each other (peer) and provide time to lower strata. Servers at the top stratum, stratum 1 connect to an atomic clock either over the Internet or by a radio or GPS receiver while a stratum 2 server will connect to a stratum 1.

NTP uses an algorithm (Marzullo’s algorithm) to synchronise time on a network using time scales like UTC (Coordinated Universal Time or Temps Universel Coordonné) and can support such features as leap seconds – added to compensate for the slowing of the Earth’s rotation.

NTP (version 4 being the latest) can maintain time over the public Internet to within 10 milliseconds (1/100th of a second) and can perform even better over LANs with accuracies of 200 microseconds (1/5000th of a second) under ideal conditions.

NTP time servers work within the TCP/IP suite and rely on UDP (User Datagram Protocol). A less complex form of NTP called Simple Network Time Protocol (SNTP) that does not require the storing of information about previous communications, needed by NTP, is used in some devices and applications where high accuracy timing is not as important and is also included as standard in Windows software (although more recent versions of Microsoft Windows have the full NTP installed and the source code is free and readily available on the Internet).

The NTP program (known as a daemon on UNIX and a service on Windows) runs in the background and refuses to believe the time it is told until several exchanges have taken place, each passing a set of tests. If the replies from a server satisfy these ‘protocol specifications’, the server is accepted. It usually takes about five good samples (five minutes) until a NTP server is accepted as a source for synchronisation.

Synchronisation with NTP is relatively simple, it synchronises time with reference to a reliable clock source such as an atomic clock, although these are extremely expensive and are generally only to be found in large-scale physics laboratories, however NTP can use either the Global Positioning system (GPS) network or specialist radio transmission to receive UTC time from these clocks.

A simplified version of NTP called Simple Network Time Protocol (SNTP) exists that does not require the storing of information about previous communications as required by NTP. It is used in some devices and applications where high accuracy timing is not as important and is installed on older versions of Microsoft Windows. Windows since 2000 has included the Windows Time Service (w32time.exe) which uses SNTP to synchronise the computer clock. NTP is also available on UNIX and LINUX (download via NTP.org).

Network Time Server Keeping Control of Time

  |   By

Computer networking can seem an intimidating undertaking. However, a computer network is really just a number of machines connected together for ease of data transfer and security. They can be very small such as two computers in a home network to really large networks consisting of hundreds and thousands of machines.

When a computer or device is connected to a network then there is only one point of reference that the computers can use to establish the order of events and applications and that is time.

Time, in the form of time stamps are used by most applications and this is when problems in computer networks can occur.

Computers tell the time by using a software clock. This is based on a system clock that keeps time when the computer is off. However, computers internal clocks are wholly inaccurate. They tend to drift up to several seconds a week. On a network when there is more than one machine, this can cause severe problems if the machines are drifting at different rates.

Emails may arrive before they have been sent and the whole network can be vulnerable to security threats and even fraud!

A network time server is used to synchronize a computer network to a single time source. This time source can be anything from an internal clock on a computer to the time told by a wrist watch. However, to ensure perfect accuracy and to keep a network synchronized to the rest of the world then a UTC time source should be used.

UTC (Coordinated Universal Time) is a global timescale based on the time told by atomic clocks. A network time server can receive a UTC time source from across the Internet (although unsecured), via the GPS (global positioning system) network or via specialist radio transmission from national physics laboratories.

Most network time servers use NTP (Network Time Protocol) to distribute the timing reference throughout the network. NTP is not the only timing protocol designed to do this although it is, however, by far the most widely used.