NTP

6/28/2003

NTP: Network Time Protocol. NTP provides time of day information via UDP encoded messages nominally on computer port 123. Primary servers will typically have access to an atomic clock or other high precision timekeeping device. Secondary servers typically monitor multiple primary servers and attempt to reconcile any differences in time that are observed. NTP can be used either locally within a facility network or globally to obtain time reference via an external network such as the Internet. Because of propagation delays, internet derived times are unlikely to be highly accurate although an attempt is usually made to estimate and remove those delays. It is claimed that accuracies of Internet derived times are typically about 10 milliseconds, and that consistency within a local network can be around 200 microseconds relative to the local time reference. Obtaining maximum precision requires making a great many measurements which tends to put substantial loads on NPT servers. Worst case errors on single measurements can be measured in seconds.

Complex and subtle differences exist between NTP handling for always on and intermittently connected networks. Some users are tolerant of time jumps whereas others require orderly clock skewing performed by small changes to the length of a second. At least one popular program has to be forced to make time changes of more than 1000 seconds on the theory that any clock that far off is a symptom of a more serious problem. Some firewalls block port 123. Error messages often are uninformative. NPT software is not always easy to deploy.

NTP operates on Coordinated Universal Time (UTC) which is the politically correct name for Greenwich Mean Time. (The abbreviation UTC technically is not an acronym as the letters are out of order in both French and English.) Times are transmitted as seconds since Midnight Jan 1, 1900. They are sent with 64 bits of precision. 32 bits are allocated to seconds which means that the time encoding will wrap back to zero in 2039. UTC includes occasional "leap seconds" inserted to correct for minor variations in the Earth's rotation rate. NTP is defined in a number of RFCs, the most important of which is RFC 1304.

There is a compatible, slightly simplified protocol called Simple Network Time Protocol (SNTP) that can be employed instead of NTP. Other time transmission protocols are also in use.

NTP clients and servers are available for most common computer operating systems. Some operating systems -- such as MSDOS, Windows 9, and OS/2 operate on local time. Other OSes operate on UTC and use some mechanism -- often an environment variable called TZ -- to convert UTC to local time. Some care may be required when dual booting OSes that prefer the local hardware clock set to different times. Problems can also occur when using local time related operations in networks/virtual networks that include computers in different timezones.

Between checks with the external reference, relative time is updated from the computer's local clock -- a notoriously poor timekeeper. Timekeeping software that uses NTP for reference times often includes provisions to calculate and correct for drift in the local clock which is often several seconds a day.

Return To Index Copyright 1994-2008 by Donald Kenney.