Archive for the ‘Time Synchronisation’ Category

How to Configure an NTP Network Time Server in Windows XP

Thursday, January 3rd, 2008

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.

Setting Time on your Computer

Wednesday, January 2nd, 2008

An accurate time source is needed for many computer applications. Every Personal Computer comprises of an internal Clock, it is beneficial to check the date and time settings on your PC daily. For critical application, you should synchronise the time base with a highly accurate external time source.

Personal Computers are not designed to be perfect clocks. Their design has been optimised for mass production and low-cost rather than maintaining accurate time. Where time is crucial to the application, there are a number of precise external references available that enable computers to maintain accurate system time. This article looks at the various sources of time references to show how they can be utilised to maintain synchronised time on your computer.

Working to a synchronised time base is essential in computer networks. Without any external reference, individual computers will start to drift, anything from a few seconds to a few minutes each day. Clearly such a situation would not be acceptable when processing transactions or performing time critical tasks.

On the Internet this problem has been solved by introducing the Network Time Protocol (NTP). The NTP protocol supports the distribution of accurate time from a highly precise time server to network time clients. Most modern operating systems have the ability to synchronise time with an NTP server. Generally all that is required is the IP address or domain name of Stratum 1 or Stratum 2 NTP servers.

LINUX and UNIX operating systems can download the full NTP implementation from the NTP website at www.ntp.org NTP is freely available, open source software, available under the GNU public license.

Mirosoft Windows XP/2000/2003 and Vista system software use a standart SNTP client for Simple Network Time Protocol. This is based on a sub-set of the Network Time Protocol, using a simplified NTP algorithm with many of the more complex high precision routines removed.

The Windows operating systems provide facilities for an IP address or domain name of an Internet or Intranet NTP server to be entered in the time properties tab. The SNTP client will then contact the NTP server periodically in order to update and synchronise system time.

Alternative methods will be required for standalone computers and systems which do not have access to the Internet. These can be provided with a local access to national radio time references which are transmitted free-to-air.

All that is required is a small RS232 serial or USB radio receiver, and the PC can obtain continuous accurate time. The Computer Time synchronises to the received time and frequency radio source.

Radio broadcasts are identified by their ‘call sign’ The UK time transmitter call sign, MSF, is located at Anthorn, Cumbria. Similar arrangements exist in Noth America – call sign WWVB from Colarado. Germany is covered by DCF broadcast from Mineflingen, near Frankfurt. National broadcasts are also available in France, Switzerland, Japan and Canada.

The only shortcoming with national radio time and frequency solutions is that they have a finite transmission range. In general they are limited to geographic boundaries also. Such issues do not apply to the Global Position System (GPS) a satellite based universal navigation system.

Each GPS satellite carries a highly accurate synchronised atomic clock. This enables GPS to provide precise timing information anywhere on the face of the planet. All that is required to receive the transmission is a low cost-cost GPS receiver and antenna with a clear view of the sky. PC connections are similar to the radio transmissions configuration, using a serial or USB port, enabling accurate timing information to be available continuously.

The Meaning of an Accurate Time Server

Tuesday, January 1st, 2008

This article is about the Importance of network time synchronisation and how significant it is to have an accurate network time server resource in the business.

Every Computer has a clock that sustains the internal system time. PC clocks have low- cost crystal oscillators that are notoriously prone to drift. Each Computer can drift at different rates.

The time difference can become bigger and bigger over a period of time. This can lead to huge problems within the company. This article conveys the value of network time synchronization and having an accurate network time server source in an organization.

Computer Time: Computer system time is maintained by low cost real time clock and crystal oscillator components. Crystal oscillators are built with very low tolerance, each oscillates at a slightly different rate. The temperature variation make the crystal change its frequency. This is one of the reason why computers are weak in keeping up an accurate time. A Companies Computers need to be synchronized otherwise each computer will drift at a slightly different quantity.

Each computer need a network time that is correctly synchronized otherwise it can cause huge problems, especially in transaction-processing surroundings. Unsynchronized PCs can lead to fraud and other problems that can be caused in an environment where synchronized time is needed. Problems can arise with shared network files, the reason is because the unsynchronized computers are using the same resource.

Network Time Servers: Network Time servers gain precise time from an external time reference and offer (presents) an accurate time source to network time clients. Time server use the Network Time Protocol (NTP), which is a UDP based protection over TCP/IP. There is a number of options that can be used to get an accurate time. GPS (Global Positioning Systems) offers a highly accurate time; all that is needed is a clear view to the sky. Another alternative would be radio frequency. The main countries that provide radio frequency are England (MSF); Germany (DCF-77) and the US (WWVB). Other countries are France (TDF); Canada (CHU); Japan (JJY) and Switzerland (HBG) and it is possible to obtain time from mobile phone network.

Internet Time Servers: There are a lot of Internet based NTP time server resources offered that can be used for network time synchronization. The Internet Time Server can cause Problem for the Company’s Computers. The time server is located outside the firewall, so a port must be left open to access the time server. This does not just lead to Security implications, but also to problems with the time server accuracy, reliability and provision.

Local Dedicated Network Time Server: A local devoted network time server overcome many problems related to Internet based references. The time server is located inside the security firewall and does not need any external access. Also, a local time server can improve accuracy due to reliable network paths between clients and server.

To resume, the network time synchronization is an important factor in Computer network installations. Unlike the internet based network time servers, which are known for they security problems, local dedicated network time servers overcome the security problems by offering secure, accurate and reliable network time synchronisation resolution.