[core] Discovery optimization for Link Format: use the unspecified IPv6 address

Esko Dijk <esko.dijk@iotconsultancy.nl> Wed, 17 September 2025 11:44 UTC

Return-Path: <esko.dijk@iotconsultancy.nl>
X-Original-To: core@mail2.ietf.org
Delivered-To: core@mail2.ietf.org
Received: from localhost (localhost [127.0.0.1]) by mail2.ietf.org (Postfix) with ESMTP id 108E56432E05; Wed, 17 Sep 2025 04:44:27 -0700 (PDT)
X-Virus-Scanned: amavisd-new at ietf.org
X-Spam-Flag: NO
X-Spam-Score: -2.097
X-Spam-Level:
X-Spam-Status: No, score=-2.097 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, HTML_MESSAGE=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001] autolearn=ham autolearn_force=no
Authentication-Results: mail2.ietf.org (amavisd-new); dkim=pass (2048-bit key) header.d=iotconsultancy.nl
Received: from mail2.ietf.org ([166.84.6.31]) by localhost (mail2.ietf.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id CP8jfX7VSTR8; Wed, 17 Sep 2025 04:44:26 -0700 (PDT)
Received: from dane.soverin.net (dane.soverin.net [185.233.34.11]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-256) server-digest SHA256) (No client certificate requested) by mail2.ietf.org (Postfix) with ESMTPS id 04BBA6432DEC; Wed, 17 Sep 2025 04:44:25 -0700 (PDT)
Received: from smtp.soverin.net (unknown [10.10.4.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519) (No client certificate requested) by dane.soverin.net (Postfix) with ESMTPS id 4cRcPN557vz1Kkg; Wed, 17 Sep 2025 11:44:24 +0000 (UTC)
Received: from smtp.soverin.net (smtp.soverin.net [10.10.4.99]) by soverin.net (Postfix) with ESMTPSA id 4cRcPN2DWcz6Q; Wed, 17 Sep 2025 11:44:24 +0000 (UTC)
Authentication-Results: smtp.soverin.net; dkim=pass (2048-bit key; unprotected) header.d=iotconsultancy.nl header.i=@iotconsultancy.nl header.a=rsa-sha256 header.s=soverin1 header.b=qxJJN5ec; dkim-atps=neutral
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=iotconsultancy.nl; s=soverin1; t=1758109464; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type; bh=zpyza4lAxum06SFDsTptqpu4Xv4kGkuCKe2aYsEtyrw=; b=qxJJN5ecnLnz/mY60iuVOLT22b7dn521hiNJY2Fi8rybErFjiczAKWXleDT7G06GsKDwDF GIpgNuZxXDbeFdTQX5sQdGbZYByo3ctIxgEMvfW8V2W2k0/cURt+PLLwaA7OSk5Pc8ZH4X wl0Ds9gHJkEppA3W0ONqHiPSbJhF4gJNBYeTg6S1mwVcKiTxjxreKqb0suydrninuIqE5D zk5E0vyUfTNHeL19fmiEqX9X8CZSvIGKswa8XYQzH257Le4aOxb++UC50Uv0uqfNqJs0No D8mAm5bFUQJAHgzjuSpmV9uSAow1kGAhEoInwkppI13b2F0+appmSbti8Nts2A==
X-CM-Envelope: MS4xfKzsqVmrbTKnH2MR5o9Hv54Ggtpr4NkMBjdmbnLd0dlm3N15hqz/cdcLORqTLpBGpO9iI33659/VLa9M1DZ6GcHyMKnH3qzCA7segvRI1ZodS9hn5epk kUktRNuFRDfE3GwxZYjaMKZx+tLnMbH3Pvob1VZLLYSM326tUfhve/FIlHEmI0ViraC/4d6T0VdaZgajG/KVVVlFqWDki/Nm14fmAomXw/KrEs7tgFXmFnP8 5b7cwbRxCLJQubuWowqGrzNMme9fWqbNzYnWOECXyGWt6Q6yMMCry2d28Mup9eiZApJNKSJa79vAgy43dKRsyv4jI+0MGozD+W+s7OgKNgs=
Content-Type: multipart/alternative; boundary="------------uaXyqcxYkkbgzdwzkRssO34u"
Message-ID: <819aad36-e05e-4404-af75-56c38fe85032@iotconsultancy.nl>
Date: Wed, 17 Sep 2025 13:44:24 +0200
MIME-Version: 1.0
Content-Language: en-US
To: core@ietf.org
From: Esko Dijk <esko.dijk@iotconsultancy.nl>
Organization: IoTconsultancy.nl
X-Spampanel-Class: ham
Message-ID-Hash: OUBBGEPULEYBGRRX3622KZIVU7N7ZLSL
X-Message-ID-Hash: OUBBGEPULEYBGRRX3622KZIVU7N7ZLSL
X-MailFrom: esko.dijk@iotconsultancy.nl
X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-core.ietf.org-0; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header
CC: anima@ietf.org
X-Mailman-Version: 3.3.9rc6
Precedence: list
Subject: [core] Discovery optimization for Link Format: use the unspecified IPv6 address
List-Id: "Constrained RESTful Environments (CoRE) Working Group list" <core.ietf.org>
Archived-At: <https://mailarchive.ietf.org/arch/msg/core/LhmQBDK40Y7L1wpADPKTeaJHZu4>
List-Archive: <https://mailarchive.ietf.org/arch/browse/core>
List-Help: <mailto:core-request@ietf.org?subject=help>
List-Owner: <mailto:core-owner@ietf.org>
List-Post: <mailto:core@ietf.org>
List-Subscribe: <mailto:core-join@ietf.org>
List-Unsubscribe: <mailto:core-leave@ietf.org>

Hi CoRE,

In the recent spirit of removing unused bytes on the wire, I have the 
below proposal for cases where CoRE Link Format is used for discovery.
cBRSKI and cBRSKI Join Proxy are example protocols that use this.

In some cases, an IPv6 address is necessarily included in a Link Format 
response even though the protocol doesn't use the included address at all.
The proposal is that for such cases the IPv6 unspecified address (::) 
can be used, which shortens the payload and reduces potential for errors.

An example discovery interaction from cBRSKI:

~~~~
   REQ: GET coap://[ff02::fd]/.well-known/core?rt=brski.jp

   RES: 2.05 Content
   <coaps://[fe80::c78:e3c4:58a0:a4ad]:8485>;rt=brski.jp
~~~~

In this link-local discovery scenario, the responding entity (a Join 
Proxy) includes its LL IPv6 address in the link even though the client 
is not going to use it.
The client will use the IPv6 LL source address of the CoAP response to 
send the next (CoAPS) packet to, on UDP port 8485. This is how the 
protocol is currently specified.
It requires the IP layer or CoAP stack to be able to provide the IP 
source address of a response to the higher layer, which is generally 
available on embedded systems.

Knowing the client MUST follow this procedure for the resource, the 
server could decide to not disclose the IPv6 address: i.e. leave it 
unspecified in scope of the Link Format document.
RFC 4291 and RFC 4861 would allow such use of the unspecified address; 
and per RFC 3986/6690 it yields a valid CoRE link.

The result is then shorter - 31 bytes for the payload instead of 53.

~~~~
   REQ: GET coap://[ff02::fd]/.well-known/core?rt=brski.jp

   RES: 2.05 Content
   <coaps://[::]:8485>;rt=brski.jp
~~~~

This also reduces the potential for ambiguity in implementations, e.g. 
the behavior that some clients may parse the IP-literal to use it to 
contact the Join Proxy while others may use the IPv6 source address of 
the CoAP message.
If most client's don't parse the IP-literal then some error in the 
IP-literal on the server side may go undetected.

Does this sound like a proper use of Link Format? It does seem to make 
sense that we can suppress information that's already encoded in the 
response CoAP UDP message, one of the core features of CoAP :)
Is there a need to formally Update RFC 6690 before starting to use this? 
(To me it seems like a useful feature also in other scenarios.)
The formal semantics of the IPv6 unspecified address within a Link 
Format document then could be "an IPv6 adress equal to the IPv6 address 
in the link format resource's base URI". And similar for IPv4 
unspecified address.

regards
Esko

-- 
*IoTconsultancy.nl* | Email/Teams: esko.dijk@iotconsultancy.nl | +31 6 
2385 8339