Category: time server

GPS Time Server and NTP (Network Time Protocol)?

  |   By

We are all used to Satellite Navigation by now. More and more people are installing those little black boxes into their cars and throwing away their old paper road maps. The advantages of satellite navigation are many fold – from constant updates keeping the maps current to being able to pin point your location miles from any landmarks or road signs but GPS has more uses than merely triangulating a position for direction finding, it can be utilized to provide time and frequency information worldwide.

Since the early 1990’s the Global Positioning system (GPS) has been the worlds’ only fully functioning Global Navigational Satellite System (GNSS). Run by the American military, GPS (sometimes referred to as NAVSTAR) has allowed accurate timing and location finding all over the world.

To accurately pinpoint a location, all GNSS systems require an absolute time source, that is a time source as accurate as humanely possible such as that from an atomic clock. Without knowing exactly what the time is a GNSS satellite would not be able to accurately pin point a location (as the Earth, satellites and people are all moving about a location can only be defined by a position and time). Because of the distance of the satellites away from the Earth, even an inaccuracy of a second or two could mean a sat nav’s location could be miles out.

For this reason each satellite has a highly accurate atomic clock onboard which can also be used by NTP (Network Time Protocol) servers to synchronise computer networks. GPS is an ideal time and frequency source because it can provide highly accurate time anywhere in the world using relatively cheap components.

A GPS receiver decodes the signal sent from the GPS 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 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 (Coordinated Universal Time or Temps Universel Coordonné).

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.

In 2002, the European Space Agency and European Union agreed to build Europe’s own GNSS called Galileo. To compete with the new and more advanced GNSS technologies the GPS programme is currently being upgraded and it is expected that when Galileo begins relaying signals both systems will become interoperable allowing even more accuracy in timing and positioning.

Choosing a dedicated GPS Time Server

  |   By

Because of the advancement in satellite navigation technologies and the increased coverage of the American GPS satellite network, many more administrators are choosing GPS as a source for a timing reference to synchronize their time servers too.

Traditionally many more people opted to receive a timing source from either across the Internet or via specialist national time and frequency transmissions.  However, the Global Positioning System is now by far the most popular method to receive a UTC time source from.

UTC (Coordinated Universal Time) is the global timescale based on the time told by atomic clocks which are the most accurate of time keeping devices.

A GPS time server is a relatively simple piece of hardware. Normally it consists of a dedicated NTP server with software, a GPS receiver and a GPS antenna. The antenna is the only drawback in using a dedicated GPS time server as it has to be positioned on the roof to have a clear view of the sky, although some dedicated GPS time servers can still keep time synchronized if they only receive a signal for a few hours a day, although this is not the most accurate way of time synchronization.

Once connected, the GPS time server will receive the time signal from the GPS satellites and then distribute it to all devices that require synchronization.

Most time servers, whether they receive a GPS signal or not, will use Network Time Protocol (NTP) to distribute the time signal to all devices.

NTP is one of the Internet’s oldest protocols and is by far the most widespread time synchronization protocols used. NTP is under constant development and can accurately synchronise a network to within a few milliseconds of UTC time via a dedicated GPS time server.

Configuring a Network Time Server on Windows

  |   By

All versions of Windows Server since 2000 have included a time synchronization facility, called Windows Time Service (w32time.exe), built into the operating system. This can be configured to operate as a network time server synchronizing all machines to a specific time source.

Windows Time Service uses a version of NTP (Network Time Protocol), normally a simplified version, of the Internet protocol which is designed to synchronise machines on a network, NTP is also the standard for which most computer networks across the global use to synchronise with.

Choosing the correct time source is vitally important. Most networks are synchronized to UTC (Coordinated Universal Time) source. UTC is a global standardized time based on atomic clocks which are the most accurate time sources.

UTC can be obtained over the Internet from such places as time.nist.gov (us Naval Observatory) or time.windows.com (Microsoft) but it must be noted that internet time sources can not be authenticated which can leave a system open to abuse and Microsoft and others advise using an external hardware source as a reference clock such as a specialized network time server.

Network time servers receive their time source from either a specialist radio transmission from national physics laboratories which broadcast UTC time taken from an atomic clock source or by the GPS network which also relays UTC as a consequence of needing it to pin point locations.

NTP can maintain time over the public Internet to within 1/100th of a second (10 milliseconds) and can perform even better over LANs.

To configure Windows Time Service to use an external time source simply follow these instructions.

Locate the registry subkey.

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\W32Time\Parameters

Right click type then Modify the Value by inserting NTP in the Value Data box.

Right click ReliableTimeSource, then Modify the Edit DWORD Value box, by inserting 0 (zero).

Right-click NtpServer then Modify the Edit Value by typing the Domain Name System (DNS), (note each DNS must be unique).

Now locate the original subkey and right-click Period Modify the Edit DWORD Value box with the poll interval (how often a NTP server polls the time), under Value Data (recommended 24)

Run the following command line, Net stop w32time && net start w32time.

Now enable NTP by locating the subkey, HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\W32Time\TimeProviders\NtpServer\

Right click Enabled and modify the Value data box by typing 1.

Right Click SpecialPollInterval in the right pain of the subkey HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\W32Time\TimeProviders\NtpClient\SpecialPollInterval. Edit the DWORD value box the time you want for each poll (900 will poll every 15 minutes)

Locate HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\W32Time\config

