Re: [Ntp] [EXT] Re: I‑D Action: draft‑ietf‑ntp‑ntpv5‑requirements‑00.txt

David Venhoek <david@venhoek.nl> Mon, 15 August 2022 11:55 UTC

Return-Path: <david@venhoek.nl>
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 EDEBAC1522D6 for <ntp@ietfa.amsl.com>; Mon, 15 Aug 2022 04:55:53 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.909
X-Spam-Level:
X-Spam-Status: No, score=-1.909 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_ZEN_BLOCKED_OPENDNS=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=venhoek-nl.20210112.gappssmtp.com
Received: from mail.ietf.org ([50.223.129.194]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id OA938s6wuGIU for <ntp@ietfa.amsl.com>; Mon, 15 Aug 2022 04:55:49 -0700 (PDT)
Received: from mail-yw1-x1129.google.com (mail-yw1-x1129.google.com [IPv6:2607:f8b0:4864:20::1129]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 6EE8FC1522C4 for <ntp@ietf.org>; Mon, 15 Aug 2022 04:55:48 -0700 (PDT)
Received: by mail-yw1-x1129.google.com with SMTP id 00721157ae682-32a17d3bba2so65826247b3.9 for <ntp@ietf.org>; Mon, 15 Aug 2022 04:55:48 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=venhoek-nl.20210112.gappssmtp.com; s=20210112; h=to:subject:message-id:date:from:in-reply-to:references:mime-version :from:to:cc; bh=wijdsNCFCVYoBzjlNf6kV2v1bFV5kCecRnlHmM+QMPc=; b=uX0sqiIDER9nVvwqSy1l+6/tmGLILXW4J1rcdt0e7rbb92Ytvvb3TF1fN82UZFbq6U u9GMYolefP15Kt7s/Z5odpMP6l191g09nQoxR0aFgAWLpyhTJUpgmE0d/AnLrdwsMeC5 W0/8jqk1Y6Z5zG5k2AUN6eJCZBjxW+2iiq/R8LQKP3Nm0B/LZHK8kMtAwaqhOQx1kUUB BjRh8roZgRQKtz6KofMqo8aZSnwROLOIeBAyh1oCH0jsfjt9MQxJfgabcEKYMosKbFYH CLqC/lFv3GMxkL7rQPpxVrJQSjmCKKhIR7tEZz7BTj4U7XMhoav7zJyDrxcwwXHerybD yA7g==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=to:subject:message-id:date:from:in-reply-to:references:mime-version :x-gm-message-state:from:to:cc; bh=wijdsNCFCVYoBzjlNf6kV2v1bFV5kCecRnlHmM+QMPc=; b=5qArCO6RssnY222brMSMW/oS2nENxciS1KsQ3NtSFMbukZc7jUqyDakqLx7s11ygOr BprALwY7A8/IvQu382KlMmHwgBq69YI69Lf3nSXT9uBEV9fwV9kYJ5SG+Z+YNWGJe/Rs Kf+pj13L0NJ8E5IBvBpAT/nLAinB9zOmR7f2BAeb8vR2EjKfd+QwbplR0I7kIG62++28 oUMrCBJO8VM1RGJdVyyhPgUNTSF3hhxuvoqkYZL26HQztawwgpSB1Y03SubYqqr4LL6V qXWEk4DptxSesXOFP/XaNaCc4hYRnYRyUQTELp7aylN1wXEyzqY3k70HxOVASwQvRFE8 ARoA==
X-Gm-Message-State: ACgBeo3nMAC4PXc2/eTJ4eCRlebHEQVjyA4a7rUkb8uF5RoL9l+qmer+ zuOSBTpUEkQnNB09+DLXN80Jvwg4pquOG1+fQVGu/GjfjvT2Mg==
X-Google-Smtp-Source: AA6agR75KCaz91lCePvD3xJl6NXphLN/8q5UGr5w2nD4UPLkOGUjVaz8oXKk1Du0gVVh7adEwHjDxbcUNX+aWgFpDlI=
X-Received: by 2002:a25:220b:0:b0:683:c:f5f with SMTP id i11-20020a25220b000000b00683000c0f5fmr10542594ybi.353.1660564547661; Mon, 15 Aug 2022 04:55:47 -0700 (PDT)
MIME-Version: 1.0
References: <165876285947.22203.11524063568909924568@ietfa.amsl.com> <CAPz_-SXK3aGA+dTLy5AtZzYfHykVKf9K4EVnwF2jMkebvkKUYg@mail.gmail.com> <CB90EBD2-18E2-4379-AC14-F006553A7D2A@gmail.com> <d7dd38af-3787-5e42-9f84-2d674a8c2d71@pdmconsulting.net> <62E796DC020000A10004BFCD@gwsmtp.uni-regensburg.de> <CAPz_-SX8iE0aaS8vyQF1oH4mcZ5K3OqT5kmjnWUd-CeB=SjGEA@mail.gmail.com> <YvolISerM8tJqbhD@localhost>
In-Reply-To: <YvolISerM8tJqbhD@localhost>
From: David Venhoek <david@venhoek.nl>
Date: Mon, 15 Aug 2022 13:55:36 +0200
Message-ID: <CAPz_-SWFiz3BYN4WLjbG29vQ88Y1L6jNcwQHQKv7e4vUjy0zBQ@mail.gmail.com>
To: ntp@ietf.org
Content-Type: text/plain; charset="UTF-8"
Archived-At: <https://mailarchive.ietf.org/arch/msg/ntp/kLEU4xO17BGP2T-ZnmMTjmfTcD0>
Subject: Re: [Ntp] [EXT] Re: I‑D Action: draft‑ietf‑ntp‑ntpv5‑requirements‑00.txt
X-BeenThere: ntp@ietf.org
X-Mailman-Version: 2.1.39
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: Mon, 15 Aug 2022 11:55:54 -0000

On Mon, Aug 15, 2022 at 12:52 PM Miroslav Lichvar <mlichvar@redhat.com> wrote:
>
> On Fri, Aug 12, 2022 at 04:26:37PM +0200, David Venhoek wrote:
> > 2. Loop detection
> > Thinking about it, I think refids are unnecessary for loop detection,
> > and although they do accelerate rejection of some connections faster,
> > I think we can do with just the stratum mechanism for loop rejection.
>
> If clients are allowed to synchronize to servers with equal or higher
> stratum (like in NTPv4), stratum alone cannot prevent a loop from
> forming. It can only stop one that already formed.

That is true, but refids only stops loops in very specific cases,
namely when two servers point to each other directly. Any other
configuration with a loop still needs to rely on stratum to eliminate
the loop. Furthermore, something like a refid for indicating source of
time only really works when there is a clear single source, which even
in ntpv4 seems unlikely when following guidance in the spec.
(everything seems aimed at averaging from multiple remotes) That
combined with the potential trouble around getting a good value for
this field seems to me a reason to at least look critically at if we
really need it (and not paint ourselves into a corner by explicitly
requiring it in the requirements document).

> > In general though, I think it would be worthwhile to reconsider the
> > way we require stratum to be calculated, especially in light of
> > clients potentially using an average of more than 1 server as their
> > reference. In such cases, I think rather than the current mechanism
> > (appoint 1 as "the" upstream and add 1 to its stratum) we should at
> > least consider specifying that the nodes stratum should be at least 1
> > higher than the largest stratum of a server which it "used" (in the
> > sense that it directly influenced steering, rather than just
> > truth-finding) in synchronization.
>
> That would help with detection of loops that formed through the other
> selected sources, but would the network be able to reach a stable
> stable? I suspect without refids it would be switching back and forth.

There seem to be two things implied here, so I'll respond to both
those concerns separately:

First, let us consider more aggressive incrementing of the stratum on
its own. I intuitively don't think this will cause stability problems
that wouldn't be present with just choosing 1 primary upstream and
presenting its stratum+1 as our stratum, but I have to admit I don't
have a proof for this. Furthermore, even if I would be wrong on this,
you might then end up with servers that for a significant fraction of
their input depend on loops, which may not be better.

Second, you are right that in very specific circumstances two servers
pointing at each other can start oscillating without refids. As an
example, consider two servers A and B where A always wants to use B as
a remote based purely on the time quality, but B only wants to use A
when it is using B as its input. In that case, if the stratum cutoff
is just right, their stratum values will climb until A rejects B on
stratum, after which B drops A as input and reduces his stratum, A
picks up B again and the process starts all over. However, this is not
unique to cycles of just two servers (a similar situation can exist in
a cycle of length 3), and it requires some strange decision making on
the part of server B in that server A is improved by server B to the
point that it makes server B think it is now good as a source of
synchronization, even though that improvement was derived from a less
precise version of B's current idea of time, but I may be wrong in
writing that off as unrealistic.

Kind regards,
David Venhoek