Re: [Ntp] NTPv5: big picture

Martin Burnicki <martin.burnicki@meinberg.de> Tue, 05 January 2021 16:33 UTC

Return-Path: <martin.burnicki@meinberg.de>
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 A9DBD3A1108 for <ntp@ietfa.amsl.com>; Tue, 5 Jan 2021 08:33:52 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.361
X-Spam-Level:
X-Spam-Status: No, score=-2.361 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, NICE_REPLY_A=-0.262, 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 (2048-bit key) header.d=meinberg.de
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 FONeQkRnydTB for <ntp@ietfa.amsl.com>; Tue, 5 Jan 2021 08:33:51 -0800 (PST)
Received: from server1a.meinberg.de (server1a.meinberg.de [176.9.44.212]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 849D73A10E0 for <ntp@ietf.org>; Tue, 5 Jan 2021 08:33:23 -0800 (PST)
Received: from srv-kerioconnect.py.meinberg.de (unknown [193.158.22.2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by server1a.meinberg.de (Postfix) with ESMTPSA id 2C3F671C0D55; Tue, 5 Jan 2021 17:33:21 +0100 (CET)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=meinberg.de; s=dkim; t=1609864401; 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: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=llFVIUJ0yAgFBX6gceSvel+0diLuEjwbncqQZizInz4=; b=Ss3/6kokqfByfBR9F/jaadMkMe5shgAZZ1bX9HbzlutZoZhUFhVcWR33SOirWrKXeswXN/ 5JkdeKbam3eTJNDHhvDufZHJCxG8ujK+sJxJMH6COzi3LH1KHLAiGi0zlepvbrVcBCiyIA 6wQlF+tsVt9A/wuh306U1vYe6q56dPOktf8vb5dC8h4o4slH9QceFIj3X7FSkgASFIlCct 3Am5FLHikzQ5iu+UfKRq9BhGGesqJ2IVuO79mDRyS4FaIZ2x+pKBjUwYAoa/RPANqh7ch5 HZmFeZfoa+/up75wYAXlTzolVhHbk+yd6je4vQJpTP5YZl3itOkYqRhzW6iRwA==
X-Footer: bWVpbmJlcmcuZGU=
Received: from localhost ([127.0.0.1]) by srv-kerioconnect.py.meinberg.de with ESMTPSA (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256 bits)); Tue, 5 Jan 2021 17:33:19 +0100
To: Miroslav Lichvar <mlichvar@redhat.com>, Magnus Danielson <magnus@rubidium.se>
Cc: ntp@ietf.org, Philip Prindeville <philipp@redfish-solutions.com>
References: <20210101025440.ECE3340605C@ip-64-139-1-69.sjc.megapath.net> <155b7ae6-c668-f38f-2bbd-fd98fa4804db@rubidium.se> <16442E9F-DD22-4A43-A85D-E8CC53FEA3E5@redfish-solutions.com> <66534000-c3ba-8547-4fb1-1641689c6eba@rubidium.se> <E6F9312A-2080-4D13-9092-935080859750@redfish-solutions.com> <1086ffe6-234a-d2d4-13d6-6031c263f4cd@rubidium.se> <B4E8F8D4-95D8-4ACB-9770-FCFEBFE002A0@redfish-solutions.com> <20210105085423.GB3008666@localhost> <e4c6a262-1d9b-68ce-1bad-8e81920c9633@rubidium.se> <20210105145714.GI3008666@localhost>
From: Martin Burnicki <martin.burnicki@meinberg.de>
Organization: Meinberg Funkuhren GmbH & Co. KG, Bad Pyrmont, Germany
Message-ID: <fc8efbdb-f122-8977-bf56-d64eed81fa29@meinberg.de>
Date: Tue, 05 Jan 2021 17:33:19 +0100
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.6.0
MIME-Version: 1.0
In-Reply-To: <20210105145714.GI3008666@localhost>
Content-Type: text/plain; charset="utf-8"
Content-Language: en-US
Content-Transfer-Encoding: 8bit
Archived-At: <https://mailarchive.ietf.org/arch/msg/ntp/--aE-eskGxZGGzD784DgxoKmI3Y>
Subject: Re: [Ntp] NTPv5: big picture
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: Tue, 05 Jan 2021 16:33:58 -0000

Miroslav Lichvar wrote:
> On Tue, Jan 05, 2021 at 03:41:55PM +0100, Magnus Danielson wrote:
>> Hi,
>>
>> On 2021-01-05 09:54, Miroslav Lichvar wrote:
>>> On Mon, Jan 04, 2021 at 01:20:55PM -0700, Philip Prindeville wrote:
>>>> PTP uses TAI.  It doesn’t seem to have been an impediment for them.  What am I missing?  And how did these “good technical reasons” not apply here?
>>> PTP doesn't support TAI only. It supports TAI and an "arbitrary"
>>> timescale. TAI is used for synchronization of hardware clocks, which
>>> is the primary use case of PTP. If you wanted to synchronize a system
>>> clock with PTP, the timestamps would typically be in the arbitrary
>>> timescale (UTC).
>>
>> PTP actually support both providing a TAI and UTC replica, as it also
>> carries the TAI-UTC difference in addition to having the core time-stamp
>> format that derives from TAI.
> 
> It does provide the TAI-UTC offset, but it is optional. There is a
> flag to indicate the value is valid. PTP supports operation in
> UTC-only and TAI-only environments.
> 
>> Regardless how we turn, we can not push the leap-seconds completely off
>> the table. They need to be handled up front. If so, they can be handled
>> fairly OK, where as trying to ignore them just create a number of
>> problematic side-cases. I know what I prefer based out of my experience
>> of building timing systems.
> 
> I think the problems of NTPv4 wrt leap seconds are well understood.
> We need to announce leap seconds earlier and provide the TAI-UTC
> offset if known.

Hm, IIRC ntpd provides the leap second warning via the protocol about 24
hours in advance, *if* that information is available from some source.
Shouldn't that be enough?

Also IIRC, PTP provides a leap second warning on 12 hours in advance.

The only limitation for NTPv4 (without Autokey) is that the current TAI
offset can't be provided, which can easily be improved by an extension
field.

> We should also add support for timestamps in a
> non-leaping timescale to support the less usual case of clocks keeping
> time in TAI.

I fully agree, but as I said before, I also think it should be done by
providing UTC by default, and a correction to derive TAI from it.


Martin
-- 
Martin Burnicki

Senior Software Engineer

MEINBERG Funkuhren GmbH & Co. KG
Email: martin.burnicki@meinberg.de
Phone: +49 5281 9309-414
Linkedin: https://www.linkedin.com/in/martinburnicki/

Lange Wand 9, 31812 Bad Pyrmont, Germany
Amtsgericht Hannover 17HRA 100322
Geschäftsführer/Managing Directors: Günter Meinberg, Werner Meinberg,
Andre Hartmann, Heiko Gerstung
Websites: https://www.meinberg.de  https://www.meinbergglobal.com
Training: https://www.meinberg.academy