[ntp:questions] Using SNTP request always with T1 as zero

Danny Mayer mayer at ntp.isc.org
Wed Apr 18 03:39:20 UTC 2007

Harlan Stenn wrote:
>>>> In article <1176719807.676167.124350 at q75g2000hsh.googlegroups.com>, "Mastuac" <jordi_pn at yahoo.es> writes:
> Mastuac> Hello, I'm implementing sntp on a small micro.  Is there any
> Mastuac> problem if I send the sntp request message with the Originate
> Mastuac> Timestamp (T1) always as zero?  So the offset would be t= (T2 - 0)
> Mastuac> + (T3 - T4 ).  The only utility of T1 is to allow the client to
> Mastuac> distinguish from delayed server responses?

That's wrong. The correct calculation is:

theta = T(B) - T(A) = 1/2 * [(T2-T1) + (T3-T4)]

See the NTP V4 protocol draft. (The corrected latest one as this was
wrong in the previous draft). Note that there is no concept of T1 being
zero, it always has a non-zero value and the protocol REQUIRES you send
a T1 timestamp from the client of your local system clock in GMT in NTP
timestamp format.



More information about the questions mailing list