ebooksgratis.com

See also ebooksgratis.com: no banners, no cookies, totally FREE.

CLASSICISTRANIERI HOME PAGE - YOUTUBE CHANNEL
Privacy Policy Cookie Policy Terms and Conditions
Network Time Protocol - Wikipedia, the free encyclopedia

Network Time Protocol

From Wikipedia, the free encyclopedia

The Network Time Protocol (NTP) is a protocol for synchronizing the clocks of computer systems over packet-switched, variable-latency data networks. NTP uses UDP port 123 as its transport layer. It is designed particularly to resist the effects of variable latency (jitter buffer).

NTP is one of the oldest Internet protocols still in use (since before 1985). NTP was originally designed by Dave Mills of the University of Delaware, who still maintains it, along with a team of volunteers.

NTP is not related to the much simpler DAYTIME (RFC 867) and TIME (RFC 868) protocols.

Contents

[edit] Overview

NTP uses Marzullo's algorithm with the UTC time scale, including support for features such as leap seconds. NTPv4 can usually maintain time to within 10 milliseconds (1/100 s) over the public Internet, and can achieve accuracies of 200 microseconds (1/5000 s) or better in local area networks under ideal conditions.

The operational details of NTP are illustrated in RFC 778, RFC 891, RFC 956, RFC 958, and RFC 1305. The current reference implementation is version 4 (NTPv4); however, as of 2005, only versions up to 3 (1992) have been documented in RFCs. The IETF NTP Working Group has formed to standardize the work of the NTP community since RFC 1305 et al.

A less complex form of NTP that does not require storing information about previous communications is known as the Simple Network Time Protocol or SNTP. It is used in some embedded devices and in applications where high accuracy timing is not required. See RFC 1361, RFC 1769, RFC 2030, and RFC 4330.

Note that NTP provides just the UTC time, and no information about time zones or daylight saving time. This information is outside its scope and must be obtained separately (most systems allow it to be set manually).

[edit] NTP software implementations

[edit] Unix

The NTP Unix daemon is a user-level process that runs continuously on a machine that supports NTP, and most of the protocol is implemented in this user process. To get the best performance from NTP, it is important to have the standard NTP clock phase-locked loop implemented in the operating system kernel, rather than using only the intervention of the external NTP daemon: all recent versions of the Linux, BSD, and Solaris operating systems have this support.

[edit] Microsoft Windows

All Microsoft Windows versions since 2000 include the Windows Time Service[1], which has the ability to sync the computer clock to an NTP server. However, the version in Windows 2000 only implements Simple NTP, and violates several aspects of the NTP version 3 standard[2]. Beginning with Windows Server 2003, the Microsoft documentation states that Windows Time Service implements the full NTPv3 protocol[3] as specified in RFC 1305.

[edit] Clock strata

Green arrows indicate a direct connection; red arrows indicate a network connection.
Green arrows indicate a direct connection; red arrows indicate a network connection.

NTP uses a hierarchical system of "clock strata". The stratum levels define the distance from the reference clock and exist to prevent cycles in the hierarchy. (Note that this is different from the notion of clock strata used in telecommunications systems.)

Stratum 0
These are devices such as atomic (caesium, rubidium) clocks, GPS clocks or other radio clocks. Stratum-0 devices are not attached to the network; instead they are locally connected to computers (e.g. via an RS-232 connection using a Pulse per second signal).
Stratum 1
These are computers attached to Stratum 0 devices. Normally they act as servers for timing requests from Stratum 2 servers via NTP. These computers are also referred to as time servers. Many Stratum 1 servers (for NTP v3 and earlier versions) may not actually be operating with Stratum 1 precision. As the NTP protocol is developed, it will become less and less possible for misleading Stratum 1 servers to run — instead the protocol would automatically bump the server Stratum level down accordingly.
Stratum 2
These are computers that send NTP requests to Stratum 1 servers. Normally a Stratum 2 computer will reference a number of Stratum 1 servers and use the NTP algorithm to gather the best data sample, dropping any Stratum 1 servers that seem obviously wrong. Stratum 2 computers will peer with other Stratum 2 computers to provide more stable and robust time for all devices in the peer group. Stratum 2 computers normally act as servers for Stratum 3 NTP requests.
Stratum 3
These computers employ exactly the same NTP functions of peering and data sampling as Stratum 2, and can themselves act as servers for lower strata, potentially up to 16 levels. NTP (depending on what version of NTP protocol in use) supports up to 256 strata.

