Re: [Ntp] Antw: [EXT] Re: New Version Notification for draft‑gruessing‑ntp‑ntpv5‑requirements‑03.txt

Hal Murray <halmurray+ietf@sonic.net> Thu, 21 October 2021 09:20 UTC

Return-Path: <halmurray+ietf@sonic.net>
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 DEF853A1306 for <ntp@ietfa.amsl.com>; Thu, 21 Oct 2021 02:20:06 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.899
X-Spam-Level:
X-Spam-Status: No, score=-1.899 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_NONE=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 m21rsd4BFMAO for <ntp@ietfa.amsl.com>; Thu, 21 Oct 2021 02:20:03 -0700 (PDT)
Received: from c.mail.sonic.net (c.mail.sonic.net [64.142.111.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id B4E223A1302 for <ntp@ietf.org>; Thu, 21 Oct 2021 02:20:02 -0700 (PDT)
Received: from 107-137-68-211.lightspeed.sntcca.sbcglobal.net (107-137-68-211.lightspeed.sntcca.sbcglobal.net [107.137.68.211]) (authenticated bits=0) by c.mail.sonic.net (8.15.1/8.15.1) with ESMTPSA id 19L9K0pH026116 (version=TLSv1.2 cipher=DHE-RSA-AES128-GCM-SHA256 bits=128 verify=NOT); Thu, 21 Oct 2021 02:20:00 -0700
Received: from hgm (localhost [IPv6:::1]) by 107-137-68-211.lightspeed.sntcca.sbcglobal.net (Postfix) with ESMTP id 13DDD28C157; Thu, 21 Oct 2021 02:20:00 -0700 (PDT)
X-Mailer: exmh version 2.9.0 11/07/2018 with nmh-1.7.1
To: Miroslav Lichvar <mlichvar@redhat.com>
cc: Hal Murray <halmurray+ietf@sonic.net>, "ntp@ietf.org" <ntp@ietf.org>
From: Hal Murray <halmurray+ietf@sonic.net>
In-Reply-To: Message from Miroslav Lichvar <mlichvar@redhat.com> of "Tue, 19 Oct 2021 13:27:32 +0200." <YW6rpOxRf35A7F2A@localhost>
Mime-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Date: Thu, 21 Oct 2021 02:20:00 -0700
Message-Id: <20211021092000.13DDD28C157@107-137-68-211.lightspeed.sntcca.sbcglobal.net>
X-Sonic-CAuth: UmFuZG9tSVa51BtcW35ulbFgaDLTCUEZ22TIsFXs7xiLGvGQecwPToV152oLHTkLSuitMt0wbcBywdCSkS8cQO/aNSWMiuST4JpdbKjMv/I=
X-Sonic-ID: C;OG3ZEFAy7BGRwSx66Nu5DA== M;6nEJEVAy7BGRwSx66Nu5DA==
X-Sonic-Spam-Details: -1.5/5.0 by cerberusd
Archived-At: <https://mailarchive.ietf.org/arch/msg/ntp/Z624mtxZ2coUTitAD4-m-KZAALU>
Subject: Re: [Ntp] Antw: [EXT] Re: New Version Notification for draft‑gruessing‑ntp‑ntpv5‑requirements‑03.txt
X-BeenThere: ntp@ietf.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: Network Time Protocol <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, 21 Oct 2021 09:20:07 -0000

mlichvar@redhat.com said:
>> The time used in time-transfer should be TAI to keep things clean.
>> No leap. No smear.

> I'm sure that would look great on paper, but how exactly do you implement it?
> You cannot convert POSIX time_t to TAI just from the timestamp alone. When
> you receive a timestamp from the kernel (e.g. in the SO_TIMESTAMP control
> message), you don't know if it was captured before or after the leap.

Good point.  What does the current code do?

I don't have a simple/clean answer.

A short term hack would be to drop all packets where a time stamp is ambigious.

A long term solution would be for the kernel to keep time in TAI and the 
library to translate all the old APIs to UTC.

A medium term fix for SO_TIMESTAMP and friends would add the TAI-UTC offset to 
the time stamp or a leap-in-progress flag.  That's a few lines of code in the 
kernel.


> The other important issue is that the TAI-UTC offset is not always known.

Yes.  I think requiring the client to know the TAI offset is reasonable.  They 
can get it from a leap-seconds type file or from a simple UDP exchange.  It's 
the same as knowing about the next leap second.

We could put it in every packet, but that seems ugly to me.  It makes things 
slightly simpler for the simple/dumb client (1 packet vs 2) at the cost of 
complicating the packet on the wire.

Maybe we should have a separate packet format for simple clients.  How dumb 
are current dumb clients?  Would they be happy with only a single time stamp 
from the server?  Do they even care about fractions of a second?


> NTP is a simple protocol for exchanging timestamps. It shouldn't enforce what
> kind of timestamps are exchanged.

We either have to pick one and hence enforce that, or put the type of 
timestamp in the packet.  I think it's cleaner to have only one on the wire.

------

The root of the problem is smearing.  The current implementation hides it from 
the client software.

Unless we change that, we have to continue with 2 NTP worlds: one set of 
servers that returns smeared time and another set that returns non-smeared 
time.

My suggestion of TAI only on the wire requires that the client implementation 
know about smearing.  The we-want-smearing information moves from hidden in 
the list of servers to an explicit flag in a config file (or whatever).

The NTP stuff for DHCP could get extended to include the smear flag.

How many other things could use tweaking?



-- 
These are my opinions.  I hate spam.