Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Network Time Protocol
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
== Clock strata == [[File:Usno-amc.jpg|thumb|The [[United States Naval Observatory|U.S. Naval Observatory]] Alternate Master Clock at [[Schriever Air Force Base|Schriever AFB (Colorado)]] is a stratum 0 source for NTP]] [[File:Network Time Protocol servers and clients.svg|thumb|Yellow arrows indicate a direct connection; red arrows indicate a network connection.]] NTP uses a hierarchical, semi-layered system of time sources. Each level of this hierarchy is termed a ''stratum'' and is assigned a number starting with zero for the reference clock at the top. A server synchronized to a stratum ''n'' server runs at stratum ''n'' + 1. The number represents the distance from the reference clock and is used to prevent cyclical dependencies in the hierarchy. Stratum is not always an indication of quality or reliability; it is common to find stratum 3 time sources that are higher quality than other stratum 2 time sources.{{efn|Telecommunication systems use a different definition for [[Synchronization in telecommunications|clock strata]].}} A brief description of strata 0, 1, 2 and 3 is provided below. ; Stratum 0 : These are high-precision timekeeping devices such as [[atomic clock]]s, [[GNSS]] (including [[GPS]]) or other [[radio clock]]s, or a [[Precision Time Protocol|PTP]]-synchronized clock.<ref>{{cite web |title=Combining PTP with NTP to Get the Best of Both Worlds |url=https://www.redhat.com/en/blog/combining-ptp-ntp-get-best-both-worlds |website=www.redhat.com |language=en |quote=Programs from the linuxptp package can be used in a combination with an NTP daemon. A PTP clock on a NIC is synchronized by ptp4l and is used as a reference clock by chronyd or ntpd for synchronization of the system clock.}}</ref> They generate a very accurate [[pulse per second]] signal that triggers an [[interrupt]] and timestamp on a connected computer. Stratum 0 devices are also known as reference clocks. NTP servers cannot advertise themselves as stratum 0. A stratum field set to 0 in NTP packet indicates an unspecified stratum.{{Ref RFC|5905|rp=21}} ; Stratum 1 : These are computers whose [[system time]] is synchronized to within a few microseconds of their attached stratum 0 devices. Stratum 1 servers may peer with other stratum 1 servers for [[sanity check]] and backup.<ref name="cisco">{{cite web| url=http://www.cisco.com/en/US/tech/tk869/tk769/technologies_white_paper09186a0080117070.shtml| title=Network Time Protocol: Best Practices White Paper| access-date=15 October 2013| archive-url=https://web.archive.org/web/20131001041853/http://www.cisco.com/en/US/tech/tk869/tk769/technologies_white_paper09186a0080117070.shtml| archive-date=1 October 2013| url-status=live}}</ref> They are also referred to as primary time servers.<ref name="summary" /><ref name="faq" /> ; Stratum 2 : These are computers that are synchronized over a network to stratum 1 servers. Often a stratum 2 computer queries several stratum 1 servers. Stratum 2 computers may also peer with other stratum 2 computers to provide more stable and robust time for all devices in the peer group. ; Stratum 3 : These are computers that are synchronized to stratum 2 servers. They employ the same algorithms for peering and data sampling as stratum 2, and can themselves act as servers for stratum 4 computers, and so on. The upper limit for stratum is 15; stratum 16 is used to indicate that a device is unsynchronized. The NTP algorithms on each computer interact to construct a [[Bellman–Ford]] shortest-path [[spanning tree]], to minimize the accumulated round-trip delay to the stratum 1 servers for all the clients.<ref name="Mills2010" />{{rp|20}} In addition to stratum, the protocol is able to identify the synchronization source for each server in terms of a reference identifier (refid). {| class="wikitable sortable" |+ Common time reference identifiers (refid) codes |- ! Refid<ref name="MIvTF">{{cite web|url=https://nlug.ml1.co.uk/2012/01/ntpq-p-output/831|title='ntpq -p' output|website=NLUG.ML1.co.uk|access-date=2018-11-12|archive-url=https://web.archive.org/web/20181112141516/https://nlug.ml1.co.uk/2012/01/ntpq-p-output/831|archive-date=2018-11-12|url-status=live}}</ref>!! Clock Source |- | GOES || [[Geostationary Operational Environmental Satellite]] (described as “Geosynchronous Orbit Environment Satellite” in RFC 5905) |- | GPS || [[Global Positioning System]] |- | GAL || [[Galileo (satellite navigation)|Galileo]] Positioning System |- | PPS || Generic pulse-per-second |- | IRIG || Inter-Range Instrumentation Group |- | WWVB || LF Radio [[WWVB]] Fort Collins, Colorado 60 kHz |- | DCF || LF Radio [[DCF77]] Mainflingen, DE 77.5 kHz |- | HBG || LF Radio [[HBG (time signal)|HBG]] Prangins, HB 75 kHz (ceased operation) |- | MSF || LF Radio [[Time from NPL (MSF)|MSF]] Anthorn, UK 60 kHz |- | JJY || LF Radio [[JJY]] Fukushima, JP 40 kHz, Saga, JP 60 kHz |- | LORC || MF Radio [[Loran-C]] station, 100 kHz |- | TDF || [[TDF time signal|MF Radio Allouis, FR 162 kHz]] |- | CHU || HF Radio [[CHU (radio station)|CHU]] Ottawa, Ontario |- | WWV || HF Radio [[WWV (radio station)|WWV]] Fort Collins, Colorado |- | WWVH || HF Radio [[WWVH]] Kauai, Hawaii |- | NIST || [[NIST]] telephone modem |- | ACTS || NIST telephone modem |- | USNO || USNO telephone modem |- | PTB || German PTB time standard telephone modem |- | MRS || (Informal) Multi Reference Sources |- | GOOG || (Unofficial) Google Refid used by Google NTP servers as time4.google.com |} For servers on stratum 2 and below, the refid is an encoded form of the upstream time server's IP address. For IPv4, this is simply the 32-bit address; for IPv6, it would be the first 32 bits of the MD5 hash of the source address. Refids serve to detect and prevent timing loops to the first degree.{{Ref RFC|5905}} The refid field is filled with status words in the case of kiss-o'-death (KoD) packets, which tell the client to stop sending requests so that the server can rest.{{Ref RFC|5905}} Some examples are INIT (initialization), STEP (step time change), and RATE (client requesting too fast).<ref>{{cite web |title=Event Messages and Status Words |url=https://docs.ntpsec.org/latest/decode.html#kiss |website=docs.ntpsec.org |quote=Refid codes are used in kiss-o'-death (KoD) packets, the reference identifier field in ntpq and ntpmon billboard displays and log messages.}}</ref> The program output may additionally use codes not transmitted in the packet to indicate error, such as XFAC to indicate a network disconnection.<ref name="MIvTF"/> The IANA maintains a registry for refid source names and KoD codes. Informal assignments can still appear.<ref>{{cite web |title=Network Time Protocol (NTP) Parameters |url=https://www.iana.org/assignments/ntp-parameters/ntp-parameters.xhtml |website=www.iana.org}}</ref>
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)