Re: [Ntp] Drafts on interleaved modes and correction field

Miroslav Lichvar <mlichvar@redhat.com> Tue, 31 October 2017 15:57 UTC

Return-Path: <mlichvar@redhat.com>
X-Original-To: ntp@ietfa.amsl.com
Delivered-To: ntp@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id D233F13F87A for <ntp@ietfa.amsl.com>; Tue, 31 Oct 2017 08:57:58 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -6.901
X-Spam-Level:
X-Spam-Status: No, score=-6.901 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, RCVD_IN_DNSWL_HI=-5, SPF_PASS=-0.001] autolearn=ham autolearn_force=no
Received: from mail.ietf.org ([4.31.198.44]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id VftO81Kn_pRb for <ntp@ietfa.amsl.com>; Tue, 31 Oct 2017 08:57:56 -0700 (PDT)
Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 3B3F313F88C for <ntp@ietf.org>; Tue, 31 Oct 2017 08:57:26 -0700 (PDT)
Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id D2F6F624C9; Tue, 31 Oct 2017 15:57:25 +0000 (UTC)
DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com D2F6F624C9
Authentication-Results: ext-mx10.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com
Authentication-Results: ext-mx10.extmail.prod.ext.phx2.redhat.com; spf=fail smtp.mailfrom=mlichvar@redhat.com
Received: from localhost (unknown [10.43.2.117]) by smtp.corp.redhat.com (Postfix) with ESMTPS id E98355D754; Tue, 31 Oct 2017 15:57:24 +0000 (UTC)
Date: Tue, 31 Oct 2017 16:57:17 +0100
From: Miroslav Lichvar <mlichvar@redhat.com>
To: Tal Mizrahi <tal.mizrahi.phd@gmail.com>
Cc: ntp@ietf.org, Aanchal Malhotra <aanchal4@bu.edu>
Message-ID: <20171031155717.GC7648@localhost>
References: <20171031090139.GD15597@localhost> <CABUE3XmV1sUvq0KAJVrQv1sZ8vK6R8GwR+qeO1huTUgnOdujfQ@mail.gmail.com> <20171031135247.GB7648@localhost> <CABUE3X=pDEL9mcfoTGJw3PbwzHKnDTddr7Aqk71PyEBY77kzSw@mail.gmail.com>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Disposition: inline
In-Reply-To: <CABUE3X=pDEL9mcfoTGJw3PbwzHKnDTddr7Aqk71PyEBY77kzSw@mail.gmail.com>
User-Agent: Mutt/1.8.3 (2017-05-23)
X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15
X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.39]); Tue, 31 Oct 2017 15:57:26 +0000 (UTC)
Archived-At: <https://mailarchive.ietf.org/arch/msg/ntp/oD_gz8ZC0baloJyGzQ9cB5DKE1I>
Subject: Re: [Ntp] Drafts on interleaved modes and correction field
X-BeenThere: ntp@ietf.org
X-Mailman-Version: 2.1.22
Precedence: list
List-Id: <ntp.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/ntp>, <mailto:ntp-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/ntp/>
List-Post: <mailto:ntp@ietf.org>
List-Help: <mailto:ntp-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/ntp>, <mailto:ntp-request@ietf.org?subject=subscribe>
X-List-Received-Date: Tue, 31 Oct 2017 15:57:59 -0000

On Tue, Oct 31, 2017 at 04:59:52PM +0200, Tal Mizrahi wrote:
> >With NTP there is generally no HW support, so clients and servers
> >should use trailer RX timestamps and preamble TX timestamps to avoid
> >an asymmetric delay with different link speeds. The following document
> >explains the issue nicely.
> >
> >https://www.eecis.udel.edu/~mills/stamp.html
> >
> >Do you think it will be difficult to implement? If the link speed and
> >length of the packet is known, the timestamp can be transposed.
> 
> The link speed is not necessarily known to the end points.

I meant that the devices which are supposed to modify the correction
field know the link speed and can transpose preamble timestamps if
necessary.

The end points don't need to know the link speed on the path. Just the
speed of their own link if they need to transpose their timestamps.

> Furthermore, the
> link speed may change several times along the path.

In such case we want the correction to still be symmetric, right?

> Maybe I am missing something, but it appears that when measuring
> last-bit-in-to-first-bit-out we are ignoring the packet reception time; it
> seems to make sense to include the packet reception time in the residence
> time.

For PTP yes, but not for NTP. The reception time is included in the
network delay as measured by the client, which will be symmetric as
long as no device on the path includes in the correction the
transmission time or reception time.

> Moreover, we never know which nodes along the path use store-and-forward,
> and which nodes use cut-through. In cut-through forwarding the packet
> transmission may start before the last bit is received, so it certainly
> makes more sense to measure the first-bit-in-to-first-bit-out.

That's a good point. With cut-through switching the correction would
be negative and generally couldn't be determined in time to be put in
the packet as the length is unknown. Are there any switches that can
cut-through from a faster link to slower link?

Maybe it would make sense to allow corrections from preamble RX
timestamps when the link speeds are equal.

> >The reason for a separate transmit correction is to support the
> >interleaved modes. The receive correction might not be necessary. If
> >you have a better use for the 2 octets, I think it could be dropped
> >and included in the origin correction instead.
> 
> So it looks like two correction fields would suffice: one for the forward
> direction, and one for the reverse direction. Right?

I think it's three fields if we want both support the interleaved
modes and allow the client to check the delay correction in both
directions. Where would be the transmit correction included if there
were only two fields?

-- 
Miroslav Lichvar