[Ntp] Smearing

Hal Murray <halmurray+ietf@sonic.net> Fri, 15 October 2021 21:02 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 064A73A0BF4 for <ntp@ietfa.amsl.com>; Fri, 15 Oct 2021 14:02:59 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.799
X-Spam-Level:
X-Spam-Status: No, score=-1.799 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, HDRS_LCASE=0.1, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_NONE=0.001] autolearn=no 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 j1v1hLZGj8q1 for <ntp@ietfa.amsl.com>; Fri, 15 Oct 2021 14:02:57 -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 C502E3A0C2B for <ntp@ietf.org>; Fri, 15 Oct 2021 14:02:51 -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 19FL2oD8000344 (version=TLSv1.2 cipher=DHE-RSA-AES128-GCM-SHA256 bits=128 verify=NOT); Fri, 15 Oct 2021 14:02:50 -0700
Received: from hgm (localhost [IPv6:::1]) by 107-137-68-211.lightspeed.sntcca.sbcglobal.net (Postfix) with ESMTP id 6330328C0F3; Fri, 15 Oct 2021 14:02:50 -0700 (PDT)
X-Mailer: exmh version 2.9.0 11/07/2018 with nmh-1.7.1
To: NTP WG <ntp@ietf.org>
cc: Hal Murray <halmurray+ietf@sonic.net>
From: Hal Murray <halmurray+ietf@sonic.net>
Mime-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Date: Fri, 15 Oct 2021 14:02:50 -0700
Message-Id: <20211015210250.6330328C0F3@107-137-68-211.lightspeed.sntcca.sbcglobal.net>
X-Sonic-CAuth: UmFuZG9tSVYuYzelIBXQEG37T9Kctsi6XKM50oomzUttO+Rw7eCL6pTDm0UIprmB9iWGM5ZIABJprDROp0xVFZ+d9JvT/sZB5fN/JXpVoGA=
X-Sonic-ID: C;Vh7OQfst7BGT+yx66Nu5DA== M;2IT+Qfst7BGT+yx66Nu5DA==
X-Sonic-Spam-Details: -1.5/5.0 by cerberusd
Archived-At: <https://mailarchive.ietf.org/arch/msg/ntp/IfLLWL26vDEY9govJ4grTN8_vdE>
Subject: [Ntp] Smearing
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: Fri, 15 Oct 2021 21:03:05 -0000

> 2. Introduce some means to communicate the existence of smearing, and
> either standardising the smearing cadence or have some way of signalling
> it. Clients may be able to mix same-cadence smearing servers but cannot mix
> between smearing and non-smearing. This only legitimises the status quo
> bodge and makes it explicit. 

The problem with smearing is that the whole idea is to hide it from the 
client.  Currently, there is no way for a user program to figure out if the 
system it is running on is smearing or not.  That includes ntpd.

I think the protocol should use TAI and make available the leap info.

That means an NTP client will need to know if it should smear.

Plan A is to put that info in a flag in /etc/smear or such so that other 
programs can also use it, perhaps to unsmear or perhaps just to print a 
warning message when log files do/don't smear.

Plan B would be to put that info into the kernel.  There are spare slots in 
struct timex and struct ntptimeval.  Then a flag in ntp.conf could tell ntpd 
to smear and it could pass that to the kernel.

--------

Does a smearing client need to know anything more from a server than the 
current TAI offset and the time of the next leap?

The next leap info is big enough that I don't want it in the basic packet format.  If we put it in an extension, dumb programs will ask for it every time.  Do we want to support that?  Or perhaps, do we want to actively discourage that?

How about a new mode for inquiring about things that only change infrequently?  Is there anything besides leap info that the server might want to distribute?

--------

That brings up another issue that I haven't seen documented.  (Maybe I just forgot.)

NTPv4 has version and mode fields.  When decoding a packet, which one do I look at first?

If we look at the version field first, then we can redefine the mode field.  Or move it.


-- 
These are my opinions.  I hate spam.