[core] Interface names (Re: [Cbor] changes in draft-ietf-cbor-network-addresses-05.txt)

Carsten Bormann <cabo@tzi.org> Sat, 24 July 2021 23:13 UTC

Return-Path: <cabo@tzi.org>
X-Original-To: core@ietfa.amsl.com
Delivered-To: core@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id CA4D43A0A19; Sat, 24 Jul 2021 16:13:10 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.897
X-Spam-Level:
X-Spam-Status: No, score=-1.897 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
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 bntofcYhPoIH; Sat, 24 Jul 2021 16:13:06 -0700 (PDT)
Received: from gabriel-smtp.zfn.uni-bremen.de (smtp.zfn.uni-bremen.de [134.102.50.15]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 1E6673A0A16; Sat, 24 Jul 2021 16:13:06 -0700 (PDT)
Received: from [192.168.217.118] (p548dcc89.dip0.t-ipconnect.de [84.141.204.137]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by gabriel-smtp.zfn.uni-bremen.de (Postfix) with ESMTPSA id 4GXMRf1JKcz2xJx; Sun, 25 Jul 2021 01:13:02 +0200 (CEST)
Content-Type: text/plain; charset="utf-8"
Mime-Version: 1.0 (Mac OS X Mail 13.4 \(3608.120.23.2.7\))
From: Carsten Bormann <cabo@tzi.org>
In-Reply-To: <CAMGpriUnfMjhk7teAN-A0j5SCK=BpyJEDC+NOCJtHzmF1BFeow@mail.gmail.com>
Date: Sun, 25 Jul 2021 01:13:01 +0200
Cc: cbor@ietf.org, 6MAN <6man@ietf.org>, core@ietf.org
X-Mao-Original-Outgoing-Id: 648861181.448921-0dec9112deba25bccb8959bcc45025f9
Content-Transfer-Encoding: quoted-printable
Message-Id: <BF4E8691-CC71-43D2-8F56-C9567B7BFDD6@tzi.org>
References: <162608928922.11086.12172415971165753394@ietfa.amsl.com> <29067.1626090045@localhost> <CAMGpriUnfMjhk7teAN-A0j5SCK=BpyJEDC+NOCJtHzmF1BFeow@mail.gmail.com>
To: Erik Kline <ek.ietf@gmail.com>
X-Mailer: Apple Mail (2.3608.120.23.2.7)
Archived-At: <https://mailarchive.ietf.org/arch/msg/core/AUwXdA6UG8ol5t6Tgavt8u1WnkE>
Subject: [core] Interface names (Re: [Cbor] changes in draft-ietf-cbor-network-addresses-05.txt)
X-BeenThere: core@ietf.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "Constrained RESTful Environments \(CoRE\) Working Group list" <core.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/core>, <mailto:core-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/core/>
List-Post: <mailto:core@ietf.org>
List-Help: <mailto:core-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/core>, <mailto:core-request@ietf.org?subject=subscribe>
X-List-Received-Date: Sat, 24 Jul 2021 23:13:11 -0000


> On 2021-07-25, at 00:42, Erik Kline <ek.ietf@gmail.com> wrote:
> 
> Michael,
> 
> Thanks for the update.
> 
> Was there any interest in figuring out a representation for link-local addresses (e.g. 169.254.x.y, fe80::zed, ff02::pqr, ...) that included either an interface name or index as part of a structured unit?  Perhaps some generic {address_info, interface_info} pairing that could be used the same way?

Interesting.  We just discussed this in the design team for draft-ietf-core-href, which is maybe the more likely case where an IP address is paired with an interface name.  This can be added, but we didn’t quite see such a strong use case.  Interface names are local, so it doesn’t make a lot of sense to carry them around between systems, which is where CBOR is mostly used these days.

> Obviously, it's possible to pair what you've described here together with extra interface information separately on an ad hoc basis.

Yes, but somehow, this question has come up often enough now that I’ll add a design to draft-ietf-core-href-06.  We can always delete that feature again later.

Grüße, Carsten


> 
> Curious,
> -ek
> 
> On Mon, Jul 12, 2021 at 4:41 AM Michael Richardson <mcr+ietf@sandelman.ca> wrote:
> 
> internet-drafts@ietf.org wrote:
>     >         Title : CBOR tags for IPv4 and IPv6 addresses and prefixes
>     > Authors : Michael Richardson Carsten Bormann
>     > draft-ietf-cbor-network-addresses-05.txt Pages : 8 Date : 2021-07-12
> 
>     > Abstract: This document describes two CBOR Tags to be used with IPv4
>     > and IPv6 addresses and prefixes.
> 
>     > The IETF datatracker status page for this draft is:
>     > https://datatracker.ietf.org/doc/draft-ietf-cbor-network-addresses/
> 
>     > There is also an HTML version available at:
>     > https://www.ietf.org/archive/id/draft-ietf-cbor-network-addresses-05.html
> 
>     > A diff from the previous version is available at:
>     > https://www.ietf.org/rfcdiff?url2=draft-ietf-cbor-network-addresses-05
> 
> The major differences since -04 is that we now have three forms:
> 
> 1) IPv4 or IPv6 address.
> 2) IPv4-prefix/len or IPv6-prefix/len
> new: 3) IPv4-addr/len or IPv6-addr/len
> 
> The difference between (2) and (3) is that (2) is just the prefix, and the
> bits to the right MUST be zero, and MAY be omitted. (A bit win for IPv6/32 or
> Ipv6/48s..).
> In the case of (3), this is more of an interface definition, like:
>    2001:db8::1234/64  the "::1234" is to the right of the /64.
>    192.0.1.4/24     ".4" is to the right of the /24, and is the interface definition.
> 
> Cases (2) and (3) are distinguished by order of data vs prefix.
> (2) is:   [64, h'20010db8']
> (3) is:   [h'20010db8_00000000_00000000_00001234', 64]
> We can do this in CBOR, because it is self-describing.
> Note that (2) is much shorter than (3), because trailing zeroes are omitted.
> (3) is always 18 or 19 bytes long. (1 byte for CBOR array prefix)
> 
> Prefix longer than 24 require two bytes to encode the integer.
> (I guess we could have made the prefixlen be length-24, and then up to /48
> would fit into a single byte integer.  We could also have made the negative
> integers represent multiples of -4 perhaps)
> 
> I don't personally have a use case today for (3), but there were not many
> objections to including it.
> 
> --
> Michael Richardson <mcr+IETF@sandelman.ca>   . o O ( IPv6 IøT consulting )
>            Sandelman Software Works Inc, Ottawa and Worldwide
> --------------------------------------------------------------------
> IETF IPv6 working group mailing list
> ipv6@ietf.org
> Administrative Requests: https://www.ietf.org/mailman/listinfo/ipv6
> --------------------------------------------------------------------
> _______________________________________________
> CBOR mailing list
> CBOR@ietf.org
> https://www.ietf.org/mailman/listinfo/cbor