Re: [Ntp] Comments on draft-mlichvar-ntp-ntpv5-00

Miroslav Lichvar <mlichvar@redhat.com> Thu, 26 November 2020 12:18 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 14D3B3A12A7 for <ntp@ietfa.amsl.com>; Thu, 26 Nov 2020 04:18:57 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.12
X-Spam-Level:
X-Spam-Status: No, score=-2.12 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_MSPIKE_H4=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (1024-bit key) header.d=redhat.com
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 K0Hmzb9lziCX for <ntp@ietfa.amsl.com>; Thu, 26 Nov 2020 04:18:54 -0800 (PST)
Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [63.128.21.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 3FD663A12A5 for <ntp@ietf.org>; Thu, 26 Nov 2020 04:18:53 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1606393133; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=lXnxVctSHXTHFE1QJrk02R5qvcxo91zjmEmN84PbChk=; b=XgzKoG3csG2Sb1g1ezNyxsBWS3RYZkUXRFja/hRXcKmdX7TC5K76zmnkeh+Tt8Gwje/lrf dN5fnbhhOLe56BPxh+BKkkmJr2mZ63d5INcdZkPcY2LXrnPWZdvzA29hd1V0hooHlGxI4U jdhJfabJxBn820jh8Ov5uvb++HTYxWo=
Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-580-o0gZJkm1Nv-aMb-B6RQxyA-1; Thu, 26 Nov 2020 07:18:50 -0500
X-MC-Unique: o0gZJkm1Nv-aMb-B6RQxyA-1
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 mimecast-mx01.redhat.com (Postfix) with ESMTPS id 2087456C61; Thu, 26 Nov 2020 12:18:44 +0000 (UTC)
Received: from localhost (holly.tpb.lab.eng.brq.redhat.com [10.43.134.11]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 6E12A5D6AC; Thu, 26 Nov 2020 12:18:43 +0000 (UTC)
Date: Thu, 26 Nov 2020 13:18:41 +0100
From: Miroslav Lichvar <mlichvar@redhat.com>
To: Doug Arnold <doug.arnold@meinberg-usa.com>
Cc: "ntp@ietf.org" <ntp@ietf.org>
Message-ID: <20201126121841.GR1734865@localhost>
References: <220FE4E6-559B-414E-B052-413F23DF43FF@meinberg-usa.com>
MIME-Version: 1.0
In-Reply-To: <220FE4E6-559B-414E-B052-413F23DF43FF@meinberg-usa.com>
X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15
Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=mlichvar@redhat.com
X-Mimecast-Spam-Score: 0
X-Mimecast-Originator: redhat.com
Content-Type: text/plain; charset="us-ascii"
Content-Disposition: inline
Archived-At: <https://mailarchive.ietf.org/arch/msg/ntp/wEoIr37qksTRQUNCjj_3S5Nirc8>
Subject: Re: [Ntp] Comments on draft-mlichvar-ntp-ntpv5-00
X-BeenThere: ntp@ietf.org
X-Mailman-Version: 2.1.29
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: Thu, 26 Nov 2020 12:18:57 -0000

On Tue, Nov 24, 2020 at 11:51:59PM +0000, Doug Arnold wrote:
> Regarding the document draft-mlichvar-ntp-ntpv5-00.  Great start.  I attach a file with suggestions and questions.

Thanks for the comments and suggestions. I made some of them in the
github repo:

https://github.com/mlichvar/draft-ntp-ntpv5

Please feel free to submit PRs and/or issues. If you, or anyone else,
would like to write new sections or make other substatial changes,
co-authors are welcome.

I'll reply to some of the comments in the rest of the mail:

> I propose giving the specified datatypes names so that they can be
> referred to later in the document: time16, time32, time64

The two shorter types don't contain timestamps, just some values in
seconds, so I don't think a time16/32 name would work well.

> Is UT1 used with NTP?  Perhaps we can leave this one out?

Here is an example:
https://www.nist.gov/pml/time-and-frequency-division/time-services/ut1-ntp-time-dissemination

> Propose changing: 

> The extension field MUST be the last extension field in the message
> unless an extension field is specifically allowed to be placed after
> a MAC or another authenticator field.
>
> To:
>
> The extension field MUST be the last extension field in the message
> unless an extension field is specifically allowed to be placed after
> a MAC or it is followed by another authenticator field.

Do you have any use case for having multiple authenticators in the
packet? I'd rather avoid unnecessary complications.

> Propose the following description of using the correction field:

> The Correction Extension Field is of type time64.  It is set to zero
> upon transmission by a client.  Any switch or router, that the
> packet traverses on the way to the server MAY add the value of the
> dwell time of the packet in that node to the correction value.  

The Correction Extension Field needs to include more fields. It needs
to be able to correct both offset and delay. It should also allow the
sender to fix the UDP checksum after the header is already sent, and
possibly also provide better resolution for the timestamps. Please see
this old draft:

https://www.ietf.org/archive/id/draft-mlichvar-ntp-correction-field-04.txt

I was planning to adapt it for NTPv5.

> I recommend against having two ways to do the same thing.  It makes
> the protocol more complicated without increasing the functionality.
> I suggest either staying with interleaved mode as a means of
> achieving two step precise timestamps, or deprecating interleaved
> mode, and recommending follow_up packets.  In this case I mean
> deprecated as allowed, for backward compatibility, but not
> recommended in new implementations. 

I agree it would be better to have a single way for this, but I don't
think one is clearly better over the other. They have different
requirements, which work differently in software and hardware server
implementations. 

The interleaved mode requires server to keep a client-specific state.
A microcontroller with a tiny amount of memory couldn't support a
large number of clients.

The follow-up mode is wasting network bandwidth and possibly also the
timestamping rate. A synchronous operation (waiting for the transmit
timestamp before handling another request) significantly reduces the
maximum response rate of the server. An asynchronous operation
requires memory, i.e. not an advantage over the interleaved mode.

-- 
Miroslav Lichvar