Jump to content
Main menu
Main menu
move to sidebar
hide
Navigation
Main page
Recent changes
Random page
Help about MediaWiki
Special pages
Niidae Wiki
Search
Search
Appearance
Create account
Log in
Personal tools
Create account
Log in
Pages for logged out editors
learn more
Contributions
Talk
Editing
Network Time Protocol
(section)
Page
Discussion
English
Read
Edit
View history
Tools
Tools
move to sidebar
hide
Actions
Read
Edit
View history
General
What links here
Related changes
Page information
Appearance
move to sidebar
hide
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>
Summary:
Please note that all contributions to Niidae Wiki may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
Encyclopedia:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Search
Search
Editing
Network Time Protocol
(section)
Add topic