<?xml version="1.0" encoding="UTF-8"?>

<!DOCTYPE rfc [
 <!ENTITY nbsp    "&#160;">
 <!ENTITY zwsp   "&#8203;">
 <!ENTITY nbhy   "&#8209;">
 <!ENTITY wj     "&#8288;">
]> 

<rfc xmlns:xi="http://www.w3.org/2001/XInclude" category="std" docName="draft-ietf-6man-zone-ui-10" number="9844" consensus="true" ipr="trust200902" obsoletes="6874" updates="4007, 7622, 8089" submissionType="IETF" xml:lang="en" tocInclude="true" symRefs="true" sortRefs="true" version="3">

  <front>
    <title abbrev="IPv6 Zone IDs in UIs">Entering IPv6 Zone Identifiers in User Interfaces</title>
    <seriesInfo name="RFC" value="9844"/>
    <author initials="B." surname="Carpenter" fullname="Brian Carpenter">
      <organization abbrev="Univ. of Auckland"/>
      <address>
        <postal>
          <street>School of Computer Science</street>
          <street>University of Auckland</street>
          <street>PB 92019</street>
          <city>Auckland 1142</city>
          <country>New Zealand</country>
        </postal>
        <email>brian.e.carpenter@gmail.com</email>
      </address>
    </author>
    
    <author fullname="Robert M. Hinden" initials="R" surname="Hinden">
      <organization>Check Point Software</organization>
      <address>
        <postal>
          <street>959 Skyway Road</street>
          <city>San Carlos</city><region>CA</region><code>94070</code>
          <country>United States of America</country>
        </postal>
        <email>bob.hinden@gmail.com</email>
      </address>
    </author>
    <date month="August" year="2025"/>
  
    <area>INT</area>
    <workgroup>6man</workgroup>

    <abstract>
      <t>This document describes how the zone identifier of an IPv6 scoped address, defined
in the IPv6 Scoped Address Architecture specification (RFC 4007), should be
entered into a user interface. This document obsoletes RFC 6874 and updates RFCs 4007, 7622, and 8089.</t>
    </abstract>

  </front>
  <middle>
    <section anchor="intro" numbered="true">
    <name>Introduction</name>
    <t>A number of software tools require or permit the user to
      enter an IPv6 address via a user interface (UI). The standard
      literal text format for an IPv6 address is defined by <xref target="RFC4291"/>
      and <xref target="RFC5952"/>.
      The IPv6 Scoped Address Architecture specification <xref target="RFC4007"/>
      extends the text representation of limited-scope IPv6 addresses,
      in particular link-local unicast addresses and multicast addresses with
      less than global scope, such that a zone identifier
      may be concatenated to an address. Note that <xref target="RFC5952"/> does not mention this extension.</t>
      
    <t>Zone identifiers are especially
      useful in contexts in which literal addresses are typically used,
      for example, during fault diagnosis or device configuration
      (where a device may be physical or virtual)
      when it may be essential to
      specify which interface is used for sending to a link-local address. 
      It should be noted that zone identifiers have purely local meaning
      within the node in which they are defined, usually being the same as
      IPv6 interface names. They are completely meaningless
      for any other node. At the time of writing, they are meaningful only when attached
      to link-local unicast and scoped multicast addresses, but it is
      possible that other uses might be defined in the future. </t>
      
      <t>Examples of a link-local unicast address qualified by a zone
      identifier are "fe80::1234%eth0" on a Linux host or
      "fe80::4321%7" on a Microsoft Windows host.</t>
      
      <t>Such addresses are directly supported by socket API calls
      including "getaddrinfo()" <xref target="RFC3493"/>.</t>
      
      <t>Devices whose network stack does not support
      the model of a human-readable zone identifier described in <xref target="RFC4007"/>
      are out of scope for this document.</t>
      
     </section>
      <section anchor="uses" numbered="true">
      <name>Use Cases</name>

      <t>Some examples of use cases for entering an address
      that includes a zone identifier
      into a UI are as follows:</t>
