Introduction to Network Time Protocol (NTP)

  |   By

Network Time Protocol (NTP) is one of the Internet’s oldest protocols still utilised today. 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 Area Networks (LANs).

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

Time synchronisation with NTP is relatively simple, it synchronises time with reference to a reliable clock source. This source could be relative (a computer’s internal clock or the time on a wrist-watch) or absolute (A UTC clock source, like an atomic clock, that is accurate as is humanely possible).

Atomic clocks are the most absolute time-keeping devices. They work on the principle that the atom, caesium-133, has an exact number of cycles of radiation every second (9,192,631,770). This has proved so accurate the International System of Units (SI) has now defined the second as the duration of 9,192,631,770 cycles of radiation of the caesium-133 atom.

However, atomic clocks are extremely expensive and are generally only to be found in large-scale physics laboratories. However, NTP can synchronise networks to an atomic clock by using either the Global Positioning system (GPS) network or specialist radio transmission.

The most widely used is the GPS system which consists of a number of satellites providing accurate positioning and location information. Each GPS satellite can only do this by utilising an atomic clock which in turn can be can be used as a timing reference.

A typical GPS receiver can provide timing information to within a few nanoseconds of UTC as long as there is an antenna situated with a good view of the sky.

There are also a number of national time and frequency radio transmissions that can be used to synchronise a NTP server. 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 Colorado, US (WWVB) and in Frankfurt, Germany (DCF-77). These signals provides UTC time to an accuracy of 100 microseconds, however, the radio signal has a finite range and is vulnerable to interference.

The distance from the reference clock is known as the stratum levels and they exist to prevent cycles in the NTP and confirm accuracy. Stratum 0 are devices such as atomic clocks connected directly to a computer. Stratum 1 are computers attached to stratum 0 devices (like via a GPS receiver), while Stratum 2 are computers that send NTP requests to Stratum 1 servers. NTP can support up to 256 strata.

All Microsoft Windows versions since 2000 include the Windows Time Service (w32time.exe) which has the ability to synchronise the computer clock to an NTP server. It should be noted that Microsoft recommend that external time references are used rather than Internet based ones as these can’t be authenticated. Specialist NTP servers are available that can synchronise time on networks using either the MSF (or equivalent) or GPS signal.

How to Run a Network Time Server using Windows XP

  |   By

Time synchronisation in modern computer networks is essential. It not only provides the only frame of reference between all devices, it is critical in everything from securing, planning and debugging a network to providing a time stamp for applications such as data acquisition or email.

Microsoft Windows XP has a time synchronisation utility built into the operating system called Windows Time (w32time.exe) which can be configured to operate as a network time server. It can be configured to both synchronise a network using the internal clock or an external time source.

For many applications, an internal clock can be quite adequate, although, on a network, problems can arise with applications such as sharing network files or in some environments even fraud, so it is vital for security reasons to use an accurate timing source for your network.

NTP (Network Time Protocol) is a protocol already installed on Windows XP and is used by Windows Time to keep machines synchronised to the single time source. There are several timing sources available on the Internet but Microsoft and others strongly recommend that you configure a time server with a hardware source rather than from the Internet where there is no authentication.

Specialist NTP servers are available that can receive a reliable time source via the GPS signal or specialist radio transmissions that get their time from atomic clocks.

