Re: [netmod] Changes to IPv6 zone definition in draft-ietf-netmod-rfc6991-bis-15

Brian E Carpenter <brian.e.carpenter@gmail.com> Fri, 24 March 2023 19:31 UTC

Return-Path: <brian.e.carpenter@gmail.com>
X-Original-To: netmod@ietfa.amsl.com
Delivered-To: netmod@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 7CD84C15153F; Fri, 24 Mar 2023 12:31:38 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -6.995
X-Spam-Level:
X-Spam-Status: No, score=-6.995 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, HTTP_ESCAPED_HOST=0.1, HTTP_EXCESSIVE_ESCAPES=0.001, NICE_REPLY_A=-0.001, RCVD_IN_DNSWL_HI=-5, RCVD_IN_ZEN_BLOCKED_OPENDNS=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, 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 9k7Li6w5LUqB; Fri, 24 Mar 2023 12:31:34 -0700 (PDT)
Received: from mail-pl1-x633.google.com (mail-pl1-x633.google.com [IPv6:2607:f8b0:4864:20::633]) (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 67715C14F73F; Fri, 24 Mar 2023 12:31:34 -0700 (PDT)
Received: by mail-pl1-x633.google.com with SMTP id le6so2750181plb.12; Fri, 24 Mar 2023 12:31:34 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1679686294; h=content-transfer-encoding:in-reply-to:from:references:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=GKANtauFn6DtG+fOU388Umh0PUibDf5tURQMLsj+e0w=; b=FVmOIsVBC9KtkZcTrvP58al6/Om1M4U3jfdyQxFo4sAApOC+aTiJXO+oObac1zHQPB OZxc2SOgFYCgcRY6NzN8LkI0KbO0p41J0bus0DvSGEJDBRBg8Z91Alq+GZusGnLJO/2o ucrXyxyXQ+Pf6QWwneBn0vcFtm4cIa3AKdIdOp1jWNFYaQ2F/Cc9JEsToMircHIhl/eZ 3g6McTJK2mqrZvjdjbJ3P8Y1zVt1CTThN6hhmEw/vUmhodplMeH05zXmspVbILmGwIqX 4hCZZKk0NhTgAXIMJLqT1lAIH6rSDXfnmsCgFouei3gP9miHSf4enaUt2GhxOr4lkUOT U2Rg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1679686294; h=content-transfer-encoding:in-reply-to:from:references: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=GKANtauFn6DtG+fOU388Umh0PUibDf5tURQMLsj+e0w=; b=TI03aI7TaLeVYsjWZWk/KBwl/7LtavgR3ZTWzsGWOlSAkOisjAmZ5xS5ws6NiuMqLx PBwd4UuLVwFJ2Yq8b3syQDFBYbGrpKn3mtBryr+EV7Q254xAw1C/4FadsliXaFnakhVk 1oRwOpGVXwwcphoq8sTjOSmKvrRUnVfu2KkyZQeTjyQgCpHT3RDMfSjVSfDu1/H69LJw NtuqIjeCO7fLYRybmDgbc+cG6MTQnFOipplsRfsE1C30s+mXalg35A8c27lHjGFl4039 Tt08nYV9XPuvokuANhB7m23iRJm0FKn4wdBAvytyDiET5zo8GzaVaa6W3Nh2lPzC+nF/ V+vA==
X-Gm-Message-State: AAQBX9cfcyzNOoCJhj/rSqYTrMgcIqj2Aty1+QFYcNWqAv+qXP2MQZgd sv/INYhjBnCu0a7b+f0OP+Y=
X-Google-Smtp-Source: AKy350YpPDoJK+POW5WxpL95slM9BytUmQ3NwWOrcN+AxUoK8k0ePYLh9i0gU8fxl7GspmdjF9vl8g==
X-Received: by 2002:a17:902:e74c:b0:1a1:b11d:6af5 with SMTP id p12-20020a170902e74c00b001a1b11d6af5mr4607120plf.52.1679686293559; Fri, 24 Mar 2023 12:31:33 -0700 (PDT)
Received: from ?IPV6:2406:e003:1044:3e01:be79:8734:e850:d333? ([2406:e003:1044:3e01:be79:8734:e850:d333]) by smtp.gmail.com with ESMTPSA id a7-20020a170902ecc700b0019c93ee6902sm14554220plh.109.2023.03.24.12.31.30 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 24 Mar 2023 12:31:32 -0700 (PDT)
Message-ID: <42574e30-a95a-8a79-611c-b9db03f6e98d@gmail.com>
Date: Sat, 25 Mar 2023 08:31:28 +1300
MIME-Version: 1.0
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.10.0
Content-Language: en-US
To: "Rob Wilton (rwilton)" <rwilton@cisco.com>, "netmod@ietf.org" <netmod@ietf.org>, "draft-ietf-netmod-rfc6991-bis.all@ietf.org" <draft-ietf-netmod-rfc6991-bis.all@ietf.org>, "draft-ietf-6man-rfc6874bis.all@ietf.org" <draft-ietf-6man-rfc6874bis.all@ietf.org>
References: <BY5PR11MB41966FD2ECEFB84708C5A325B5869@BY5PR11MB4196.namprd11.prod.outlook.com> <20230324132956.pzv3c6dp66ugulxh@anna>
From: Brian E Carpenter <brian.e.carpenter@gmail.com>
In-Reply-To: <20230324132956.pzv3c6dp66ugulxh@anna>
Content-Type: text/plain; charset="UTF-8"; format="flowed"
Content-Transfer-Encoding: base64
Archived-At: <https://mailarchive.ietf.org/arch/msg/netmod/CVdaagaq3rui1bctMWFlxg0kiQY>
Subject: Re: [netmod] Changes to IPv6 zone definition in draft-ietf-netmod-rfc6991-bis-15
X-BeenThere: netmod@ietf.org
X-Mailman-Version: 2.1.39
Precedence: list
List-Id: NETMOD WG list <netmod.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/netmod>, <mailto:netmod-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/netmod/>
List-Post: <mailto:netmod@ietf.org>
List-Help: <mailto:netmod-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/netmod>, <mailto:netmod-request@ietf.org?subject=subscribe>
X-List-Received-Date: Fri, 24 Mar 2023 19:31:38 -0000

On 25-Mar-23 02:29, Jürgen Schönwälder wrote:
> Rob,
> 
> using '"(%.+)"' in the IP address types may be the most liberal answer
> and in line with the interface YANG module. Applications using
> draft-ietf-6man-rfc6874bis will have to resort to %-encodings to deal
> with forward slashes and the like, which likely is OK in the web
> context.

But they can't, under the ABNF proposed by rfc6874bis. It isn't obvious
to me that percent-encoding is "legal" anywhere in the host part of a URI
(although https://w%57w.ietf.org does appear to work, which demonstrates
both percent-encoding and case-folding). Current practice for "%" inside
an IPv6 literal varies between browsers.

> I do not think we can make the assumption that interface names are
> case insensitive. On Linux, it seems very well possible to have
> interfaces that only differ in case. But this would be more an issue
> for draft-ietf-6man-rfc6874bis and not for YANG data models.

Agreed. But the case-insensitivity of the host part of a URI is
100% clear. So even if Linux allows this, it's never going to work
in the URI context (and the draft already makes that clear).

> 
> I do not think that defining a new zone name type and then to have
> mappings to this new type makes sense. Existing implementations and
> APIs use interface names. Deploying a new indirection may take
> forever.

Agreed. That's why the draft says what it now says, as a practical
matter. Jürgen, have you checked this paragraph?
https://www.cs.auckland.ac.nz/~brian/draft-ietf-6man-rfc6874bis-06X.html#section-1-5
  
> Concerning your second question, I believe that changing the canonical
> format of typedef is a backwards incompatible change and hence I kept
> the numeric version. At the end, both, the zone name and the zone
> number have only local significance. The main difference may be that
> the name may be more stable than the number across device reboots.  If
> I would start from scratch, I would prefer to use the name for this
> reason.

I'm not sure why the name is intrinsically more stable than the number;
in Linux (today) the name will change if the MAC address changes when
a card is replaced, for example.

Regards
    Brian

> 
> /js
> 
> PS: The update of the zone pattern is enlarging the zone value space
>      and hence I consider this a backwards compatible change according
>      to the YANG update rules.
> 
> On Wed, Mar 22, 2023 at 01:32:44PM +0000, Rob Wilton (rwilton) wrote:
>> Hi Jürgen, Netmod, & rfc6874bis interested parties,
>>
>> In my AD review of draft-ietf-netmod-rfc6991-bis-15, Jurgen has proposed a change to definition of the zone-id in the ip-address, ipv4-address, and ipv6-address types.  These changes move the definition somewhat closer to what is in rfc6874bis, but they are still different enough that we don't have wide compatibility.
>>
>> I think that it may be useful to have a discussion to see if we can find a technical solution that works both for YANG models and that is compatible with being used in URIs.  Hence, I've separated my AD review comments for these two specific issues into this separate thread to try and ensure that interested parties can be involved in the discussion:
>>
>> (2) In RFC 6991:
>>       typedef ipv6-address {
>>         type string {
>>           pattern '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}'
>>                 + '((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|'
>>                 + '(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\.){3}'
>>                 + '(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))'
>>                 + '(%[\p{N}\p{L}]+)?';
>>
>> In draft-ietf-netmod-rfc6991-bis-15, p 27, sec 4.  Internet Protocol Suite Types
>>       typedef ipv6-address {
>>         type string {
>>           pattern '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}'
>>                 + '((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|'
>>                 + '(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\.){3}'
>>                 + '(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))'
>>                 + '(%[A-Za-z0-9][A-Za-z0-9\-\._~/]*)?';
>>
>> I'm not saying that this change is wrong, but this technically looks to be a non-backwards-compatible change (depending on whether interface names could ever use non-ASCII characters).  Where is the set of allowed characters for zone-ids defined?  I couldn't find them in an RFC, RFC 4007 section 11.2 seems to indicate that there is no restriction.  draft-ietf-6man-rfc6874bis, which I'm currently holding a 'discuss' ballot position on, effectively limits the usable character set of zone-ids to the unreserved set in URIs, which seems to match those above except for '/' that is allowed above (and used in many interface names), but not in the URI's unreserved character set.  A further difference is that upper case characters are allowed in this typedef but are not allowed when used in the host part of URIs.
>>
>> Update - I've now seen the thread 'ipv6-address in RFC 6991 (and bis)', and Jürgen has put together a useful blog post, thanks!
>>
>> Given that "interface-name" in RFC 8343, and the text in RFC 4007 section 11.2, then arguably the safest thing here would be to allow the zone-id to be unrestricted, i.e., "(%.*)?"  However, this would leave draft-ietf-6man-rfc6874bis as only being able to support a small fraction of interface names as zone-ids in URLs.  The authors of draft-ietf-6man-rfc6874bis seem to indicate that it works for all interface names that currently matter for their use case.
>>
>> An alternative solution could be to somewhere define the zone-ids in YANG to match the restrictive set in draft-ietf-6man-rfc6874bis (i.e., lower case only, and disallow '/').  I think that this would then require that we recommend a conversion of interface names into draft-ietf-6man-rfc6874bis compatible zone-ids interface-names.  E.g., such a conversion could take the interface name, and change any uppercase characters to lower case, and replace any symbol that isn't in the allowed character set with '_'.  This conversion is effectively one way, and there is a theoretical risk that the converted interface names could collide, but this may be unlikely in practice.  Obviously, this conversation doesn't handle non-ASCII interface names, but I'm not sure how realistic it is that they would be used anyway.
>>
>> This general comment also applies for the same change for 'ipv4-address'.
>>
>>
>> (3) draft-ietf-netmod-rfc6991-bis-15, p 28, sec 4.  Internet Protocol Suite Types
>>
>>           The canonical format of IPv6 addresses uses the textual
>>           representation defined in Section 4 of RFC 5952.  The
>>           canonical format for the zone index is the numerical
>>           format as described in Section 11.2 of RFC 4007.";
>>
>> Would it make sense to also change the canonical format for the zone index to be interface name (or converted interface name) rather than numeric id (when used in YANG models)?
>>
>> This comment also applies for the same change for 'ipv4-address'.
>>
>>
>> Thoughts and comments on these two issues are welcome.
>>
>> Regards,
>> Rob
>