<ol><li>A software tool may be used for simple debugging actions 
   involving link-local addresses on a host with more than one active
   link interface. For example, the functioning of an interface
   and the existence of a device may be checked
   via "ping fe80::1234%eth0". If this succeeds, the user learns
   that the other device is reachable via the interface named "eth0".</li>
   
   <li>A software tool must sometimes be used to configure or reconfigure a
   device that only has a link-local address, again in a host with
   more than one active link interface. For example, a typical home router
   may be configured via a well-known private address <xref target="RFC1918"/>
   such as "192.168.178.1" but not via "fe80::1%eth0", if the tool in use does
   not support the input of zone identifiers. More generally, link-local addresses
   need to be entered in network management UIs for use in formats
   such as YANG <xref target="RFC6991"/>.</li>
   
   <li>Using a monitoring tool such as a network sniffer, the user may need to specify
   a given link-local address on a given interface whose traffic is of interest.
   (For example, at the time of writing, Wireshark supports capture from multiple
   interfaces but does not appear to support the zone
   identifier in a display filter.)</li>
   
   <li>The Microsoft Web Services for Devices (WSD) virtual printer
   port mechanism can present the user with an IPv6 link-local address such as
   "fe80::823b:f9ff:fe7b:d9dc%10" in which the zone identifier is present
   but is not recognized by appropriate software.</li>

   <li>The National Marine Electronics Association (NMEA) has defined
   the "OneNet Marine IPv6 Ethernet Networking Standard" <xref target="ONE-NET"/>, 
   which uses IPv6 link-local addresses exclusively. Proposed improvements to
   the standard include a web page for device configuration using link-local 
   addresses.</li>
</ol>

<t>Such requirements have already spawned
hacks to work around current limitations (e.g., the hack described in <xref target="LL-HACK"/>,
which is no longer maintained and has been archived).</t>

<t>For all such use cases, it is highly desirable that a complete IPv6 link-local
address can be cut and pasted from one UI (such as the output
from a system command) to another. Since such
addresses may include quite long hexadecimal strings, 
for example, "fe80::8d0f:7f26:f5c8:780b%enx525400d5e0fb", any solution except
cut-and-paste is highly error prone.</t>
</section>

<section anchor="rfcrel" numbered="true">
<name>Relationship to Other Documents</name>

<t>The use cases listed above apply to relatively simple actions
on end systems. The zone identifiers that can be used are limited
by the host operating system, since <xref target="RFC4007"/> only specifies
that they are text strings, without specifying a maximum length or syntax.
As <xref target="RFC4007"/> explains, each zone identifier corresponds to a
numerical zone index that qualifies a link-local address.</t>

<t>It should be noted that whereas some operating systems and network APIs
support a default zone identifier as recommended by <xref target="RFC4007"/>,
others, including Linux, do not, and for them a solution is
particularly important, since a link-local address without
a zone index cannot be used in the Linux socket API.</t>

<t>The model in <xref target="RFC4007"/> assumes that the human-readable zone identifier
is mapped by the operating system into a numeric interface index.
Typically, this mapping is performed by the socket API, e.g., by
"getaddrinfo()". The mapping between the human-readable zone identifier
string and the numeric
value is a host-specific function that varies between operating systems. The
present document is concerned only with the human-readable string that is
typically displayed in an operating system's user interface. However, in
most operating systems, it is possible to use the underlying interface number,
represented as a decimal integer, as an equivalent to the human-readable string.
This is recommended by <xref target="RFC4007" section="11.2"/>, but it is not required.
This possibility does not affect the UI requirement given in this document.</t>

<t>As IPv6 deployment becomes more widespread, the lack of a solution for
handling complete link-local addresses in all tools is becoming an acute
problem for increasing numbers of operational and support personnel.
It will become critical as IPv6-only or IPv6-mostly networks
<xref target="RFC8925"/> <xref target="I-D.ietf-v6ops-6mops"/>, with nodes lacking native
IPv4 support, appear. For example, the NMEA use case mentioned above is
an immediate requirement. This is the principal reason for documenting
this requirement now.</t>

<t>This document completely obsoletes <xref target="RFC6874"/>, which implementors
of web browsers have determined is impracticable to support
<xref target="I-D.schinazi-httpbis-link-local-uri-bcp"/>, and replaces it
with a generic UI requirement. Note that obsoleting
<xref target="RFC6874"/> reverts the change that it made to the URI syntax defined by
<xref target="RFC3986"/>, so <xref target="RFC3986"/> is no longer updated by <xref target="RFC6874"/>.
As far as is known, this change will have no significant impact on
non-browser deployments of URIs.</t>

<t>This document also updates <xref target="RFC7622"/> and <xref target="RFC8089"/>
by deleting their references to <xref target="RFC6874"/>.</t>

<t>It also updates <xref target="RFC4007"/> by adding a new requirement that
user interfaces support the zone identifier as described in <xref target="spec"/>.</t>

