[ntpwg] ntpwg Updated NTPv4 Protocol Specification/timestamp location

Danny Mayer mayer at ntp.isc.org
Tue Feb 19 04:45:22 UTC 2008


Kurt Roeckx wrote:
> On Thu, Feb 07, 2008 at 05:34:08PM +0000, David L. Mills wrote:
>> Stuart,
>>
>> No, compare your equation with mine. The view has to be from A, so the 
>> delay cancels.
> 
> 
> I'm still not convinced.  So I'll try to make an example.  Let's assume
> that it takes 2 second for the packet to travel from A to B and the
> other way around.  That is, if A sends a physical signal from low to
> high, B will see that change 2 seconds later.  Let's also assume that it
> takes A 1 second to transmit the packet.  Then let's assume that A's and
> B's clock are in sync, and that A takes the timestamp at the start of
> the packet, and B and the end.
> 
> We start with A sending a packet at time 0.0.  A takes the time
> when the packets starts to be transmitted, so sets T1 to 0.0.
> 
> The packet will start to arrive at B at 2.0, and stop at
> 3.0.  B takes the timestamp at the end of the packet
> and will set T2 to 3.0.
> 
> It takes B 1 second to process the packet.  It will start to transmit
> the packet at 4.0.  But since it timestamps the packets after
> it's completly send, it will set T3 1 second later to 5.0.  B will inform
> A about T3 with an other packet it will send later.
> 
> The packet starts to arrive at A at 6.0, which is when A takes
> the timestamp, getting us T4 = 6.0.  The packet completly arrives at
> 7.0, but that doesn't matter.
> 
> This gives:
> offset = 1/2 * [(T2-T1) + (T3-T4)] = 1/2 * [(3-0)+(5-6)] = 1.
> 
> While we expected the result to be 0.
> 

Why would you expect that? The offset should always be non-zero as you 
yourself have demonstrated that it's taken time for the packet to travel 
between A and B.

Danny

> Note that for the delay we don't have the problem.
> delay = (T4-T1) - (T3-T2) = (6-0) - (5-3) = 4.
> 
> 
> Kurt


More information about the ntpwg mailing list