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 synchronization algorithm == [[File:NTP-Algorithm.svg|thumb|Round-trip delay time δ]] A typical NTP client regularly [[Polling (computer science)|polls]] one or more NTP servers. The client must compute its time offset and [[round-trip delay]]. Time offset ''θ'' is positive or negative (client time > server time) difference in absolute time between the two clocks. It is defined by <math display="block">\theta = \frac{(t_1 - t_0) + (t_2 - t_3 )}{2} ,</math> and the round-trip delay ''δ'' by <math display="block">\delta = {(t_3 - t_0 ) - ( t_2- t_1 )} ,</math> where *''t''<sub>0</sub> is the client's timestamp of the request packet transmission, *''t''<sub>1</sub> is the server's timestamp of the request packet reception, *''t''<sub>2</sub> is the server's timestamp of the response packet transmission and *''t''<sub>3</sub> is the client's timestamp of the response packet reception.<ref name="Mills2010" />{{rp|19}} To derive the expression for the offset, note that for the request packet, <math display="block">t_0 + \theta + \delta/2 = t_1</math> and for the response packet, <math display="block">t_3 + \theta - \delta/2 = t_2</math> Solving for ''θ'' yields the definition of the time offset. The values for ''θ'' and ''δ'' are passed through filters and subjected to statistical analysis ("mitigation"). [[Outlier]]s are discarded and an estimate of time offset is derived from the best three remaining candidates. The clock frequency is then adjusted to reduce the offset gradually ("discipline"), creating a [[feedback loop]].<ref name="Mills2010">{{cite book|author=David L. Mills|title=Computer Network Time Synchronization: The Network Time Protocol|url=https://books.google.com/books?id=pdTcJBfnbq8C&pg=PA12|date=12 December 2010|publisher=Taylor & Francis|isbn=978-0-8493-5805-0|pages=12–|access-date=16 October 2016|archive-url=https://web.archive.org/web/20140718092324/http://books.google.com/books?id=pdTcJBfnbq8C&pg=PA12|archive-date=18 July 2014|url-status=live}}</ref>{{rp|20}} Accurate synchronization is achieved when both the incoming and outgoing routes between the client and the server have symmetrical nominal delay. If the routes do not have a common nominal delay, a [[systematic bias]] exists of half the difference between the forward and backward travel times. A number of approaches have been proposed to measure asymmetry,<ref name="iL6pp">{{cite conference |last1=Gotoh |first1=T. |last2=Imamura |first2=K. |last3=Kaneko |first3=A. |title=Conference Digest Conference on Precision Electromagnetic Measurements |chapter=Improvement of NTP time offset under the asymmetric network with double packets method |conference=Conference on Precision Electromagnetic Measurements |pages=448–449 |year=2002 |doi=10.1109/CPEM.2002.1034915 |isbn=0-7803-7242-5}}</ref> but among practical implementations only chrony seems to have one included.<ref name="Ocilw"/><ref>{{cite web |title=sourcestats.c, function estimate_asymmetry() |url=https://git.tuxfamily.org/chrony/chrony.git/tree/sourcestats.c?h=4.3 |website=git.tuxfamily.org (chrony)}}</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)