Re: [Cbor] changes in draft-ietf-cbor-network-addresses-05.txt

Brian E Carpenter <brian.e.carpenter@gmail.com> Sun, 01 August 2021 21:15 UTC

Return-Path: <brian.e.carpenter@gmail.com>
X-Original-To: cbor@ietfa.amsl.com
Delivered-To: cbor@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id A1C7D3A115C; Sun, 1 Aug 2021 14:15:54 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.099
X-Spam-Level:
X-Spam-Status: No, score=-2.099 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, NICE_REPLY_A=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=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 ([4.31.198.44]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id jGipucbOmL2i; Sun, 1 Aug 2021 14:15:50 -0700 (PDT)
Received: from mail-pj1-x1030.google.com (mail-pj1-x1030.google.com [IPv6:2607:f8b0:4864:20::1030]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 377FC3A1159; Sun, 1 Aug 2021 14:15:50 -0700 (PDT)
Received: by mail-pj1-x1030.google.com with SMTP id k4-20020a17090a5144b02901731c776526so28604087pjm.4; Sun, 01 Aug 2021 14:15:50 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:references:from:message-id:date:user-agent:mime-version :in-reply-to:content-language:content-transfer-encoding; bh=kAJlBPWqYP5m2ES0AI+5iBasDstS2k6iV9zNL1ehl+M=; b=D7nN/hxA6aft6+nSs3TKk2+b2z8bTRTlpzq7HMmEpXx+Z6A0PqXVIjNStUqNSsqgaU +PhlRIBP6QtTrQAFZ8OVAHmEiyaUKjEF/sMJNIyrr0k9Ujqx+Udhpd2vi+QaXWm0KBSw VV2mEk4nMp7MCCiCEn0nizjF620HBxcUqQgTlw0DYqjiOQE24Pp5Q5lkBZiyUINL5cLM UprhmnbBG/7s7teCCk/+gBNVOCWBB2ffLo7r3zMqfnQ34N5kTljaAexRy4KdRUccE97n WSZAI6Zz4gveTIZ+9p+8yyv7FY4J9aQSot8IYogkoQuIxFDFnNU2oZdn2jL6RwK9FUEK O/rg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=kAJlBPWqYP5m2ES0AI+5iBasDstS2k6iV9zNL1ehl+M=; b=gBU5Lfz56ztgxOAtYf8PZnWM4WuNAoBzOSmkJSH4KkyTdBfY99qirc8iTeTPn43i/t OeImKpCc2L+ewFfzRZcpzeKBO/J81ECxU6rAXDjb0jDuOsVi9DnoHoHAjZcEUd0LOfXB 5iOO+mk4UNuPgAF9zPFaakTIDXktkQ4HozdrqUuHFzU0Dd6Tm9asePVWZtEk8RXEfHLi 9x5mvzaXdzfPESnVgaUcVdcliP/rOSI2r4QRPxtD7dyHLv/8gDnBV62Biw6u+h6h1A8E gabN7WL5PO/ps5n5c5HZlX7wPs/fRvuTMa+5RVF97iMjTJgP2zi9CHyrKXugKc7Ulx86 6OIA==
X-Gm-Message-State: AOAM532nDivEpCPvaa7ElLxFCO8IK7AeIgu0MKYfJYrIs/4OxDPUhaHg uW9lgqmxdWuOdfgOtj7rKXjLM22z0vhKIA==
X-Google-Smtp-Source: ABdhPJxhNEICTcMfZGKtUVBAEjf4VtW+b9abi3DztddY+FtAyB3qGWOIeyJNy4UP734pXmqJm3LMYA==
X-Received: by 2002:a05:6a00:844:b029:3a9:ac0a:efe5 with SMTP id q4-20020a056a000844b02903a9ac0aefe5mr13499187pfk.48.1627852548710; Sun, 01 Aug 2021 14:15:48 -0700 (PDT)
Received: from ?IPv6:2406:e003:1188:5b01:80b2:5c79:2266:e431? ([2406:e003:1188:5b01:80b2:5c79:2266:e431]) by smtp.gmail.com with ESMTPSA id y139sm8983027pfb.107.2021.08.01.14.15.46 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 01 Aug 2021 14:15:48 -0700 (PDT)
To: tom petch <ietfc@btconnect.com>, Erik Kline <ek.ietf@gmail.com>, "cbor@ietf.org" <cbor@ietf.org>, 6MAN <6man@ietf.org>
References: <162608928922.11086.12172415971165753394@ietfa.amsl.com> <29067.1626090045@localhost> <CAMGpriUnfMjhk7teAN-A0j5SCK=BpyJEDC+NOCJtHzmF1BFeow@mail.gmail.com> <aa9884b5-fd58-60cb-fa1d-b2d76f5a09a1@gmail.com> <VI1PR07MB6256E2C9CC9565FF2F080B5DA0E89@VI1PR07MB6256.eurprd07.prod.outlook.com> <c2c7a576-e138-1364-5ed0-a2987c1c1974@gmail.com> <20210727210706.buavt5nwairrjblf@anna.jacobs.jacobs-university.de> <e889a219-26b2-2a2e-6d05-bb6c7db1f89d@gmail.com> <20210801113001.yksklfouoz6v4hvz@anna.jacobs.jacobs-university.de>
From: Brian E Carpenter <brian.e.carpenter@gmail.com>
Message-ID: <b5f1c62e-4aa4-a397-8777-b3ec0eeafccc@gmail.com>
Date: Mon, 2 Aug 2021 09:15:43 +1200
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.10.0
MIME-Version: 1.0
In-Reply-To: <20210801113001.yksklfouoz6v4hvz@anna.jacobs.jacobs-university.de>
Content-Type: text/plain; charset=utf-8
Content-Language: en-US
Content-Transfer-Encoding: quoted-printable
Archived-At: <https://mailarchive.ietf.org/arch/msg/cbor/vfh37zlqYT2Z6r34d35goQnIulM>
Subject: Re: [Cbor] changes in draft-ietf-cbor-network-addresses-05.txt
X-BeenThere: cbor@ietf.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "Concise Binary Object Representation \(CBOR\)" <cbor.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/cbor>, <mailto:cbor-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/cbor/>
List-Post: <mailto:cbor@ietf.org>
List-Help: <mailto:cbor-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/cbor>, <mailto:cbor-request@ietf.org?subject=subscribe>
X-List-Received-Date: Sun, 01 Aug 2021 21:15:55 -0000

On 01-Aug-21 23:30, Jürgen Schönwälder wrote:
> The description statements in RFC 6991 talk about a zone index, i.e.,
> they assume the zone index is numeric (which kind of follows from my
> reading of RFC 4007).
> 
> The pattern is flexible enough to accept a string as well (e.g., an
> interface name). In other words, a server may accept 'fe80::1%lo0' as
> valid input on an edit-config put it will return 'fe80::1%0' on a
> get-config since the numeric zone index is the canonical format
> (assuming the lo0 interface has the interface index 0).

This still makes me uncomfortable. The zone identifier syntax definition.
in RFC4007 is pretty vague. If an implementer chooses to ignore the
SHOULD on page 16, it seems that a valid name for interface index 7
could be "6". That's why "canonical" is a bit weak. (Neither Windows
nor Linux allow anything that silly, of course.)

To be precise, consider these statements in RFC4007 page 16:

   An implementation SHOULD support at least numerical indices that are
   non-negative decimal integers as <zone_id>.
   ...
   An implementation MAY support other kinds of non-null strings as
   <zone_id>.
   ... the format MUST be used only within a
   node and MUST NOT be sent on the wire unless every node that
   interprets the format agrees on the semantics.

Remotely, there is no way to know that on my Linux machine,
%wlp2s0 and %3 are the same thing.

   Brian
 
> 
> /js
> 
> On Wed, Jul 28, 2021 at 10:00:23AM +1200, Brian E Carpenter wrote:
>> Jürgen,
>>
>> We are not disagreeing. These are exactly the sort of use cases that also
>> motivate RFC6874 and RFC6874bis. 
>>
>> But I have a question. In the management plane, do you think that the
>> zone index (an integer) is the item of interest, or a zone identifier
>> (a string)? The description at
>> https://datatracker.ietf.org/doc/html/rfc6991#page-20
>> only says that the numerical format is "canonical".
>>
>> Regards
>>    Brian
>>
>> On 28-Jul-21 09:07, Jürgen Schönwälder wrote:
>>> On Wed, Jul 28, 2021 at 08:04:16AM +1200, Brian E Carpenter wrote:
>>>> On 26-Jul-21 23:49, tom petch wrote:
>>>>> From: ipv6 <ipv6-bounces@ietf.org> on behalf of Brian E Carpenter <brian.e.carpenter@gmail.com>
>>>>> Sent: 25 July 2021 00:44
>>>>>
>>>>> There's an "interesting" issue there, especially for IPv6, which is 
that the interface ID (or "zone index", per RFC4007) has no meaning outside the host. So it really shouldn't need to be sent on the wire in normal 
circumstances.
>>>>>
>>>>> (The conversation around RFC6874bis is slightly relevant.)
>>>>>
>>>>> <tp>
>>>>> Brian
>>>>>
>>>>> As I may have said before, the YANG Types RFC6991 provides types for IPv4 and IPv6 addresses both with a zone index.  It also provides no-zone 
>> types with a suffix 'no-zone' on the type name.  I see evidence that most 
>> authors of YANG modules do not realise that a reference to 'ip-address' per se is a reference to the format that includes the zone and so have specified that format in many if not most cases.  Thus it seems likely that many of the addresses on the wire are in the zone format, even if the zone is rarely present.  With hindsight, it might have been better to have specified 'ip-address' and 'ip-address-zone' rather than ip-address' and io-address-no-zone'.
>>>>
>>>> Makes sense. The reply I just sent to Christian Amsüss probably 
applies to YANG too. Sending a zone index to another host is rarely meaningful or useful.
>>>>
>>>
>>> YANG was designed for network management purposes and there are quite
>>> some use cases where communicating the zone index is somewhat essential:
>>>
>>> - If you want to debug a problem, you likely need to know to which
>>>   link a link-local address belongs.
>>> - If you want to generate statistics for protocols using link-local
>>>   addresses, you likely need to know to which links the link-local
>>>   addresses belongs.
>>> - If you want to configure a service to use a certain link-local
>>>   address on a certain link, you may have to include the proper zone
>>>   index.
>>> - If an IP address is used to index lists, things can fall apart if
>>>   you end up with duplicate link-local addresses on different links.
>>>
>>> Whether we should have picked different names for the types may be
>>> debatable but at the end it is the YANG module author's responsibility
>>> to pick the appropriate types.
>>>
>>> In other words, network management applications often need to be aware
>>> of zone indexes in order to do the right thing. This is different from
>>> end user applications (that usually have no topological awareness).
>>>
>>> /js
>>>
>>
>> --------------------------------------------------------------------
>> IETF IPv6 working group mailing list
>> ipv6@ietf.org
>> Administrative Requests: https://www.ietf.org/mailman/listinfo/ipv6
>> --------------------------------------------------------------------
>