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)

Using National Time and Frequency Signals as a NTP Timing Reference

  |   By

This article explores how to use national time and frequency radio transmissions for network time synchronisation.

The importance of an authenticated timing reference to synchronise a computer network to, cannot be stressed highly enough.

While there are hundreds and quite possibly thousands of internet based timing sources these can’t be authenticated leaving a system open to viruses, malicious hackers or malware.

Furthermore, a survey by MIT (Massachusetts Institute of Technology) found that nearly half of internet timing sources were offset by over ten seconds and only a third could be regarded as being ‘useful ’ also it was discovered that many were too far away from peers to provide any useful accuracy.

Most dedicated network time servers are designed to receive a timing signal from the GPS (Global Positioning System), primarily because it is the most accurate and can be received from anywhere on the globe.

However, there are situations where it may not be practical to use a GPS time server. A GPS antenna has to be situated on a rooftop and have a clear view of the sky which may prove difficult if the server is on the ground floor of a multi-storey sky-scraper. Many administrators also dislike the hassle and expense of having to run a cable up a building and install an antenna or if there are possibilities the server room maybe relocated and the process has to be repeated.

Fortunately many countries’ national physics laboratories broadcast a time and frequency signal from a radio transmitter. In the US the signal is referred to as WWVB and is broadcast by NIST (National Institute for Standards and Technology) in Colorado. In the UK the National Physical Laboratory (NPL) broadcasts the MSF signal from Cumbria and similar systems are broadcast in Germany (DCF-77), Japan (JJY) and France (TDF).

Unfortunately not every country transmits a national time and frequency broadcast so if a time server is to be located outside of the US, Germany, UK, France or Japan it may be doubtful that a signal could be received (although many of the these transmissions can be received in neighbouring countries).

Radio signals are also easily susceptible to atmospheric interference and can be blocked by mountains, sky-scrapers or other topography. However, an upside to using a radio receiver is that it will receive a signal inside a building.

While a radio transmission is not as accurate as a GPS time signal a dedicated network time server receiving a radio signal can still provide accuracy between 1 – 20 milliseconds (a millisecond is 1/1000 of a second) which is more than adequate for the needs of network synchronisation.

How to Build and Configure Your Own Radio Referenced NTP Time Server

  |   By

Many people are probably familiar with the Internet Time tab when setting their clock in Windows. This is a basic form of NTP (Network Time Protocol) called SNTP (Simple Network Time Protocol) that polls a NTP server every so often to synchronize time to. However, full NTP does a lot more, such as polling several servers to determine what is the best and most stable times source.

Creating your own NTP time server is relatively straightforward and if you are a resident of the US then the simplest way is to use a relatively cheap receiver module, set to receive the WWVB timing signal which is broadcast by NIST (National Institute of Standards and Time) at a frequency of 60 kHz.

To create your own product using the WWVB time signal, WWVB receiver modules, are readily available at low cost. When looking for a receiver module there are several points to consider:

There should be a simple interface to allow easy integration of accurate timekeeping into electronic equipment etc. The receiver should use dedicated chips designed specifically to receive the WWVB (USA) time signal. The advantage of these over other solutions is that the modules include the necessary support electronics, tuned crystals, etc and are preassembled, tested and are usually in miniature form.

When combined with a suitable Antenna the receiver module acts as a complete time code receiver, providing a serial digital data output stream for external decoding.

Once assembled and tested so the module is receiving a signal it can then be connected to your computer or server.

Once connected the time server should be configured using the registry editor. Simply follow these steps:

Locate the following subkey: HKEY_LOCAL_MACHINESYSTEMCurrentControlSetServicesW32TimeParametersType
In the right pane, right-click Type then click Modify, in edit Value type NTP in the Value data box then click OK.

Locate the following subkey: HKEY_LOCAL_MACHINESYSTEMCurrentControlSetServicesW32TimeConfigAnnounceFlags.

In the right pane, right-click AnnounceFlags and 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.

To enable the Network Time Protocol; NTPserver, locate and click: HKEY_LOCAL_MACHINESYSTEMCurrentControlSetServicesW32TimeTimeProvidersNtpServer

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 go back and click on: HKEY_LOCAL_MACHINESYSTEMCurrentControlSetServicesW32TimeParametersNtpServer

In the right pane, right-click NtpServer, then Modify, in the Edit DWORD Value under Value Data type In the right pane, right-click NtpServer, then Modify, in the Edit DWORD Value under Value Data type the Domain Name System (DNS), each DNS must be unique and you must append 0x1 to the end of each DNS name otherwise changes will not take effect.

Now click Ok then locate and click the following: HKEY_LOCAL_MACHINESYSTEMCurrentControlSetServicesW32TimeTimeProvidersNtpClientSpecialPollInterval

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.

To configure the time correction settings, locate: HKEY_LOCAL_MACHINESYSTEMCurrentControlSetServicesW32Timeconfig

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_MACHINESYSTEMCurrentControlSetServicesW32Timeconfig 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 Editor

Now, to restart windows time service, click Start, Run (or alternatively use the command prompt facility) and type:

net stop w32time && net start w32time. And that’s it your time server should be now up and running.