How does NTP, compute the round-trip delay time and the offset.
Asked
Active
Viewed 3,069 times
1 Answers
7
To synchronize its clock with a remote server, the NTP client must compute the round-trip delay time and the offset. The round-trip delay is computed as
delta = (t_3 - t_0) - (t_2- t_1)
where
t0 is the client's timestamp of the request packet transmission,
t1 is the server's timestamp of the request packet reception,
t2 is the server's timestamp of the response packet transmission and
t3 is the client's timestamp of the response packet reception.
Therefore
t3 − t0 is the time elapsed on the client side between the emission
of the request packet and the reception of the response packet and
t2 − t1 is the time the server waited before sending the answer.
The offset theta is given by
theta = ((t_1 - t_0) + (t_2 - t_3))/2
The NTP synchronization is correct 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, the synchronization has a systematic bias of half the difference between the forward and backward travel times.
There has to be a two way communication to allow synchronization. Using the NTP time as a broadcast from the NTP server will leave an unknown error in time.

Arno
- 4,994
- 3
- 39
- 63