To configure the time correction settings right click MaxPosPhaseCorrection, then modify the DWORD Value box with a time in seconds such (select decimal under base first, 3600 = one hour)

Now do the same for MaxNegPhaseCorrection the restart windows time service by running (or alternatively use the command prompt facility) net stop w32time && net start w32time.

To synchronise each machine simply type W32tm/ -s in the command prompt and the time server should now be working correctly (note it may take several polls before the correct time is displayed).

Using WWVB as a Timing Reference for NTP Servers

  |   By

Atomic clocks are incredibly expensive and generally they are normally only to be found in large scale physics laboratories such as MIT (Massachusetts Institute of Technology), NIST (National Institute of Standards and Technology (Colorado) or the National Physical Laboratory in the UK.

Fortunately many national laboratories broadcast the UTC (Coordinated Universal Time) time from their atomic clocks via a radio transmission.

In the US the national timing broadcast is called WWVB and is broadcast by NIST (National Institute fro Standards and Time) in Fort Collins, Colorado. The WWVB broadcast is used by millions of people throughout North America to synchronize consumer electronic products like wall clocks, clock radios, and wristwatches. In addition, WWVB is used for high-level applications such as network time synchronization utilizing NTP.

The time code contains the year, day of year, hour, minute, second, and flags that indicate the status of Daylight Saving Time, leap years, and leap seconds.

WWVB broadcasts on 2.5, 5, 10, 15, and 20 MHz and for most users in the United States, the received accuracy should be less than 10 milliseconds (1/100 of a second).

While many NTP servers now use GPS to receive a timing reference, the advantage of using a radio transmission is that a signal can be received indoors (a GPS antenna needs a good view of the sky).

However, the radio signal has a finite range and can be blocked by skyscrapers, mountains and dense conurbations. 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. The antenna should always be mounted horizontally at a right angle toward the transmission for optimum signal strength.

Similar national timing transmissions are broadcast from other countries in the UK the signal is referred to as MSF and is broadcast by the National Physical Laboratory in Cumbria, other systems are broadcast in Frankfurt, Germany (DCF-77), Japan (JJY) and France (TDF)

How to Configure an NTP Network Time Server in Windows XP

  |   By

Summary: This article describes how to configure Windows XP to act as an authoritative time server using NTP (Network Time Protocol).

Computer time synchronisation is highly important in modern computer networks, precision and time synchronization is critical in many applications, particularly time sensitive transactions. Just imagine buying an airline seat only to be told at the airport that the ticket was sold twice because it was purchased afterwards on a computer that had a slower clock!

Modern computers do have internal clocks called Real Time Clock chips (RTC) that provide time and date information. These chips are battery backed so that even during power outages, they can maintain time but 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.

For many applications, this is can be quite adequate, although, quite often machines need time to be synchronised with other PC’s on a network and when computers are out of sync with each other problems can arise such as sharing network files or in some environments even fraud!

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.

Note: Microsoft strongly recommends that you configure a time server with a hardware source rather than from the internet where there is no authentication.

To configure Windows Time service to use the internal hardware clock, first check that w32time is located in the system services list in the registry, to check:
Click Start, Run then type regedit then click ok.
Locate and then click the following registry entry:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\W32Time

It is highly recommended that you back up the registry as serious problems may occur if you modify the registry incorrectly, modifications to the registry are done at your own risk.

To begin configuration for an internal clock, click on Config in the w32Time folder.

In the right pane, right-click AnnounceFlags, then click modify.

The ‘AnnounceFlags’ registry entry indicates whether the server is a trusted time reference, 5 indicates a trusted source so in the Edit DWord Value box, under Value Data, type 5, then click OK.

Network Time Protocol (NTP) is an Internet protocol used for the transfer of accurate time, providing time information along so that a precise time can be obtained

To enable the Network Time Protocol; NTPserver, locate and click:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\W32Time\TimeProviders\NtpServer\
In the right pane, right-click Enabled, then click Modify
In the Edit DWord Value box, type 1 under Value data, then click OK.

Exit Registry Editor

Click Start, then Run then type the following and press Enter:
Net stop w32time && net start w32time

To reset the local computers’ time, type the following on all computers except for the time server which must not be synchronised with itself:
W32tm/resync/rediscover

To configure Windows Time to use an external time source
Run Registry Edit and locate the following:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\W32Time\parameters\

In the right pane, right-click Type, then click Modify
In the Edit Value box, under Value Data, type NTP and then click OK.

Now as before in the Config folder, right-click AnnounceFlags, Modify and in the Edit DWORD Value box, under Value Data, type 5, then click OK.

Locate and click the following
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\W32Time\TimeProviders\NtpClient\

In the right pane, right-click SpecialPollInterval, then click Modify.
In the Edit DWORD Value box, under Value Data, type the number of seconds you want for each poll, ie 900 will poll every 15 minutes, then click OK.

Now enable the NtpServer:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\W32Time\TimeProviders\NtpServer\

In the right pane, right-click Enabled, then click Modify
In the Edit DWord Value box, type 1 under Value data, then click OK.
Now in the right pane, right-click NtpServer, then Modify and in the Edit DWORD Value under Value Data type Peers, then click OK.

To configure the time correction settings, 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.

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 (polls in one hour)

Exit Registry

Now to restart windows time service, click Start, Run and type:
net stop w32time && net start w32time

And on each computer, other than the domain controller, type:
W32tm/resync/rediscover
And that’s it your time server should be now up and running.