</section>
    <section anchor="norm" numbered="true">
      <name>Requirements Language</name>
        <t>
    The key words "<bcp14>MUST</bcp14>", "<bcp14>MUST NOT</bcp14>", "<bcp14>REQUIRED</bcp14>", "<bcp14>SHALL</bcp14>", "<bcp14>SHALL
    NOT</bcp14>", "<bcp14>SHOULD</bcp14>", "<bcp14>SHOULD NOT</bcp14>", "<bcp14>RECOMMENDED</bcp14>", "<bcp14>NOT RECOMMENDED</bcp14>",
    "<bcp14>MAY</bcp14>", and "<bcp14>OPTIONAL</bcp14>" in this document are to be interpreted as
    described in BCP&nbsp;14 <xref target="RFC2119"/> <xref target="RFC8174"/> 
    when, and only when, they appear in all capitals, as shown here.
        </t>
    </section>
    
    
    <section anchor="spec" numbered="true">
      <name>Specification</name>
      <t>A user interface (UI) that allows or requires the user to enter an
      IPv6 address other than a global unicast address <bcp14>MUST</bcp14> provide a means 
      for entering a link-local address or a scoped multicast address and
      selecting a zone identifier as specified by <xref target="RFC4007"/> (typically, an
      interface identifier as defined by the operating system).</t>
      <t>In this case, the UI <bcp14>SHOULD</bcp14> support the complete
      format specified by <xref target="RFC4007"/> (e.g., "fe80::1%eth0").</t>
      <t>If this is impossible for practical reasons, the UI <bcp14>MAY</bcp14>
support an alternative delimiter in place of "%".
The hyphen ("-") is suggested (e.g., "fe80::1-eth0").</t>
      <t>If this too is impossible for practical reasons, the UI
 <bcp14>MAY</bcp14> provide two separate input fields (e.g., "fe80::1" in
one box and "eth0" in another), selection from a list of
active zone identifiers,
or a separate command-line parameter for the zone identifier.</t>
      <t>The program providing the UI will then store the address
and the zone identifier, converting the latter
to an interface index (typically via the socket API).
A faulty zone identifier will be detected when attempting to convert
it, and this should be reported to the user as an error. The
resulting interface index will be used 
for any subsequent socket calls using the link-local address. </t>

<t>Note that an address string such as "fe80::1%eth0" cannot be
converted to binary by the POSIX socket API function "inet_pton()"
<xref target="POSIX"/>.
It must be converted either by using "getaddrinfo()" or
by splitting it into two strings and using "inet_pton()"
and "if_nametoindex()" successively, in order to obtain
the required interface index value.</t>

<t> In this model, the zone identifier is considered independently of
the IPv6 address itself. However, this does not in itself resolve
the difficulties in considering the zone identifier as part of the 
HTTP origin model <xref target="RFC6454"/>. Therefore, this approach
does not resolve the issue of how browsers should support link-local
addresses, which is discussed further in
<xref target="I-D.schinazi-httpbis-link-local-uri-bcp"/>.
Because of this, the recommendations and normative statements in this
document do not apply to URIs fetched by web browsers.</t>


    </section>
    <section anchor="security" numbered="true">
      <name>Security Considerations</name>
      <t>As explained in <xref target="RFC4007"/>, zone identifiers
         are of local significance only and must not be sent on the wire.
         In particular, see the final security consideration
         of <xref target="RFC4007"/>, which indicates that software
         should not trust packets that contain textual non-global
         addresses as data. Therefore, software that obtains 
         a zone identifier through
         a UI should not transmit it further.
      </t>
      <t>There is no formal limit on the length of the zone identifier
      string in <xref target="RFC4007"/>. A UI implementation should apply an appropriate
      length limit when inputting a zone identifier, in order
      to minimize the risk of a buffer overrun. Typically, this limit
      would be the same as the host operating system's limit on interface names.</t>

      <t><xref target="RFC4007"/> does not specify or restrict the character set allowed in a zone
      identifier. Therefore, each implementation processing zone identifiers needs
      to make checks appropriate for the environment it is used in. For example,
      a UI implementation should not allow ASCII NUL characters in a zone identifier
      string as this could cause inconsistencies in subsequent string processing.</t>
    </section>
    <section anchor="iana-considerations">
      <name>IANA Considerations</name>
      <t>This document has no IANA actions.</t>
    </section>
  </middle>
  <back>

