Friday, March 13, 2009

Computer Hardware - How to Synchronise a Network

All computers maintain system time from an internal real-time clock chip. These devices are generally relatively low-cost and as a consequence tend not to keep good time. In fact, computers are notorious for providing inaccurate time and can drift by several minutes each day. This has serious consequences for networked computer systems and applications. Each computer can have wildly differing system times, which can be totally unacceptable for transaction processing applications. A solution is available in the form of network NTP servers. These allow all the servers, workstations and other infrastructure on a network to synchronise to a single accurate time reference. A Time Server obtains precise time from an external time reference and maintains an accurate internal time. This time is then made available to network clients for synchronisation.

The Network Time Protocol (NTP) is the standard means of network time synchronisation. The protocol defines a number of messages, or packets of information, that are passed between a time server and a client in order to achieve synchronisation. Most operating systems, including Microsoft Windows, LINUX, UNIX and Netware have integrated NTP or SNTP client software. Client software is also freely downloadable from Internet sites under the GNU public licence.

Configuring client software is extremely straightforward. Minimally, the client software only requires the DNS name or IP address of the time server that the client is to utilise for synchronisation.

There are many public NTP Servers freely available on the Internet for synchronisation, generally provided by Physics labs or Government departments. However, there are a number of advantages associated with having a local server on your network. Firstly, a local server will reside inside your firewall and pose less of a security risk than an Internet based server that requires ports to be left open in your firewall. Local servers are more accurate by having a direct connection to a hardware reference clock. Also, a recent survey showed that many Internet based servers are configured incorrectly and can provide inaccurate time.

A number of hardware reference clocks are available to time servers, the most common and accurate being GPS (Global Positioning System). GPS is most widely used for navigation purposes, but can provide time accurate to within nanoseconds. However, in order to receive GPS signals an antenna is required that needs to have a good view of the sky, ideally on a rooftop. Therefore, installation costs can be an inhibiting factor. Alternatively radio time and frequency broadcasts can generally be received indoors close to the host. Therefore, installation costs are kept significantly lower. However, weather, ground topography and other forms of interference can severely affect radio broadcasts. Radio time references are also not as accurate as time sourced from GPS.

In summary, it is very simple to synchronise computers and computer network infrastructure to a single accurate time reference. GPS and radio NTP Time Servers are widely available as off-the-shelf solutions to the problems of maintaining accurate network time.