It is hoped that in NTP 5, a protocol still in development, only 8 strata will be permitted. As most NTP clients call on Stratum 2 servers, it is expected that no users will be disadvantaged by the loss of granularity.[citation needed]

[edit] NTP timestamps

The 64-bit timestamps used by NTP consist of a 32-bit seconds part and a 32-bit fractional second part, giving NTP a time scale of 232 seconds (136 years) and a theoretical resolution of 2−32 seconds (0.233 nanoseconds).

The NTP timescale wraps around every 232 seconds (136 years). NTP uses an epoch of January 1, 1900, so the first wrap will occur in 2036, well before the familiar UNIX Year 2038 problem. This wraparound defect is specific to the 32 bit NTP timestamp in NTP3 that is held over into NTP4. NTP4 has a clean 64 bit mode that does not have this problem — as well as a 128 bit mode that is in prototyping for NTP5.

Implementations should disambiguate NTP time using a knowledge of the approximate time from other sources. Since this only requires time accurate to a few decades, this is unlikely to ever be a problem in general use.

Even so, future versions of NTP will extend the time representation to 128 bits: 64 bits for the second and 64 bits for the fractional-second.

According to Mills, "The 64 bit value for the fraction is enough to resolve the amount of time it takes a photon to pass an electron at the speed of light. The 64 bit second value is enough to provide unambiguous time representation until the universe goes dim."[4] Indeed, 2−64 seconds is about 54 zeptoseconds, and 264 seconds is about 585 billion years.

[edit] See also

[edit] References

[edit] Bibliography

  • Mills, David L. Computer Network Time Synchronization: The Network Time Protocol, Taylor & Francis / CRC Press. ISBN 0849358051

[edit] External links

[edit] Other time synchronization protocols


aa - ab - af - ak - als - am - an - ang - ar - arc - as - ast - av - ay - az - ba - bar - bat_smg - bcl - be - be_x_old - bg - bh - bi - bm - bn - bo - bpy - br - bs - bug - bxr - ca - cbk_zam - cdo - ce - ceb - ch - cho - chr - chy - co - cr - crh - cs - csb - cu - cv - cy - da - de - diq - dsb - dv - dz - ee - el - eml - en - eo - es - et - eu - ext - fa - ff - fi - fiu_vro - fj - fo - fr - frp - fur - fy - ga - gan - gd - gl - glk - gn - got - gu - gv - ha - hak - haw - he - hi - hif - ho - hr - hsb - ht - hu - hy - hz - ia - id - ie - ig - ii - ik - ilo - io - is - it - iu - ja - jbo - jv - ka - kaa - kab - kg - ki - kj - kk - kl - km - kn - ko - kr - ks - ksh - ku - kv - kw - ky - la - lad - lb - lbe - lg - li - lij - lmo - ln - lo - lt - lv - map_bms - mdf - mg - mh - mi - mk - ml - mn - mo - mr - mt - mus - my - myv - mzn - na - nah - nap - nds - nds_nl - ne - new - ng - nl - nn - no - nov - nrm - nv - ny - oc - om - or - os - pa - pag - pam - pap - pdc - pi - pih - pl - pms - ps - pt - qu - quality - rm - rmy - rn - ro - roa_rup - roa_tara - ru - rw - sa - sah - sc - scn - sco - sd - se - sg - sh - si - simple - sk - sl - sm - sn - so - sr - srn - ss - st - stq - su - sv - sw - szl - ta - te - tet - tg - th - ti - tk - tl - tlh - tn - to - tpi - tr - ts - tt - tum - tw - ty - udm - ug - uk - ur - uz - ve - vec - vi - vls - vo - wa - war - wo - wuu - xal - xh - yi - yo - za - zea - zh - zh_classical - zh_min_nan - zh_yue - zu -