Re: [Ntp] NTPv5 Loop Detection without Stratum - Why do we want this?

Miroslav Lichvar <mlichvar@redhat.com> Tue, 06 September 2022 10:43 UTC

Return-Path: <mlichvar@redhat.com>
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 70892C152577 for <ntp@ietfa.amsl.com>; Tue, 6 Sep 2022 03:43:22 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -7.678
X-Spam-Level:
X-Spam-Status: No, score=-7.678 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.571, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_HI=-5, RCVD_IN_ZEN_BLOCKED_OPENDNS=0.001, SPF_HELO_NONE=0.001, SPF_NONE=0.001, T_SCC_BODY_TEXT_LINE=-0.01] autolearn=unavailable autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (1024-bit key) header.d=redhat.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 OnYMH6-y1NvF for <ntp@ietfa.amsl.com>; Tue, 6 Sep 2022 03:43:20 -0700 (PDT)
Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 61DF7C15270B for <ntp@ietf.org>; Tue, 6 Sep 2022 03:43:20 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1662460999; 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=vRWXbPq5RSEc1dTCZA+0jcWMZEtbwA5F2T3LFE3R5/s=; b=KeH4rb9+5VEzDy9xjwPNoYqKsefVdO4HnE3W+NWv3H8hJ7PjE4pHzotxZLxHmC0YILCF6m nzoTqw2kMtagnrbyWAqrrxbP8whFQKTS98+Ub+zu+AKQjrfmovbuyiOHsWMo/OaCWE0IAS mfs/sy5XauJtc7+uFsppN+/pzYHapM4=
Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-149-L1_A-ZBlNn2AAvyk97s9mQ-1; Tue, 06 Sep 2022 06:43:09 -0400
X-MC-Unique: L1_A-ZBlNn2AAvyk97s9mQ-1
Received: from smtp.corp.redhat.com (int-mx10.intmail.prod.int.rdu2.redhat.com [10.11.54.10]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id A9C2885A58B; Tue, 6 Sep 2022 10:43:08 +0000 (UTC)
Received: from localhost (unknown [10.43.135.229]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 0AF75492C3B; Tue, 6 Sep 2022 10:43:07 +0000 (UTC)
Date: Tue, 06 Sep 2022 12:43:06 +0200
From: Miroslav Lichvar <mlichvar@redhat.com>
To: kristof.teichel=40ptb.de@dmarc.ietf.org
Cc: "ntp@ietf.org" <ntp@ietf.org>, Heiko Gerstung <heiko.gerstung=40meinberg.de@dmarc.ietf.org>
Message-ID: <YxckOm2+TD3tTPN4@localhost>
References: <DA1F1664-8A84-4197-844A-CA7E8DAA36B8@meinberg.de> <OF43150191.DABAA331-ONC12588B5.00362DC0-C12588B5.003861AF@ptb.de>
MIME-Version: 1.0
In-Reply-To: <OF43150191.DABAA331-ONC12588B5.00362DC0-C12588B5.003861AF@ptb.de>
X-Scanned-By: MIMEDefang 2.85 on 10.11.54.10
X-Mimecast-Spam-Score: 0
X-Mimecast-Originator: redhat.com
Content-Type: text/plain; charset="us-ascii"
Content-Disposition: inline
Archived-At: <https://mailarchive.ietf.org/arch/msg/ntp/EDextmovOesqpA-X2DEMIK1nTiw>
Subject: Re: [Ntp] NTPv5 Loop Detection without Stratum - Why do we want this?
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: Tue, 06 Sep 2022 10:43:22 -0000

On Tue, Sep 06, 2022 at 12:15:46PM +0200, kristof.teichel=40ptb.de@dmarc.ietf.org wrote:
> If everyone does use stratum consistently (and in particular sees to it 
> that their own stratum is higher than the max of those of its own 
> sources), then there will never be a loop.

There will be a loop, but it will terminate after several rounds due
to some server reaching the maximum stratum (currently 16), which will
not be acceptable by the client.

When the client unselects that server, its stratum will go back to
some small value, which will cause the server to decrease its stratum
and it will become selectable for the client again. The loop is back.

Stratum cannot prevent loops unless we don't allow clients to select a
server with a higher stratum (as it was in NTPv3). It can only
terminate them and it doesn't prevent them from happening again.

The Bloom filter proposed for NTPv5 should allow the network to reach
a stable state where the loops are broken in a single point.

> 1b) Wouldn't tighter requirements on stratum use make things even easier?
> I assume that everyone agrees that using higher stratum servers is never 
> beneficial for accuracy - and often detrimental.

I'd not agree with that. Stratum doesn't indicate accuracy. It depends
on the reference clocks used by primary servers and network paths between
the servers.

-- 
Miroslav Lichvar