Re: [babel] Iotdir telechat review of draft-ietf-babel-rtt-extension-05

Pascal Thubert <pascal.thubert@gmail.com> Mon, 19 February 2024 15:45 UTC

Return-Path: <pascal.thubert@gmail.com>
X-Original-To: babel@ietfa.amsl.com
Delivered-To: babel@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 32C5AC14F73F; Mon, 19 Feb 2024 07:45:39 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.104
X-Spam-Level:
X-Spam-Status: No, score=-2.104 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, 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, URIBL_BLOCKED=0.001, URIBL_DBL_BLOCKED_OPENDNS=0.001, URIBL_ZEN_BLOCKED_OPENDNS=0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.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 AViLf4dnnoeB; Mon, 19 Feb 2024 07:45:35 -0800 (PST)
Received: from mail-lj1-x22d.google.com (mail-lj1-x22d.google.com [IPv6:2a00:1450:4864:20::22d]) (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 28814C14F71F; Mon, 19 Feb 2024 07:45:35 -0800 (PST)
Received: by mail-lj1-x22d.google.com with SMTP id 38308e7fff4ca-2d23a22233fso13741431fa.2; Mon, 19 Feb 2024 07:45:35 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1708357533; x=1708962333; darn=ietf.org; h=in-reply-to:from:references:cc:to:content-language:subject :user-agent:mime-version:date:message-id:from:to:cc:subject:date :message-id:reply-to; bh=wi/ZbYinUIzutk7qNK1KBF4R0IpVB8DxnyGpZwAnGN0=; b=E3I+PHwAqTKcvj7uiyLSwZh7R2BQFIqFQCqAmsf2Z95FwxdPpbTYA0BLGDumR/xbKv bHh6SjqdOP8tFE6MtxmA4psWDYpWsoziheU8XARHEYEPWydbknefb2fHleozB9bRtbBs SmSEdLGcv2m8PhQrZAxGb/UrkLGurNtT+22GwOM7kqXfva+m8+FCiWxmBbT7vJFoZRDv mysJcvsdnvPqzJMNVO5TyWO+7MonIa1Ta/CqId0a2lIuUOAinbNl9/jwOkG8l66vOLm1 2O2pmPYWzGi6pjnbepA+gPBIDk/oqooIODjbTuY2w/196VJ/e9OV2sNuaY1J781IHKjc WJGA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708357533; x=1708962333; h=in-reply-to:from:references:cc:to:content-language:subject :user-agent:mime-version:date:message-id:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=wi/ZbYinUIzutk7qNK1KBF4R0IpVB8DxnyGpZwAnGN0=; b=W8A7ispP+xBGW8cLnfDjgK9DGRBsg5GieA99WfV8TJF6GXyoNgnEhRTxjHs06FB2nY J/7moeZDoSaRsF8ZQmSuqHcjKpgOVSwmF7Z1h+cWxA7KAmShH0X4G3H71i+AVhyhxPlL oVe6P1hr9B3bV2Zx9mqfibCI3LpOMAKrZ01oqBuTfgzkuLGiDaqVVH1pVIzH6e0VPic8 nxWD/UI57Tf+LYCQ0zOQx3Jw2yrDzTgR6ha4tc8Om7LMzcvNnaEhOjNBb3QGRNcOK3Ku bcKRurfgy7deAYxXkYsekWiK4zFXWJ035nLK2vqNCuhLGQtCam7bDX8h8aWeCUxAbMu3 xIcw==
X-Forwarded-Encrypted: i=1; AJvYcCUQh8jpDLel9UTzrQqI7Qp5xhqxz/M4BmFBtVn75HaNlVNsyf1hzU1dS7MM8YZPDYwq5XAXSTpysdWbuIJwatUTNrHkzC8lELDLzIBEACwWwRgi/7xt/bDL3utR6YhBiBh6B3cwXyfOGfKLaARgD5+lsEvjCd3SdzS6xLvQhGkf
X-Gm-Message-State: AOJu0Yxpy5xi/KbUFq+YK7zW8TTEh042k8f+c3Cw4NZ8IKt/BL79V0rJ Sv188JZaqJpaHKJ3ziussniEXbrgiPFKhdM9FZ9T+q3/211eq1ohv5VFp63Nlvg=
X-Google-Smtp-Source: AGHT+IFW2fRkHBQf3j3fH6zGCK1cetPlTRM1VUREhMxzFQ8LiOJEHDSSedVtOIrN92paeuEL41vFag==
X-Received: by 2002:a2e:a545:0:b0:2d2:3dd7:813d with SMTP id e5-20020a2ea545000000b002d23dd7813dmr1741564ljn.17.1708357532004; Mon, 19 Feb 2024 07:45:32 -0800 (PST)
Received: from ?IPV6:2a01:cb1d:a8:a100:3925:c96e:53be:1f9a? ([2a01:cb1d:a8:a100:3925:c96e:53be:1f9a]) by smtp.gmail.com with ESMTPSA id g19-20020a7bc4d3000000b004126101915esm5907417wmk.4.2024.02.19.07.45.31 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 19 Feb 2024 07:45:31 -0800 (PST)
Content-Type: multipart/alternative; boundary="------------CDLEBPMEw4q9QlLpGPZS5HLr"
Message-ID: <9db56097-629d-4c74-b04e-9736bd93a243@gmail.com>
Date: Mon, 19 Feb 2024 16:45:26 +0100
MIME-Version: 1.0
User-Agent: Mozilla Thunderbird
Content-Language: en-US, fr
To: Juliusz Chroboczek <jch@irif.fr>
Cc: iot-directorate@ietf.org, babel@ietf.org, draft-ietf-babel-rtt-extension.all@ietf.org, last-call@ietf.org
References: <170799159642.62925.5526311966052264089@ietfa.amsl.com> <87eddadhg6.wl-jch@irif.fr>
From: Pascal Thubert <pascal.thubert@gmail.com>
In-Reply-To: <87eddadhg6.wl-jch@irif.fr>
Archived-At: <https://mailarchive.ietf.org/arch/msg/babel/qIu5oBQ9TZaCIy-SmgsAlgY-6gY>
Subject: Re: [babel] Iotdir telechat review of draft-ietf-babel-rtt-extension-05
X-BeenThere: babel@ietf.org
X-Mailman-Version: 2.1.39
Precedence: list
List-Id: "A list for discussion of the Babel Routing Protocol." <babel.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/babel>, <mailto:babel-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/babel/>
List-Post: <mailto:babel@ietf.org>
List-Help: <mailto:babel-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/babel>, <mailto:babel-request@ietf.org?subject=subscribe>
X-List-Received-Date: Mon, 19 Feb 2024 15:45:39 -0000

Hello Juliusz

Please see below

cheers,

Pascal

Le 17/02/2024 à 20:22, Juliusz Chroboczek a écrit :
>> an applicability statement of the various possibilities would be useful
>> in the future.  Could be a paper or an RFC.  AT least it would make
>> sense to have an applicability section here.  For instance, IOT may
>> experience large and asymetric delays
> Section 1 describes the conditions in which we know the protocol to be
> applicable: cross-continent overlay networks.  At this time, we are not
> proposing this protocol for IoT-style applications, which have completely
> different time-scales than cross-continent overlay networks.
>
> We encourage people interested in IoT to borrow from our ideas, we'll take
> it as a compliment.

Right; I'm not sure the conditions are that clear though. I was looking 
for words that the latency has to be stable and measurable: limited 
jitter/latency ratio - which is not necessarily the case of IoT- and 
values order(s) of magnitude above than the timing precision.

.
>
>> Note that for the given example speed of light will certainly have
>> measurable effects. But going to Orleans and back may be hidden inside
>> e.g., wireless delays.
> Yes, Orléans is at 500µs from Paris, way below the recommended value of
> rtt-min (Section 4.2), and will therefore be classified as a local link.

Meaning that the algo is not meant to make that difference. This is  
again an interesting thing for the applicability (applies where the $ 
cost is not critical)

>
>> I'm effectively concerned with the effect of buffer bloats which could
>> create oscillations exactly like early ARPNET load-based metric.
> So are we, and that's what the whole of Section 4 is about.

I had the knee jerk reaction because the text there did not say that. 
Maybe a sentence there would solve my reader panic

> The bit that you quoted explicitly references Section 3.4.2 of RFC 8966.
> Are you suggesting that we need to repeat the contents of RFC 8966 here?
> Please clarify.

just one sentence saying what IHU is saves the novice reader going to 
the main RFC. In this case though, I expect the expected reader knows 
perfectly what IHUs are, so maybe just expanding IHU does the trick.


>> Ref IEEE 1588? there are many profiles for it; maybe this work could
>> show as one.
> I'm not sure what you're suggesting exactly.  Please clarify.

You are defining an operation that seems to inherit from 1588. This 
inheritance is typically expressed as a profile. There are things that 
come with the profile and are to be explicit to make the story complete. 
But maybe it's overkill. I leave to your discretion to look at it and 
mention it or not.

Important to indicate which time stamps are used (eg where in the stack 
is t1
>> measured). Do we measure the latency inside the sender meaning that the time
>> stamp is that of the software above, or do we measure stating at MAX enqueue,
>> or starting at PHY XMIT?
> The implementation note in Section 3.4 recommends timestamping just before
> the call to sendmsg.  I'll see if I can add some normative language to
> this effect.

please add words with reference to 3.4 and  explain that the latency 
below the API is dependent on the link load but not the system load


>> For short distance / high precision as claimed in the introduction,
> There is no such claim in the introduction.  The paragraph that confused
> you was only meant to point at potentially interesting further reasearch,
> I'll remove it.

"In this document, we specify an extension to the Babel routing protocol 
that enables*precise* measurement of the round-trip time (RTT) of a 
link, and allows its usage in metric computation. Since this causes a 
negative feedback loop, special care is needed to ensure that the 
resulting network is reasonably stable (Section 4 
<https://www.ietf.org/archive/id/draft-ietf-babel-rtt-extension-05.html#route-selection>).

"

maybe the term precise there is the trouble; also maybe the "stable" 
word should qualify the link loads and their respective latency as 
opposed to vaguely the network

>>     In principle, this algorithm is inaccurate in the presence of clock
>>     drift (i.e., when A's and B's clocks are running at different
>>     frequencies).  However, t2' - t1' is usually on the order of seconds,
>>     and significant clock drift is unlikely to happen at that time scale.
>> back to applicability of the work. I believe some expectations on the clock
>> drift vs RTT can be made for modern hardware. Nodes have an idea of which clock
>> they use and what drift they have. The draft could recommend that the clocking
>> error be 2 orders of magnitude less than the RTTs that the protocol measures,
>> else the measurement cannot be trusted.
> With the default parameters used by Babel, the time between Hello and IHU
> is 2s on average.  A cheap crystal oscillator, such as used in consumer
> electronics, has a typical drift of 10ppm (30ppm worst case), leading to an
> error of 20µs (60µs worst case).
>
> I also don't see where the "two orders of magnitude" figure comes from.
> The goal of this protocol is to disambiguate between local and distant
> routes, not to accurately determine the physical properties of links.

"two orders of magnitude" means that the error is in the percent range or below, meaning that they can be ignored for your purpose.
For the crystals I agree there's little issue, little point having the text above.
The troubling error does not come from the drift between message and response, but from the local system loads that are added to the real transfer latency, like how long an incoming message will be queued before processing, or, if 2 routes are over the same Wi-Fi adapter, how the WI-Fi MAC-PHY queues will impact differential the 2 measurements. Are both errors also below in the % range or below? Probably with RTT min.

>> Back to my earlier question of which step in the stack is relevant for
>> this measurement. Surelly any step that is dependent on the load of this
>> system (variable but independent of the link being used) as opposed to
>> the load to the transmission should be omitted.
> So if a router is loaded, we'll get an extra 1ms jitter.  This is not
> likely to impact route selection, and even if it does, it will merely
> cause the protocol to route around overloaded routers.

These are the words I was looking for. That jitter will be ignored 
because (hysteresis, RTT min, smoothing,  etc...)


>>     Second, using the RTT signal for route selection gives rise to a
>>     negative feedback loop: when a route has a low RTT, it is deemed to
>>     be more desirable, which causes it to be used for more data traffic,
>>     which may lead to congestion, which in turn increases the RTT.
>>     Without some form of hysteresis, using RTT for route selection would
>>     lead to oscillations between parallel routes, which might lead to
>>     packet reordering and negatively affect upper-layer protocols (such
>>     as TCP).
>>
>> I believe this discussion should be seen earlier in the text, eg in the
>> introduction (not the solution but at least that the issue exists and is
>> addressed in the protocol). See my early comment on ARPANET.
> I most respectfully disagree.  This document is structured in two parts,
> a first part that defines a subprotocol that produces a continuous stream
> of RTT samples, and a second part that describes an algorithm to extract
> from that stream information that is useful for route selection.

OK with the subprotocol thing.  My ask is really that the reader knows 
early that you handle the oscillations and reasonable jitter (latency 
variations).



>> 4.3.  Hysteresis
>>
>>     Even after applying a bounded mapping from smoothed RTT to a cost
>>     value, the cost may fluctuate when a link's RTT is between rtt-min
>>     and rtt-max.  This is effectively mitigated by using a robust
>>     hysteresis algorithm, such as the one described in Appendix A.3 of
>>     [RFC8966].
>>
>> if this is what solves the oscillation issue please mention it,
> No, it's more complex than that.  There are three disctinct mechanisms
> that collaborate to avoid oscilliations.  The smoothing in Section 4.1
> avoids oscillations due to outliers.  The non-linear mapping from RTT to
> cost described in Section 4.2 avoids oscillations for good links (below
> rtt-min) and for bad links (above rtt-max).  Hysteresis is a last-resort
> mechanism that mitigates the issue for links between rtt-min and rtt-max.
>
> I've just re-read Section 4, and I think it's clear enough.  Please let me
> know if you have suggestions to make it better.


Do not change section 4 for me, but maybe the text above is exactly the 
fwd ref I'm looking for early in the text


>> Maybe discuss the consequences of a MIM that modifies the values eg to
>> discourage Paris to Paris and cause routing via Tokyo?
> If you're not using cryptographic signatures, then a MITM has easier ways
> to redirect traffic.  See Section 6 of RFC 8966.

Great, please add that to the security section.

Many thanks!

Pascal


>
> -- Juliusz