Time Synchronization Basics: Configuring Windows as an NTP Server

Sep 4
06:54

2008

Richard N Williams

Richard N Williams

  • Share this article on Facebook
  • Share this article on Twitter
  • Share this article on Linkedin

This article explains basic time synchronization principles and explains basic NTP configuration for Windows systems.

mediaimage
Time synchronization is vital in modern computer networks. Having one machine running a slower clock than another can cause a myriad of all sorts of problems.  From the benign,Time Synchronization Basics: Configuring Windows as an NTP Server Articles such as emails arriving before they were sent, to the more serious such as being unable to debug a system or have it vulnerable to malicious hackers.

Computers have two clocks, a software clock that runs in the background while the computer is running and a system clock that is battery backed and provides a reference for the software clock when the machine is switched on.

Unfortunately neither is very accurate which is why most administrators opt to synchronize their networks to an atomic clock source that relays the global Coordinated Universal Time (UTC). This has an advantage of not just providing the most accurate synchronization but also ensuring that the network is synchronized, not just with itself, but also with networks all around the world.

Like other operating systems, Windows uses a version of NTP (Network Time protocol) to deal with time synchronization. NTP is a protocol that transfers time information over the Internet or Local Area Network (LAN) by ‘packets’, allowing other computers to synchronize the time on their clocks to it.

By using NTP one server or work station can be used to synchronize dozens of other computers and devices. As NTP is also hierarchical, meaning servers that get their time from one machine can also use it to synchronize the time on other computers, in theory thousands of machines can be synchronized with just one NTP server receiving a UTC source. However, although the lower down the hierarchy or strata a machine is, the less accurate it will be.

Configuring a Windows to act as a client server is relatively straightforward. Simply create a new DWORD value, or modify the existing "LocalNTP" and set it to:

System Key: [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\W32Time\Parameters]
Value Name: LocalNTP
Data Type: REG_DWORD (DWORD Value)
Value Data: (0 = disabled, 1 = enabled)
Selecting a UTC source is another consideration when running a NTP server. There are several methods of doing this.

The first is to use one of the myriad of Internet time references available. However, some are more accurate that others and distance from a host can play a factor too. Another consideration to take into account in using an Internet timing reference is that of security. To use an Internet source a hole must be kept open in a firewall and NTP’s inbuilt security system called authentication isn’t possible over the Internet.

A far better solution is to use the national time and frequency signals broadcast by several countries’ large physics laboratories. Alternatively the timing signal broadcast by the onboard atomic clocks of the GPS (Global Positioning System) network can be used. Both these methods are far more secure than receiving a timing signal over the Internet and dedicated NTP servers are available that can receive either or both  signals.