Re: [Ntp] Warren Kumari's Discuss on draft-ietf-ntp-interleaved-modes-05: (with DISCUSS and COMMENT)

Miroslav Lichvar <> Tue, 29 June 2021 08:36 UTC

Return-Path: <>
Received: from localhost (localhost []) by (Postfix) with ESMTP id BF3E33A2B41 for <>; Tue, 29 Jun 2021 01:36:39 -0700 (PDT)
X-Virus-Scanned: amavisd-new at
X-Spam-Flag: NO
X-Spam-Score: -2.996
X-Spam-Status: No, score=-2.996 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.198, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001] autolearn=ham autolearn_force=no
Authentication-Results: (amavisd-new); dkim=pass (1024-bit key)
Received: from ([]) by localhost ( []) (amavisd-new, port 10024) with ESMTP id Wclelwqnkzxm for <>; Tue, 29 Jun 2021 01:36:37 -0700 (PDT)
Received: from ( []) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by (Postfix) with ESMTPS id 79BC93A2B3E for <>; Tue, 29 Jun 2021 01:36:37 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;; s=mimecast20190719; t=1624955796; 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=1+obn6Yjt+3R51Kx7ghDXHSWQCy350nyQJJ+rsRHFdw=; b=gP+9CRsnQQuXBcoapC0ZgCHc3IFZkor2OJkUgeKpypBYJxlV96h1afanrNrwR48yuv+T8d N+wjvoEPKpgrlQBu5ZKd4NWLWN8hqeDfqKWP1nc6j4sNc3uDh6UXCgB99dpL2ggO/1Lj5a qP6Jxm4S6xGXV9V9+SCZfXHWm19bXhg=
Received: from ( []) (Using TLS) by with ESMTP id us-mta-318-7upqD-ZCNsu6Rvv73uxjrw-1; Tue, 29 Jun 2021 04:36:32 -0400
X-MC-Unique: 7upqD-ZCNsu6Rvv73uxjrw-1
Received: from ( []) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by (Postfix) with ESMTPS id 3830B801F97; Tue, 29 Jun 2021 08:36:31 +0000 (UTC)
Received: from localhost ( []) by (Postfix) with ESMTPS id E9A7F60843; Tue, 29 Jun 2021 08:36:29 +0000 (UTC)
Date: Tue, 29 Jun 2021 10:36:28 +0200
From: Miroslav Lichvar <>
To: Warren Kumari <>
Cc: The IESG <>,,,,
Message-ID: <YNrbjCDF4/609dg/@localhost>
References: <>
MIME-Version: 1.0
In-Reply-To: <>
X-Scanned-By: MIMEDefang 2.79 on
Authentication-Results:; auth=pass smtp.auth=CUSA124A263
X-Mimecast-Spam-Score: 0
Content-Type: text/plain; charset="us-ascii"
Content-Disposition: inline
Archived-At: <>
Subject: Re: [Ntp] Warren Kumari's Discuss on draft-ietf-ntp-interleaved-modes-05: (with DISCUSS and COMMENT)
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: Network Time Protocol <>
List-Unsubscribe: <>, <>
List-Archive: <>
List-Post: <>
List-Help: <>
List-Subscribe: <>, <>
X-List-Received-Date: Tue, 29 Jun 2021 08:36:40 -0000

Thanks for the review.

On Mon, Jun 28, 2021 at 08:21:15AM -0700, Warren Kumari via Datatracker wrote:
> So, are there in fact "multiple implementations of the document."?

There are two widely-used implementations that support some of the
interleaved modes: ntp (from and chrony. There are few other
implementations I saw, but those were rather experimental. FWIW, a
minimalistic one is included as a proof-of-concept in the repository
of the draft [1].

The first ntp version marked as stable with this feature was 4.2.6p1
released in 2010. It implements the symmetric mode and broadcast mode.
The draft has some requirements that this implementation doesn't
follow yet. This causes problems when the polling intervals of the
peers don't match, even when it is interoperating with itself. Other
than that it interoperates with chrony, even as a client, although
that doesn't seem to be officially supported.

The first chrony version was 3.0 released in 2016. It added the
client/server mode and symmetric interleaved modes. The server support
is enabled by default.

> Has there
> been interoperability testing to confirm that there are no backwards
> compatibility issues?

Yes, it has, quite extensively.

There is a large number of public NTP servers that have the server
support enabled. I have also captured and analyzed terabytes of NTP
traffic on several public servers in different regions to confirm that
it doesn't break any existing implementations.

There was only one implementation that had an issue and that was a
fork of ntp that had partially removed support for the interleaved
mode. It basically had the xleave option permanently set, but it was
no longer able to process an interleaved response, which caused the
protocol to switch between the two modes. IIRC it still synchronized,
but used only every second or third response. Obviously, this wouldn't
happen if the implementation didn't already support the interleaved
mode at some point in its history and it could still happen even if
the protocol used a different mechanism to switch between the modes.

> Much of the document feels somewhat hand-wavy regarding
> the compatibility with existing implementations, as well as in things like:
> "The client SHOULD limit the number of requests in the interleaved mode between
> server responses to prevent processing of very old timestamps in case a large
> number of consecutive requests is lost." -- SHOULD limit to what number? 1? 3?
> 17?

That is an implementation detail with no impact on interoperability.
For different implementations different values might work better
depending on how they control the clock and filter measurements etc,
so I'd rather not suggest any specific values.

> When the document says things like:
> "A peer A SHOULD send a peer B a packet in the interleaved mode only when the
> following conditions are met:" I'm assuming that this means "only when the
> **all** following conditions are met:"? If so, it needs to be explicit.

Ok, I'll fix that.

> To be clear, when the document says:
> "1.  The peer A has an active association with the peer B which was
>        specified with the option enabling the interleaved mode, OR the
>        peer A received at least one valid packet in the interleaved mode
>        from the peer B."
> If "peer A has an active association with the peer B which was **not**
> specified with the option enabling the interleaved mode" and "peer A receive[s]
> at least one valid packet in the interleaved mode from the peer B." should it
> enable interleaved mode?

Yes, it should.

> How is an operator supposed to know if they should
> enable this mode when talking to a peer?

They are expected to know whether the peer supports it. Or they can
try it and see if it works. Symmetric mode is typically used in local

> As far as I can tell, this adds a significant amount of state keeping to server
> implementations. The document does somewhat mention this ("A server which
> supports the interleaved mode needs to save pairs of local receive and transmit
> timestamps.  The server SHOULD discard old timestamps to limit the amount of
> memory needed to support clients using the interleaved mode."), but it seems
> like this is a fairly large change, and this bit of text doesn't really cover
> the state requirements.

I think that is an implementation detail. The only requirement from
the protocol point of view is that server is able to keep at least one
pair of timestamps across requests. It can keep as many of them as it
likes and it can drop them at any time for any reason. A minimal
implementation would be a fixed-size hashtable, overwriting old
timestamps with new ones as they come. No additional state is


Miroslav Lichvar