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

Danny Mayer <mayer@pdmconsulting.net> Tue, 06 September 2022 23:29 UTC

Return-Path: <mayer@pdmconsulting.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 2242BC1522CF for <ntp@ietfa.amsl.com>; Tue, 6 Sep 2022 16:29:28 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -6.108
X-Spam-Level:
X-Spam-Status: No, score=-6.108 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, NICE_REPLY_A=-0.001, RCVD_IN_DNSWL_HI=-5, RCVD_IN_ZEN_BLOCKED_OPENDNS=0.001, RDNS_NONE=0.793, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01, T_SPF_HELO_PERMERROR=0.01] autolearn=unavailable autolearn_force=no
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 QsxhBG_2Codk for <ntp@ietfa.amsl.com>; Tue, 6 Sep 2022 16:29:22 -0700 (PDT)
Received: from chessie.everett.org (unknown [IPv6:2001:470:1:205::234]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 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 A8C21C14CE33 for <ntp@ietf.org>; Tue, 6 Sep 2022 16:29:21 -0700 (PDT)
Received: from [192.168.1.156] (pool-108-26-202-2.bstnma.fios.verizon.net [108.26.202.2]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by chessie.everett.org (Postfix) with ESMTPSA id 4MMhRh0rHDzMQ2S; Tue, 6 Sep 2022 23:29:20 +0000 (UTC)
Message-ID: <7d7f0656-2fd2-b781-4913-526a4be8cb62@pdmconsulting.net>
Date: Tue, 06 Sep 2022 19:29:18 -0400
MIME-Version: 1.0
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:91.0) Gecko/20100101 Thunderbird/91.13.0
Content-Language: en-US
To: Miroslav Lichvar <mlichvar@redhat.com>, kristof.teichel=40ptb.de@dmarc.ietf.org
Cc: "ntp@ietf.org" <ntp@ietf.org>, Heiko Gerstung <heiko.gerstung=40meinberg.de@dmarc.ietf.org>
References: <DA1F1664-8A84-4197-844A-CA7E8DAA36B8@meinberg.de> <OF43150191.DABAA331-ONC12588B5.00362DC0-C12588B5.003861AF@ptb.de> <YxckOm2+TD3tTPN4@localhost>
From: Danny Mayer <mayer@pdmconsulting.net>
In-Reply-To: <YxckOm2+TD3tTPN4@localhost>
Content-Type: text/plain; charset="UTF-8"; format="flowed"
Content-Transfer-Encoding: 7bit
Archived-At: <https://mailarchive.ietf.org/arch/msg/ntp/8T4IPou9UBy85bVly5pu1QYmRSc>
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 23:29:28 -0000

On 9/6/22 6:43 AM, Miroslav Lichvar wrote:
> 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.
You won't get that far. The server tries to select the best quality 
source of timestamps and uses that until another better quality source 
becomes preferred.
> 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.
That's a bad idea. Symmetric peers may be at the same stratum and that's 
okay especially if you get to orphan state.
> 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.

I'm not sure what the stratum-1 servers have to do with this. The 
network is far more important when choosing a preferred source.

Danny

>