If you wish to configure Windows XP to operate as a time server then first thing is to locate the Windows Time subkey. To do this:
Run Regedit (Click start/run/then type REGEDIT/and click enter.

Note: editing your system registry can cause problems with your system. It is advisable to back up your system before editing the registry.

Now locate the following subkey: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\W32Time\parameters\
Right click the right-hand side and click Modify. In the Edit Value box, under Value Data, type NTP and then click OK.
Now go to the Config folder and right-click AnnounceFlags, Modify and in the Edit DWORD Value box, under Value Data, type 5, and then click OK.

Locate this subkey:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\W32Time\TimeProviders\NtpClient\

Right-click in the right-side window and Modify. Edit the DWORD value box and type the number of seconds you want for each poll under Value data, i.e.: 900 will equal 15 minutes. The poll field represents the polling interval between NTP poll packets.

To enable the NTP server locate the subkey: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\W32Time\TimeProviders\NtpServer\
Right click enabled (in the right-hand window) then Modify. Edit the DWORD Value and type 1. Right-click NtpServer, then Modify and in the Edit DWORD Value under Value Data type Peers, then click OK.

Locate:  HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\W32Time\config
In the right pane, right-click MaxPosPhaseCorrection, then Modify, in the Edit DWORD Value box, under Base, click Decimal, under Value Data, type a time in seconds such as 3600 (an hour) then click OK. This adjusts the connection settings.

Now go back and click:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\W32Time\config

In the right pane, right-click MaxNegPhaseCorrection, then Modify.
In the Edit DWORD box under base, click Decimal, under value data type the time in seconds you want to poll such as 3600 (an hour).

Exit Registry then restart windows time service by clicking Start/Run then typing:
net stop w32time && net start w32time.
on each computer, other than the domain controller, type: W32tm/resync/rediscover.
The time server should be now up and running.

Hang on a Second the History of the Leap Second

  |   By

We have all heard of a leap year – that extra day added to the calendar every four years. It may give us a longer February but it is also essential in keeping our calendars and seasons accurate. If the extra day is not added to a leap year then eventually (admittedly after over a century) the Winter will begin in July and the summer will start around Christmas (and vice – versa in the southern hemisphere) because the Earth takes an extra six hours longer than the 365 days of a year to circle the sun.

A leap year may be a bit of a fudge but the alternative would be to have a quarter day at the end of the year which would of course throw our days and nights out of sync with each other (and could you imagine just having a six hour day – some of us struggle to get things done in 24!).

We have of course always measured time in relation to the movement of the Earth – a day being an entire revolution, a year an orbit of the sun. However, as our way of measuring time became more and more accurate it soon became apparent that there were more irregularities in the Earth’s rotation than just the extra six hours in a year.

GMT (Greenwich Mean Time) was developed because there was a need for a time scale where the mean position of the sun at noon, averaged throughout the year, is above the Greenwich Meridian (zero longitude) and daylight saving hours are added or taken away depending on the time of year.

However, in 1955 the first atomic clock went into operation following the discovery of the stability of the caesium-133 atom which vibrated at an exact rate (9,192,631,770 a second). Impressed with this accuracy, The International System of Units of Measurement (SI) decided that a second should be defined as this number of oscillations of the caesium-133 atom.

Following the SI second a time scale called International Atomic Time (TAI – from the French Temp Atomique International) which was a simple count, in seconds, for the 24 hours of our day. Conversely as TAI is not related to the movement of the Earth, it was soon discovered that TAI and atomic clocks were far more stable and reliable than the Earth itself (in fact an atomic clock is 1,000,000 times more accurate than the Earths rotation).

Generally the Earth is continually slowing in its rotation (although, inexplicably, every now-and-then it seems to speed up) so TAI is of little use for those that wish their clocks to be in step with the Earth (astronomers being by far the most vocal of these).

So another time scale was developed called Coordinated Universal Time (UTC – again from the French – Temp Universel Coordonne). This was based on atomic time (TAI) but small adjustment are made to keep it in step with GMT (which incidentally is now commonly referred to as UT1 or depending on time zone UT+1 UT+2 UT+3 etc)

UTC is adjusted by the insertion of extra seconds, called leap seconds, as necessary to keep it within a second of GMT (or UT1). It is possible a second may have to be removed in the future but that hasn’t happened as yet. UTC is essential in modern industry and technology where computers are synchronised to UTC time, usually through a NTP server (Network Time Protocol) – to allow international time sensitive transactions.

A leap second is normally inserted at the end of December in the last hour (although occasionally it has been done in June, March and September). The decision as to whether a leap second is required is taken by the Earth Orientation Centre of the International Earth Rotation and Reference Systems Service (IERS), who monitor the Earth’s rotation and suggest the adjustment about six months in advance.
 
When a leap second is added there becomes 61 seconds in that final minute of the year. The familiar ‘six pips’ radio signal gains an extra pip and even London’s famous Big Ben is held back a second before it bongs (but not an extra bong as they are meant to represent the hours)

There have been 33 leap seconds added to UTC since 1972 (although the first ten were added retrospectively) but as the Earth’s rotation is continuing to slow it is estimated that over the next millennia or two leap seconds will have to be added each month.

The Lost Eleven Days

  |   By

This article describes what happened when Europe adopted the Gregorian calendar and the problems we still face today trying to synchronise with movement of the Earth.

Have you ever gone to bed one night and wondered just where the day went? Well could you imagine waking up to discover that eleven days had vanished completely? That is just what happened in 1752 when the entire inhabitants of Britain and America went to bed on Wednesday 2 September, only to awake on Thursday 14 September.

However, it wasn’t an epidemic of sleepy sickness or even a mass dose of laziness that kept the entire populace in bed but merely the authorities attempting to synchronise with the rest of the world by adopting the Gregorian calendar.

The Julian calendar (named after Julius Caesar) had been in use since biblical times but was finally phased out throughout Europe in the 1582 but it took the resolute Brits and Americans another two hundred years to follow suit.

And if the painter Hogarth is to be believed the populace didn’t take too kindly to it either, with people taking to the street demanding the return of their missing 11 days and even reports of rioting.

Then why change? That was what the British authorities had been saying for two hundred years ever since Pope Gregory XIII had replaced the Julian calendar in Europe two hundred years before.

However, the reason for the original change was that the Julian calendar didn’t allow for enough leap years (they were omitted in years divisible by 100 but not divisible by 400 – what were the Romans thinking?) and the seasons were slowly becoming out of sync with the calendar. The situation was now becoming even more intolerable in Britain, playing havoc for farmers – who had no idea when to plant their crops, finally the authorities were to switch over and fast forward the whole country 11 days.

However this synchronisation problem has always been with us. We have traditionally tried to base our calendars around the movement of the Earth to allow us to predict seasons and know when the summer and winter will fall. However, we may have sorted out the leap years (caused by the fact the Earth takes 365 and a quarter days to travel around the Sun) but trying to base a calendar around the movement of the Earth will always lead to problems.

The Gregorian calendar worked fine until the 1950’s when the atomic clock was developed. The atomic clock worked so well – providing timing information accurate to a second in several millions of years – that we soon realised that our clocks were now far more accurate than the Earth itself.

The Earth is actually slowing down in rotation and if nothing was done then eventually noon would fall at night and vice-versa (albeit not for several millennia) but don’t worry you are not about to wake up in the middle of next week. The solution is the adding of leap seconds and 33 have been slotted into the end of our years since the 1970’s.

The decision to insert a second is usually taken six months before after careful monitoring of the Earth’s rotation. A calendar based on the movement of the Earth may seem less relevant today but with a Global Positioning System (GPS), a global time-scale (Coordinated Universal Time), and computers all synced together around the world using NTP servers (Network Time Protocol) it is imperative we can all tell the right time.

Keeping Global Time with UTC

  |   By

What time is it? One of the commonest questions uttered around the World but what exactly are we asking? You ask someone in China what the time is then you will certainly get a different answer if you ask an American, obviously their time-zones are on the opposite side of the world.

But what if you ask two people in the same room as you? You may get the same answer from them both but then again one person’s watch may be a minute or two faster.

When we ask the time then what we are really asking for is a rough estimate for the time zone that we are in. Some watches are more accurate than others but it is often enough for our day to day needs.

But what if you need to know the exact time and what if you need to know what that time is another country too. Perhaps you have bought an airline ticket; it would be disappointing to turn up at the airport only to be told that your ticket was sold to somebody else in as the clock at their travel agent was slower than the one where you bought your ticket.

So how does global industry keep accurate time with one another? The answer is quite simple and it is called Coordinated Universal Time or UTC.

The International Bureau of Weights and Measures (BIPM) acts as the official time-keeper for the globe and started UTC in 1972 after the development of atomic clocks.

The atomic clock was first developed in the late 50’s when it was discovered the atom caesium-133 resonates at an exact frequency of 9,192,631,770 every second. This frequency was so exact that atomic clocks developed an accuracy of one second in 1.4million years and The International System of Units defined the second as the frequency of the caesium-133 atom and an international unit for measuring time was born.

However, atomic clocks are even more accurate than the Earth itself which is actually slowing in its rotation. This slowing is only small but if the standard system of time, UTC, didn’t compensate for it, eventually midnight would fall in the middle of the day (although that would take a millennia or two) so leap seconds are added every few years to compensate.

The only problem with UTC timepieces is that atomic clocks are enormous in both size and cost. In fact they are generally only to be found in large scale physics laboratories such as NPL (National Physics Laboratory, UK) or MIT (Massachusetts Institute of Technology, US).

Then how does the rest of the world keep track of UTC time? The time told on these vast atomic clocks is broadcast via radio broadcasts or the GPS satellite system (Satellite Navigation is reliant on UTC as without it a satellite can’t tell exactly where a receiver is).

Most computer networks are sycnhronised to UTC time either over the Internet (which isn’t secure and only recommended for home users) or through specialist GPS or radio time servers. These time servers make use of NTP (Network Time Protocol) which has been developed over the last 25 years to keep computer networks synchronized so they do not have to rely on their inaccurate internal clocks.

NTP servers and UTC have allowed industry to become truly global and made possible technologies such as communication satellites, mobile phones, sat-nav and ATM’s that we all take for granted.

NTP the Importance of External Time Reference

  |   By

Network Time Protocol (NTP) is one of the Internet’s oldest protocols and is still the standard for time synchronisation. The success of NTP stems from its constant development (version 4 is currently in progress) and the accuracy that an NTP time server can boast in the synchronisation of networks.

Whilst an accuracy of 1/5000th of a second can be obtained on a network under the right conditions, this accuracy is solely reliant on whatever time reference NTP uses to synchronise with. This source could of course be unreliable, like a workstation clock as real time chips in most computers are prone to drift and are far less accurate than the average digital watch.

The alternative is to use a reliable UTC (Coordinated Universal Time) source. UTC is the standard for time synchronization. It was started in 1972 after the development of atomic clocks and allows the entire globe to synchronise to the same absolute time. This has not only made technologies such as the Internet, GPS and communication satellites possible, but also has allowed industries such as airlines and the stock market to trade globally.

The simplest way to synchronise a network to UTC has always been to use an Internet time reference. There are hundreds available such as nist.gov and most Windows software has a built in utility, Windows Time (win32.exe) to synchronise the system clock to a reference clock over the Internet.

However, Microsoft and others warn against using an Internet source as a time reference as authentication is not possible from these sources.

Authentication is the security measure that NTP uses to ensure that a time reference is trusted. Without authentication systems are vulnerable to malicious attacks such as hackers who could adjust a timestamp to commit fraud or a DDoS attack (Distributed Denial of Service usually caused by malicious software inundating the system).

Not only are Internet times sources unauthenticated but also a survey by Nelson Minar of MIT on over 900 Internet time references, discovered nearly half were offset by over ten seconds (one by a staggering 6 years – but there were fortunately not many peers) and less that a third where described as being “useful”.

The report also discovered that many Internet time reference hosts were too far away from their peers to allow accurate time synchronisation.

There are however, several ways of ensuring a NTP server is synchronised to a reliable and stable UTC time source that is both accurate and authenticated.

There are two systems available and both use relatively low cost equipment. The first option and often the easiest, is to connect to a GPS antenna and dedicated GPS time server to the network. This uses the UTC time code transmitted by the GPS satellites, as long as the antenna has a good view of the sky.

Alternatively specialist broadcast signals transmit a timestamp in several countries. In Britain it is referred to as MSF and broadcast from Cumbria by the National Physics Laboratory at 60 kHz but can be picked up as far away as 1000 km, although similar systems operate in Germany, France and the US. These radio referenced NTP servers are vulnerable to interference but traditionally were of a lower cost than GPS receivers however, advances in technology mean the difference is now minimal.

The integrity of a time source used by a NTP time server is therefore highly important and whist system administrators are all too willing to invest in expensive firewalls and anti-viral software to protect their networks many neglect their time server’s security which after all, may not be telling them the right time anyway!

Installing a NTP Server using a GPS Reference Source

  |   By

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

NTP (version 4) 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 works within the TCP/IP suite and relies on UDP, a less complex form of NTP exists called Simple Network Time Protocol (SNTP) that does not require the storing of information about previous communications, needed by NTP. It is used in some devices and applications where high accuracy timing is not as important.

Time synchronisation with NTP is relatively simple, it synchronises time with reference to a reliable clock source. This source could be relative (a computer’s internal clock or the time on a wrist-watch) or absolute (A UTC – Universal Coordinated Time – clock source that is accurate as is humanely possible).

Atomic clocks are the most absolute time-keeping devices; however, they are extremely expensive and are generally only to be found in large-scale physics laboratories. However, NTP can synchronise networks to an atomic clock by using either the Global Positioning system (GPS) network, a specialist radio transmission or over the Internet. However, it must be noted that Microsoft strongly recommends that an external based timing should be used rather than Internet based, as these can’t be authenticated.

GPS 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 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 installation of a suppressor inline on the GPS cable is highly recommend.

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.

A GPS receiver then decodes the GPS signal sent from the antenna to a computer readable protocol which can be utilised by most time servers and operating systems including, Windows, LINUX and UNIX.

The GPS receiver also outputs a precise pulse every second that GPS Network Time Protocol (NTP) servers and computer time servers may utilise to provide ultra-precise timing. The pulse-per-second timing on most receivers is accurate to within 0.001 of a second of UTC.

GPS is ideal in providing NTP time servers or stand-alone computers with a highly accurate external reference for synchronisation. Even with relatively low cost equipment, accuracy of hundred nanoseconds (a nanosecond = a billionth of a second) can be reasonably achieved using GPS as an external reference.

Getting the Correct Time in Windows XP

  |   By

All computers need to know the time. Many applications, from sending an email to storing information are reliant on the PC knowing when the event took place. In some environments timing is even more crucial where a single second can make all the difference between profit and loss – just think of the stock exchange.

Most computers have internal clocks which are battery backed, so the computer can still keep time when the machine is off. However, are these clocks really that reliable? The answer of course is no.

Computers are mass marketed and designed for multi functions, timing not being that high on the manufacturer’s agenda. The internal clocks (called RTC real time chips) are normally adequate for home computing or when workstations run alone. However, when computers run in a network, then a lack of synchronisation can cause problems.

It may be a minor thing such as an email arriving somewhere before it was sent (according to a PC clock) but with some time sensitive transactions and applications, a lack of synchronisation can cause imaginable problems: Imagine turning up at an airport only to find the airline seat you had bought weeks before was in fact sold to somebody else afterwards as their booking agent had a slower clock on their computer!

To get around these problems most computers on a network are synchronised to a single time source using NTP (network time protocol) this time source can be either relative (a computer’s clock or wrist watch) or an absolute time source like UTC.

UTC (Coordinated Universal Time) was developed after the emergence of atomic clocks and is a standard time scale used globally, allowing machines all over the world to use a single time source.

Windows XP can easily set the system clock to use UTC by accessing an Internet source for UTC (either: time.windows.com or time.nist.gov). To achieve this, a user merely has to double click the clock on their desktop and adjust the settings in the Internet Time tab.

However, Microsoft and other operating system manufacturers strongly advise that external timing references should be used as Internet sources can’t be authenticated, making systems vulnerable to a malicious attack.

If you wish to run a network time server Windows XP, then specialist NTP servers are available that can receive a time reference via the GPS satellite system or specialist national transmissions

To allow Windows XP to operate as a network time server, the NTP service needs to be switched on. To activate NTP simply find the following subkey in the registry editor (regedit):
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\W32Time\TimeProviders\NtpServer\
Right click enabled (in the right-hand window) then Modify. Edit the DWORD Value and type 1. Right-click NtpServer, then Modify and in the Edit DWORD Value under Value Data type Peers, then click OK.

Exit the registry and start windows time service by clicking Start/Run and typing:
net stop w32time && net start w32time.; Then on each computer on the network (other than the domain controller which can’t be synchronised with itself) type: W32tm/resync/rediscover.

NTP Security with Authentication and Trusted Time References

  |   By

NTP (Network Time Protocol) synchronises networks to a single time source using timestamps to represent the current time of the day, this is essential for time sensitive transactions and many system applications such as email.

NTP is therefore vulnerable to security threats, whether from a malicious hacker who wants to alter the timestamp to commit fraud or a DDoS attack (Distributed Denial of Service – normally caused by malicious malware that floods a server with traffic) that blocks server access.

However, being one of the Internet’s oldest protocols and having been developed for over 25 years, NTP is equipped with its own security measures in the form of authentication.

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 normally 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 therefore highly important in protecting a NTP server from malicious attack; however there are many time references were authentication can’t be trusted.

Microsoft, who has installed a version of NTP in their operating systems since Windows 2000, strongly recommends that a hardware source is used as a timing reference as Internet sources can’t be authenticated.

NTP is vital in keeping networks synchronised but equally important is keeping systems secure. Whilst network administrators spend thousands in anti-viral/malware software many fail to spot the vulnerability in their time servers.

Many network administrators still entrust Internet sources for their time reference. Whilst many do provide a good source for UTC time (Coordinated Universal Time – the international standard of time), such as nist.gov, the lack of authentication means the network is open to abuse.

Other sources of UTC time are more secure and can be utilized with relatively low cost equipment. The easiest method is to use a specialist NTP GPS time server that can connect to a GPS antenna and receive an authenticated timestamp by satellite.

GPS time servers can provide accuracy to UTC time to within a few nanoseconds as long as the antenna has a good view of the sky. They are relatively cheap and the signal is authenticated providing a secure time reference.

Alternatively there are several national broadcasts that transmit a time reference. In the UK this is broadcast by the National Physics Laboratory (NPL) in Cumbria. Similar systems operate in Germany, France and the US. Whilst this signal is authenticated, these radio transmissions are vulnerable to interference and have a finite range.

Authentication for NTP has been developed to prevent malicious tampering with system synchronisation just as firewalls have been developed to protect networks from attack but as with any system of security it only works if it is utilised.

Maintaining Precise Time on Your Computers

  |   By

All PC’s and networking devices use clocks to maintain an internal system time. These clocks, called Real Time Clock chips (RTC) provide time and date information. The chips are battery backed so that even during power outages, they can maintain time. However, personal computers are not designed to be perfect clocks, their design has been optimized for mass production and low-cost rather than maintaining accurate time.

These internal clocks are prone to drift and although for many application this can be quite adequate, often machines need to work together on a network and if the computers drift at different rates the computers will become out of sync with each other and problems can arise particularly with time sensitive transactions.

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

NTP (version 4) 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 works within the TCP/IP suite and relies on UDP, a less complex form of NTP exists called Simple Network Time Protocol (SNTP) that does not require the storing of information about previous communications, needed by NTP. It is used in some devices and applications where high accuracy timing is not as important.

Many operating systems including Windows, UNIX and LINUX can utilize NTP and SNTP  and time synchronisation with NTP is relatively simple, it synchronises time with reference to a reliable clock source. This source could be relative (a computer’s internal clock or the time on a wrist-watch) or absolute (A UTC – Universal Coordinated Time – clock source that is accurate as is humanely possible).
All Microsoft Windows versions since 2000 include the Windows Time Service (w32time.exe) which has the ability to synchronise the computer clock to an NTP server.
 
There are a large number of Internet hosted NTP servers that synchronise with external UTC references such as time.nist.gov or ntp.my-inbox.co.uk but it must be noted that Microsoft and others recommend that an external source is used to synchronise your machines, as Internet based references can’t be authenticated. Specialist NTP time servers are available that can synchronise time on networks using either the MSF (or equivalent) or GPS signal.

The most widely used are the GPS time servers which use the GPS system to relay accurate time. The GPS system consists of a number of satellites providing accurate positioning and location information. Each GPS satellite can only do this by utilising an atomic clock which in turn can be can be used as a timing reference.

A typical GPS receiver can provide timing information to within a few nanoseconds of UTC as long as there is an antenna situated with a good view of the sky.

There are a number of national time and frequency radio transmissions that can be used to synchronise a NTP server. 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 Colorado, US (WWVB) and in Frankfurt, Germany (DCF-77). These signals provides UTC time to an accuracy of 100 microseconds, however, the radio signal has a finite range and is vulnerable to interference.