<displayreference target="I-D.schinazi-httpbis-link-local-uri-bcp" to="LINK-LOCAL-URI"/>
<displayreference target="I-D.ietf-6man-rfc6874bis" to="RFC6874bis"/>
<displayreference target="I-D.ietf-v6ops-6mops" to="IPv6-MOSTLY"/>
    
    <references>
      <name>References</name>
      <references>
        <name>Normative References</name>
        
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.4007.xml"/>
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.4291.xml"/>
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.5952.xml"/>
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.2119.xml"/>
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.8174.xml"/>

      </references>
      <references>
        <name>Informative References</name>
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.1918.xml"/>
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.3493.xml"/>
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.3986.xml"/>
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.6874.xml"/>
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.6454.xml"/>
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.8925.xml"/>
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.7622.xml"/>
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.8089.xml"/>
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.6991.xml"/>

<!-- [I-D.ietf-6man-rfc6874bis]
draft-ietf-6man-rfc6874bis-09
IESG State: Expired (IESG: Dead) as of 07/09/25
Long Way because of author initials
-->
<reference anchor="I-D.ietf-6man-rfc6874bis" target="https://datatracker.ietf.org/doc/html/draft-ietf-6man-rfc6874bis-09">
<front>
<title>
Representing IPv6 Zone Identifiers in Address Literals and Uniform Resource Identifiers
</title>
<author fullname="Brian E. Carpenter" initials="B." surname="Carpenter"/>
<author fullname="Stuart Cheshire" initials="S." surname="Cheshire">
<organization>Apple Inc.</organization>
</author>
<author fullname="Bob Hinden" initials="R." surname="Hinden">
<organization>Check Point Software</organization>
</author>
<date day="2" month="July" year="2023"/>
</front>
<seriesInfo name="Internet-Draft" value="draft-ietf-6man-rfc6874bis-09"/>
</reference>
	
<!-- [I-D.ietf-v6ops-6mops]
draft-ietf-v6ops-6mops-01
IESG State: I-D Exists as of 07/09/25
-->
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml3/reference.I-D.ietf-v6ops-6mops.xml"/>
<!-- [I-D.schinazi-httpbis-link-local-uri-bcp]
draft-schinazi-httpbis-link-local-uri-bcp-03
IESG State: I-D Expired as 07/09/25
-->
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml3/reference.I-D.schinazi-httpbis-link-local-uri-bcp.xml"/>
        
        <reference anchor="ONE-NET" target="https://www.nmea.org/nmea-onenet.html">
          <front>
            <title>OneNet Marine IPv6 Ethernet Networking Standard</title>
            <author fullname="NMEA"/>
            <date year="2025"/>
          </front>
        </reference>
        <reference anchor="LL-HACK" target="https://web.archive.org/web/20210725030713/https://website.peterjin.org/wiki/Snippets:IPv6_link_local_connect_hack">
          <front>
            <title>Snippets: IPv6 link-local connect hack</title>
            <author fullname="Peter Jin"/>
            <date year="2021"/>
          </front>
        </reference>
        
        <reference anchor="POSIX" target="https://doi.org/10.1109/IEEESTD.2024.10555529">
          <front>
            <title>IEEE/Open Group Standard for Information Technology--Portable Operating System Interface (POSIX(TM)) Base Specifications, Issue 8</title>
            <author>
              <organization>IEEE</organization>
            </author>
            <date year="2024" month="June"/>
          </front>
          <seriesInfo name="IEEE Std" value="1003.1-2024"/>
          <seriesInfo name="DOI" value="10.1109/IEEESTD.2024.10555529"/>
        </reference>
  
      </references>
    </references>

    <section anchor="ack" numbered="false">
      <name>Acknowledgements</name>
      <t>This document owes a lot to the previous discussions that led to <xref target="RFC6874"/> and to the expired Internet-Draft <xref
      target="I-D.ietf-6man-rfc6874bis"/>.</t>

      <t>Useful comments were received from <contact fullname="Erik
      Auerswald"/>, <contact fullname="Nick Buraglio"/>, <contact
      fullname="Martin J. Dürst"/>, <contact fullname="Toerless Eckert"/>,
      <contact fullname="David Farmer"/>, <contact fullname="Brian
      Haberman"/>, <contact fullname="Nate Karstens"/>, <contact
      fullname="Tero Kivinen"/>, <contact fullname="Erik Kline"/>, <contact
      fullname="Jen Linkova"/>, <contact fullname="Eduard Metz"/>, <contact
      fullname="Gyan Mishra"/>,  <contact
      fullname="David Schinazi"/>, <contact fullname="Jürgen Schönwälder"/>,
      <contact fullname="Michael Sweet"/>, <contact fullname="Martin
      Thomson"/>, <contact fullname="Ole Troan"/>, <contact fullname="Éric Vyncke"/>, <contact fullname="Magnus
      Westerlund"/>, and other participants in the 6MAN WG.</t>
    </section>

  </back>
</rfc>
