<?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" ipr="trust200902" docName="draft-ietf-6man-rfc6724-update-25" number="10076" category="std" consensus="true" submissionType="IETF" updates="6724" obsoletes="" version="3" xml:lang="en" tocInclude="true" symRefs="true" sortRefs="false">

  <front>
    <title abbrev="Prioritizing Known-Local IPv6 ULAs">Prioritizing Known-Local IPv6 ULAs Through Address Selection Policy</title>
    <seriesInfo name="RFC" value="10076"/>
    <author initials="N." surname="Buraglio" fullname="Nick Buraglio">
      <organization>Energy Sciences Network</organization>
      <address>
        <email>buraglio@forwardingplane.net</email>
      </address>
    </author>
    <author initials="T." surname="Chown" fullname="Tim Chown">
      <organization>Jisc</organization>
      <address>
        <email>Tim.Chown@jisc.ac.uk</email>
      </address>
    </author>
    <author initials="J." surname="Duncan" fullname="Jeremy Duncan">
      <organization>Tachyon Dynamics</organization>
      <address>
        <email>jduncan@tachyondynamics.com</email>
      </address>
    </author>
    <date year="2026" month="November"/>
    <area>INT</area>
    <workgroup>6man</workgroup>

<keyword>IPv6 address selection</keyword>

    <abstract>
<t>This document updates the default address selection algorithm for Internet
Protocol Version 6 (IPv6), originally specified in RFC 6724, based on
accumulated operational experience. It introduces the concept of "known-local"
Unique Local Address (ULA) prefixes within the fd00::/8 block and specifies
that ULA-to-ULA communications using such prefixes should be preferred over
both IPv4-to-IPv4 and GUA-to-GUA (Global Unicast Address) communications in
local use scenarios. The document defines mechanisms for nodes to identify and
incorporate known-local prefixes into their address selection policy tables. It
introduces a requirement to implement Rule 5.5 of RFC 6724 and reduces the default
precedence for 6to4 addresses. These updates enhance the supportability of typical
deployment environments, including automatic and unmanaged configurations,
and promote consistent IPv6-over-IPv4 precedence behavior for both ULA and GUA within
local networks. The document acknowledges that certain atypical deployment models may require explicit
configuration to achieve intended operational outcomes.</t>
    </abstract>
  </front>
  <middle>

<section anchor="introduction">
      <name>Introduction</name>
      <t>Since its publication in 2012, "Default Address Selection for Internet Protocol Version 6 (IPv6)" <xref target="RFC6724"/> has become an important mechanism by which nodes can perform address selection, deriving the most appropriate source and destination address pair to use from a candidate set by following the procedures defined in the RFC. Part of the process involves the use of a policy table, where the precedence and labels for address prefixes are listed, and for which a default policy table is defined.</t>
      <t>It was always expected that the default policy table may need to be changed based on operational experience; <xref target="RFC6724" section="2.1"/> states, "It is important that implementations provide a way to change the default policies as more experience is gained", and points to the examples in Section <xref target="RFC6724" section="10" sectionFormat="bare"/> of the same document, which includes Section <xref target="RFC6724" section="10.6" sectionFormat="bare"/> where a unique local address (ULA as defined in <xref target="RFC4193"/>) example is presented.</t>
      <t>This document is written on the basis of such operational experience, in particular for scenarios where ULAs are used for their intended purpose as stated in <xref target="RFC4193"/>, i.e., they are designed to be routed within a local site and by default not advertised, used, or received from external locations to that site. This document defines how preference for ULAs may be elevated for appropriate, common scenarios.</t>
      <t>To support the preference to use ULA address pairs over both IPv4 and GUA (Global Unicast Address as defined in <xref target="RFC3587"/>) address pairs for local intra-site scenarios, the concept of a "known-local" ULA address is introduced. This document describes the means for nodes to determine the ULA prefixes that are known to be local to the site they are operating in and to insert those prefixes into their policy table with a label that differs from general ULA prefixes. This capability allows nodes to prefer ULA-ULA communication locally, but still use GUA-GUA address pairs for external communication, and importantly to avoid selecting a ULA source to talk to a non-local ULA destination.</t>
      <t>This document also reinforces the text in <xref section="5" target="RFC6724"/> to require support for Rule 5.5.</t>
      <t><xref section="3.1" target="RFC4193"/> defines ULAs within fc00::/7, where the L bit, as detailed in <xref section="3.1" target="RFC4193"/>, is set to 1 for locally assigned (generated) prefixes, with L=0 as yet undefined. The use of known-locals as described in this document therefore applies to the currently used ULA prefixes under fd00::/8, where the prefixes conform to the definition in <xref section="3.1" target="RFC4193"/>.</t>
      <t>The overall goal of this update is to improve behavior for common scenarios, and to assist in phasing out the use of IPv4, while noting that some specific scenarios may still require explicit configuration.</t>
      <t>An IPv6 deployment, whether enterprise, residential, or other, may use combinations of IPv6 GUAs, IPv6 ULAs, IPv4 global addresses, IPv4 private addresses, and may or may not use some form of NAT. However, this document makes no comment or recommendation on how ULAs are used or on the use of NAT in an IPv6 network.</t>
      <section anchor="operational-issues-regarding-precedence-for-ipv4-addresses-over-ulas">
        <name>Operational Issues Regarding Precedence for IPv4 Addresses over ULAs</name>
        <t>With multi-addressing being the norm for IPv6, more so where nodes are dual-stack, the ability for a node to pick an appropriate address pair for communication is very important.</t>
        <t>Where getaddrinfo() as referenced in <xref target="RFC3493"/> or a comparable API is used, the sorting behavior should take into account both
the source addresses of the requesting node as well as the destination addresses returned, and sort the candidate address pairs following the procedures defined in <xref target="RFC6724"/>.</t>
        <t>The current default policy table leads to precedence for use of IPv6 GUAs over IPv4 global addresses, which is widely considered preferential behavior to support greater use of IPv6 in dual-stack environments. This helps by allowing sites to phase out IPv4 as its evidenced use becomes ever lower.</t>
        <t>However, there are two issues with precedence, or rather non-precedence, for ULAs as originally defined in <xref target="RFC6724"/>.</t>
        <t>First, the aforementioned default policy table places IPv6 ULAs below all IPv4 addresses, including private addresses, such that IPv4-IPv4 address pairs are favored over IPv6 ULA-ULA address pairs. As a result, the expected default prioritization of IPv6 traffic over IPv4, as happens with IPv6 GUA addresses, does not happen for ULAs. This contrasting and potentially unexpected behavior for the different scopes could create difficulties that complicate network planning and operations and may have security implications for environments where ULA addresses are used in IPv4/IPv6 dual-stack network scenarios.</t>
        <t>As a result, the use of ULAs is not a viable option for dual-stack networking transition planning, large-scale network modeling, network lab environments, or other modes of large-scale networking that run both IPv4 and IPv6 concurrently with the expectation that IPv6 will be preferred by default. The precedence of known-local ULAs over IPv4 is thus important to assist administrators in phasing out IPv4 from dual-stack environments and is an important enabler for sites seeking to move from dual-stack to IPv6-only networking.</t>
        <t>Additionally, an issue exists in the scenario where nodes in a dual-stack site are addressed from both ULA and GUA prefixes: GUA-GUA address pairs will be chosen over ULA-ULA according to <xref target="RFC6724"/>. One goal of ULA addresses is to allow local communications to be independent of the availability of external connectivity and addresses, such that persistent ULAs can be used even when the global prefix that was made available to a site is withdrawn or changes.</t>
        <t>This document therefore introduces two changes to <xref target="RFC6724"/> to require that nodes implement elevated or differential precedence for known-local ULAs, i.e., ULAs within a common local network, over both IPv4 and IPv6 GUAs.</t>
        <t>The first change is an update to the default policy table to elevate the precedence for ULA prefixes such that ULAs, like GUAs, carry a higher precedence than all IPv4 addresses, making IPv6 precedence over IPv4 consistent for both ULAs and GUAs.</t>
        <t>The second change is the introduction of the concept of known-local ULAs.  <xref target="RFC6724"/> includes a method by which nodes may provide more fine-grained support for further elevating the preference for specific ULA prefixes, while leaving other general ULA prefixes at
the precedence described in the previous paragraph.  This document modifies the requirement for specific ULA prefixes to be inserted into the policy table to apply only to observed prefixes that are known to be local, i.e., known-local ULAs.</t>
        <t>These changes aim to improve the default handling of address selection for common cases and for unmanaged and/or automatic scenarios rather than those where DHCPv6 is deployed. The changes are discussed in more detail in the following sections, with a further section providing a summary of the proposed updates.</t>
      </section>
      <section anchor="precedence-of-6to4-addresses">
        <name>Precedence of 6to4 Addresses</name>
        <t>The anycast prefix for 6to4 relays was formally deprecated by <xref target="RFC7526"/> in 2015, and since that time the use of 6to4 addresses has further declined, with very little evidence of its use on the public Internet. Note that <xref target="RFC7526"/> does not deprecate the 6to4 IPv6 prefix 2002::/16, it only deprecates the 6to4 Relay IPv4 prefix.</t>
        <t>This document therefore demotes the precedence of the 6to4 prefix in the policy table to the same precedence as carried by the Teredo prefix defined in <xref target="RFC4380"/>. Leaving this entry in the default table will cause no problems and will help if any deployments still exist, and will ensure 6to4 prefixes are differentiated from general GUAs.</t>
        <t>The discussion regarding the adding of 6to4 site prefixes in <xref target="RFC6724" section="10.7"/> remains valid.</t>
      </section>
    </section>
    <section anchor="terminology">
      <name>Terminology</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>
    <dl spacing="normal" newline="false">
      <dt>GUA:</dt><dd>Global Unicast Address as defined in <xref target="RFC3587"/></dd>
      <dt>ULA:</dt><dd>Unique Local Address as defined in <xref target="RFC4193"/></dd>
      <dt>Known-local ULA:</dt><dd>A ULA prefix that a node has determined to be local to a given node, network, or administrative domain</dd>
      <dt>RA:</dt><dd>IPv6 Router Advertisement as defined in <xref target="RFC4861"/></dd>
      <dt>PIO:</dt><dd>IPv6 Prefix Information Option as defined in <xref target="RFC4861"/></dd>
      <dt>SLAAC:</dt><dd>IPv6 Stateless Address Autoconfiguration <xref target="RFC4862"/></dd>
      <dt>Private address:</dt><dd> A private Internet IPv4 address as defined in <xref target="RFC1918"/></dd>
    </dl>
    </section>
    <section anchor="adjustments-to-rfc-6724">
      <name>Adjustments to RFC 6724</name>
      <t>This document makes three specific changes to <xref target="RFC6724"/>: first to update the default policy table; second to change Rule 5.5, which adjusts precedence of addresses in a prefix advertised by the next-hop, to a requirement; and third to require nodes to insert observed known-local ULA prefixes into their policy table.</t>
      <section anchor="policy-table-update">
        <name>Policy Table Update</name>
        <t>This update alters the default policy table listed in <xref section="2.1" target="RFC6724"/>.</t>
        <t>It should be noted that the order of rows in the policy table is of no consequence and only the precedence value is relevant.</t>
        <t>The table below reflects the updated precedence table:</t>
<table>
  <thead>
    <tr>
      <th align="left">Prefix</th>
      <th align="right">Precedence</th>
      <th align="right">Label</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td align="left">::1/128</td>
      <td align="right">50</td>
      <td align="right">0</td>
    </tr>
    <tr>
      <td align="left">$known_local/4x</td>
      <td align="right">45</td>
      <td align="right">14 (**)</td>
    </tr>
    <tr>
      <td align="left">::/0</td>
      <td align="right">40</td>
      <td align="right">1</td>
    </tr>
    <tr>
      <td align="left">fc00::/7</td>
      <td align="right">30</td>
      <td align="right">13 (*)</td>
    </tr>
    <tr>
      <td align="left">::ffff:0:0/96</td>
      <td align="right">20</td>
      <td align="right">4 (*)</td>
    </tr>
    <tr>
      <td align="left">2002::/16</td>
      <td align="right">5</td>
      <td align="right">2 (*)</td>
    </tr>
    <tr>
      <td align="left">2001::/32</td>
      <td align="right">5</td>
      <td align="right">5</td>
    </tr>
    <tr>
      <td align="left">::/96</td>
      <td align="right">1</td>
      <td align="right">3</td>
    </tr>
    <tr>
      <td align="left">fec0::/10</td>
      <td align="right">1</td>
      <td align="right">11</td>
    </tr>
    <tr>
      <td align="left">3ffe::/16</td>
      <td align="right">1</td>
      <td align="right">12</td>
    </tr>
  </tbody>
  <tfoot>
    <tr>
      <td colspan="3">
        <t>(*) value(s) changed in this update</t>
        <t>(**) $known_local = the ULA Known-Local IPv6 prefix(es), with length /40 or longer (if any), with precedence and labels per the rules in <xref target="automatic-insertion-of-known-local-ula-prefixes-into-the-policy-table"/>.</t>
      </td>
    </tr>
  </tfoot>
</table>

        <t>The update moves 2002::/16 to de-preference its status in line with <xref target="RFC7526"/> and moves the precedence of fc00::/7 above legacy IPv4, with ::ffff:0:0/96 now set to precedence 20.</t>
      </section>
      <section anchor="rule-55">
        <name>Rule 5.5</name>
        <t>The text in <xref target="RFC6724"/> states that the Rules <bcp14>MUST</bcp14> be followed in order, but also includes a discussion note under Rule 5.5 that says that an IPv6 implementation is not required to remember which next-hops advertised which prefixes and that Rule 5.5 is only
applicable to implementations that track this information.</t>
        <t>This document removes that exception and elevates the requirement to prefer addresses in a prefix advertised by a next-hop router to a requirement for all nodes.</t>
        <t>This change means that an IPv6 implementation will need to remember which next-hops advertised which prefixes
<xref target="RFC8028"/>, despite the conceptual models of IPv6 hosts in <xref section="5" target="RFC4861"/> and <xref section="3" target="RFC4191"/> having no such requirement.</t>
      </section>
      <section anchor="automatic-insertion-of-known-local-ula-prefixes-into-the-policy-table">
        <name>Automatic Insertion of Known-Local ULA Prefixes into the Policy Table</name>
        <t><xref section="2.1" target="RFC6724"/> states that "an implementation <bcp14>MAY</bcp14> automatically add additional site-specific rows to the default table based on its configured addresses, such as for Unique Local Addresses (ULAs)", but it provides no detail on how such behavior might be implemented.</t>
        <t>If a node can determine which ULA prefix(es) are known to be local, it can provide differential treatment for those over general, non-known-local ULAs, and insert these into the policy table at a higher precedence than GUAs while keeping all general ULA prefixes to a lower precedence.</t>
        <t>This document thus elevates the <bcp14>MAY</bcp14> requirement above for insertion to a <bcp14>MUST</bcp14> for the specific case of known-local ULAs.</t>
        <t>These known-local ULA prefixes are inferred from ULA addresses assigned to interfaces or learned from PIOs in received RAs <xref target="RFC4861"/>, regardless of how the PIO flags are set. Further, they are learned from Route Information Options (RIOs) in RAs received by Type C hosts that process RIOs, as defined in <xref target="RFC4191"/>.</t>
        <t><xref section="3.1" target="RFC4193"/> only defines ULA prefixes where the L bit is set to 1, i.e., prefixes under fd00::/8 where the prefix is locally assigned or generated.</t>
        <t>The following rules define how the learned known-local ULA prefixes under fd00::/8 are inserted into the address selection policy table for a node, through a conceptual list of known-local prefixes.</t>
        <ol spacing="normal" type="1"><li>
            <t>Any RIO or PIO that is delivered in an RA in which the "SNAC Router" RA header flag bit <xref target="RFC10075"/> is set <bcp14>MUST</bcp14> be ignored when considering the following rules.</t>
          </li>
          <li>
            <t>RIOs from within fd00::/8 are considered the preferred information source for determining known-local ULAs and should override other conflicting information or assumptions from other sources, including PIOs.</t>
          </li>
          <li>
            <t>RIOs within fd00::/8 that are of length /40 or longer <bcp14>MUST</bcp14> be added to the known-local ULA list. RIOs for shorter prefixes <bcp14>MUST NOT</bcp14> be used to insert known-local ULA entries in the address selection policy table</t>
          </li>
          <li>
            <t>PIOs received within fd00::/8 that are not already in the node's known-local ULA list <bcp14>MUST</bcp14> be added to the list with an assumed prefix length of /48, regardless of how the PIO flags are set.</t>
          </li>
          <li>
            <t>ULA interface addresses from within fd00::/8, particularly ones not created by SLAAC, and not already covered by the known-local ULA list, <bcp14>MUST</bcp14> be added to the list with an assumed prefix length of /48. However, as with rule 1, if the ULA interface address was generated on the basis of a PIO that has only been seen in RAs in which the SNAC Router flag bit is set, this ULA prefix <bcp14>MUST NOT</bcp14> be used as described in this rule (rule 5). This prevents potential use of a non-routable source address when communicating to a known-local ULA destination address that is not on the local link, as SNAC-generated ULAs can only work on a single link, and the only reason to ever choose them in source address selection is that the only choice for a destination address is the longest prefix match.</t>
          </li>
          <li>
            <t>When inserting known-local ULA entries into the policy table, they <bcp14>MUST</bcp14> have a label of 14 (rather than the default ULA label of 13) and a precedence of 45.</t>
          </li>
          <li>
            <t>Entries <bcp14>MUST</bcp14> be removed from the known-local ULA list and the Policy Table when the announced RIOs or PIOs become invalid, or an interface address is removed, and there is no covering RIO or PIO.</t>
          </li>
        </ol>
        <t>When support is added for the insertion of known-local ULA prefixes into the current policy table, it <bcp14>MUST</bcp14> default to on, but a mechanism <bcp14>SHOULD</bcp14> be supported to administratively toggle the behavior off and on.</t>
        <t>Mechanisms and techniques used to display a node's current policy table <bcp14>MUST</bcp14> show all currently inserted known-local ULA prefixes.</t>
        <t>The identification and insertion of known-local prefixes under fc00::/8 is currently not defined.</t>
        <t>Note that a practical limit exists on the number of RIOs and PIOs that can be placed into a single RA. Therefore, there is a practical limit to the number of known-local ULAs that can be expressed on a single network and the number of ULA prefixes that can automatically be preferred over IPv4 and GUA prefixes within the policy table. This limit is unlikely to impact most networks, especially residential and other small unmanaged networks that automatically generate ULA prefixes.</t>
        <t><xref section="4" target="RFC4191"/> says "Routers <bcp14>SHOULD NOT</bcp14> send more than 17 Route Information Options in Router Advertisements per link. This arbitrary bound is meant to reinforce that relatively few and carefully selected routes should be advertised to hosts." The exact limit will depend on other options that are used. So while this is not the practical limit discussed above, administrators should take extra care not to cause the RA size to exceed the MTU when filling the RA with RA Options when exceeding this limit.</t>
        <t>Note that in the case of Rule 3 above, it would be expected that ULA prefixes being included in the known-local prefix
list be compliant with <xref section="3" target="RFC4193"/> (i.e., /48 in size), but the above rule is pragmatic in that it allows
the use of ULA prefixes from /48 to /40 in length.
Most networks use ("are expected to use") /48 prefixes as per
<xref target="RFC4193"/>. However, it is possible that in some circumstances a
larger managed enterprise may wish to use a shorter prefix (e.g., to simplify management, filtering
rules, etc., and to overcome the issue with the number of RIOs an RA
can carry as described in the above paragraph). However, such
non-compliant use of ULAs may be problematic in other ways, e.g., carrying an increased risk of collision with other
ULA prefixes, because shorter prefixes have a lower chance to be globally unique.</t>
      </section>
    </section>
    <section anchor="configuration-of-the-default-policy-table">
      <name>Configuration of the Default Policy Table</name>
      <t>As stated in <xref section="2.1" target="RFC6724"/>, "IPv6 implementations <bcp14>SHOULD</bcp14> support configurable address selection via a mechanism at least as powerful as the policy tables defined here".</t>
      <t>Based on operational experience to date, it is important that node policy tables can be changed once deployed to support future emerging use cases. This update thus re-states the importance of such configurability.</t>
    </section>
    <section anchor="intended-behavior">
      <name>Intended Behavior</name>
      <t>In this section, we review the intended default behavior after this update is applied.</t>
      <section anchor="gua-gua-preferred-over-ipv4-ipv4">
        <name>GUA-GUA Preferred over IPv4-IPv4</name>
        <t>This is the current behavior, and remains unaltered. The rationale is to promote use of IPv6 GUAs in dual-stack environments.</t>
      </section>
      <section anchor="gua-gua-preferred-over-ula-ula">
        <name>GUA-GUA Preferred over ULA-ULA</name>
        <t>This is the current behavior, and remains unaltered for the general case.</t>
        <t>However, where a ULA prefix is determined to be local, and added as a known-local ULA prefix to a node's address selection policy table, communications to addresses in other known-local ULA prefixes will prefer ULA-ULA address pairs to GUA-GUA (matching label, higher precedence).</t>
      </section>
      <section anchor="known-local-ula-known-local-ula-preferred-over-gua-gua">
        <name>Known-Local ULA - Known-Local ULA Preferred over GUA-GUA</name>
        <t>As described in the previous case, this document elevates precedence for use of ULAs over GUAs in cases where the ULA prefix(es) in use can be determined to be local to a site or organization.</t>
        <t>By only adapting this behavior for known-local ULAs, a node will not select a ULA source to talk to a non-local ULA destination and will instead correctly use GUA-GUA.</t>
        <t>Nodes not yet implementing this RFC will continue to use GUA-GUA over ULA-ULA for all cases.</t>
        <t>As an example, consider a site that uses prefixes ULA1::/48, ULA2::/48, and GUA1::/48.</t>
        <t>Host A has address ULA1::1 and GUA1:1::1.
Host B has address ULA2::1 and GUA1:2::1.</t>
        <t>Both ULA prefixes have been determined to be known-local through RIOs.
Perhaps ULA2 is reachable within the site, but its prefix is not in direct use at host A.</t>
        <t>If host A sends to host B, the candidate pairs are ULA1::1 - ULA2::1 and GUA1:1::1 - GUA1:2::1.</t>
        <t>In this case, ULA1::1 - ULA2::1 wins because of matching labels (both 14) and higher precedence than GUA (45 vs. 40).</t>
        <t>If host A were to send to a host C with addresses ULA3::1 (where ULA3::/48 has not been learned to be a known-local prefix) and GUA2:1::1, host A would use the GUA address pair for the communication as the GUAs have matching labels (both 1), whereas the known-local ULA and general ULA do not (14 and 13, respectively).</t>
      </section>
      <section anchor="known-local-ula-known-local-ula-preferred-over-ipv4-ipv4">
        <name>Known-Local ULA - Known-Local ULA Preferred over IPv4-IPv4</name>
        <t>This update changes the previous behavior for this case. <xref target="RFC6724"/> as originally defined would lead to IPv4 being preferred over ULAs, which is contrary to the spirit of the IPv6 GUA precedence over IPv4, and to the goal of removing evidenced use of IPv4 in a dual-stack site before transitioning to IPv6 only.</t>
        <t>This document elevates the precedence of known-local ULAs above IPv4, so known-local ULA-ULA address pairs will be chosen over IPv4-IPv4 pairs (matching label, higher precedence).</t>
      </section>
      <section anchor="ipv4-ipv4-preferred-over-ula-gua">
        <name>IPv4-IPv4 Preferred over ULA-GUA</name>
        <t>An IPv6 ULA source address will only be preferred over an IPv4 address if both IPv6 ULA source and destination addresses are available. With Rule 5 of <xref section="6" target="RFC6724"/> and the ULA-specific label added in <xref target="RFC6724"/> (which was not present in <xref target="RFC3484"/>), an IPv4 source and destination will be preferred over an IPv6 ULA source and an IPv6 GUA destination address, even though generally known-local IPv6 ULA addresses are preferred over IPv4 in the policy table as proposed in this update. The IPv4 matching label trumps ULA-GUA.</t>
      </section>
    </section>
    <section anchor="discussion-of-ula-source-with-gua-or-remote-ula-destination">
      <name>Discussion of ULA Source with GUA or Remote ULA Destination</name>
      <t>In this section, we discuss the scenarios where a ULA source may be communicating with a GUA or ULA destination.</t>
      <t>A potential problem exists when a ULA source attempts to communicate with GUA or remote ULA destinations. In these scenarios, the ULA source as stated earlier is by default intended for communication only with the local network, meaning an individual site, several sites that are part of the same organization, or multiple sites across cooperating organizations, as detailed in <xref target="RFC4193"/>. As a result, most GUA and ULA destinations are not attached to the same local network as the ULA source and are, therefore, not reachable from the ULA source.</t>
      <dl spacing="normal" newline="true">
      <dt>Scenario 1: ULA source and GUA destination</dt>
      <dd>When only a ULA source is available for communication with GUA destinations, this generally implies no connectivity to the IPv6 Internet is available. Otherwise, a GUA source would have been made available and selected for use with GUA destinations. As a result, the ULA source will typically fail when it attempts to communicate with most GUA destinations. However, corner cases exist where the ULA source will not fail, such as when GUA destinations are attached to the same local network as the ULA source.</dd>
      <dt>Scenario 2: ULA source and remote ULA destination</dt>
      <dd>Receiving a DNS response for a ULA destination that is not attached to the local network is considered a misconfiguration. This contradicts the operational guidelines provided in <xref section="4.4" target="RFC4193"/>. Nevertheless, this can occur, and the ULA source will typically fail when it attempts to communicate with ULA destinations that are not attached to the same local network as the ULA source. This case provides a rationale for implementing support for known-local ULA prefix insertion in the policy table, so that differential behavior can be applied for known-local versus general ULA prefixes.</dd>
      </dl>
      <t>The remainder of this section discusses several complementary mechanisms involved with these scenarios.</t>
      <section anchor="the-ula-label-and-its-precedence">
        <name>The ULA Label and Its Precedence</name>
        <t>In obsoleting <xref target="RFC3484"/>, <xref target="RFC6724"/> added a separate label for ULAs (the whole range, under fc00::/7), whose default precedence is raised by this update. This separate label interacts with Rule 5 of <xref target="RFC6724" section="6"/>, which says:</t>
        <blockquote>
   <t>Rule 5: Prefer matching label.</t>
   <t>If Label(Source(DA)) = Label(DA) and Label(Source(DB)) &lt;&gt; Label(DB),
   then prefer DA.  Similarly, if Label(Source(DA)) &lt;&gt; Label(DA) and
   Label(Source(DB)) = Label(DB), then prefer DB.</t>
</blockquote>
        <t>In the first scenario, the ULA source label, whether known-local or not, will not match the GUA destination label. Therefore, an IPv4 destination, if available, will be preferred over a GUA destination with a ULA source, even though the GUA destination has higher precedence than the IPv4 destination in the policy table. This means the IPv4 destination will be moved up in the list of destinations over the GUA destination with the ULA source.</t>
        <t>If the ULA (fc00::/7) label is removed from the policy table, a GUA destination with a ULA source will be preferred over an IPv4 destination, as GUA and ULA will be part of the same label (for ::/0).</t>
        <t>In the second scenario, if the ULA source has been recognized as being within a known-local prefix that has been inserted into the address selection policy table, then the known-local ULA source and general ULA destination will have different labels, and therefore IPv4 communication will be preferred.</t>
        <t>If the ULA source has not been recognized as known-local, e.g., if the insertion of known-local prefixes into the policy table has been administratively disabled, its general ULA label will match the general ULA destination label, and therefore, whether part of the local network or not, the ULA destination will be preferred over an IPv4 destination.</t>
      </section>
      <section anchor="happy-eyeballs">
        <name>Happy Eyeballs</name>
        <t>Regardless of the precedence resulting from the above discussion, Happy Eyeballs version 1 <xref target="RFC6555"/> or version 2 <xref target="RFC8305"/>, if implemented, will try both the GUA or ULA destination with the ULA source and the IPv4 destination and source pairings.
The ULA source will typically fail to communicate with most GUA or remote ULA destinations, and IPv4 will be preferred if IPv4 connectivity is available unless the GUA or ULA destinations are attached to the same local network as the ULA source.</t>
      </section>
      <section anchor="try-the-next-address">
        <name>Try the Next Address</name>
        <t>As stated in <xref section="2" target="RFC6724"/>:</t>
<blockquote>
        <t>Well-behaved applications <bcp14>SHOULD NOT</bcp14> simply use the first address returned from an API such as getaddrinfo() and then give up if it fails. For many applications, it is appropriate to iterate through the list of addresses returned from getaddrinfo() until a working address is found. For other applications, it might be appropriate to try multiple addresses in parallel (e.g., with some small delay in between) and use the first one to succeed.</t></blockquote>
        <t>Therefore, when an IPv4 destination is preferred over GUA or ULA destinations, IPv4 will likely succeed if IPv4 connectivity is available, and the GUA or ULA destination may only be tried if Happy Eyeballs is implemented.</t>
        <t>On the other hand, if the GUA or ULA destination with the ULA source is preferred, the ULA source will typically fail to communicate with GUA or ULA destinations that are not connected to the same local network. However, if the operational guidelines in <xref section="4.3" target="RFC4193"/> are followed, recognizing this failure can be accelerated, and transport layer timeouts (e.g., TCP hard errors as described in <xref target="RFC5461" section="2.1"/>) can be avoided. The guidelines will cause a Destination Unreachable ICMPv6 error to be received by the source device, signaling the next address in the list to be tried, as discussed above.</t>
      </section>
    </section>
    <section anchor="following-ula-operational-guidelines-in-rfc4193">
      <name>Following ULA Operational Guidelines in RFC 4193</name>
      <t>This section re-emphasizes two important operational requirements stated in <xref target="RFC4193"/> that should be followed by administrators.</t>
      <section anchor="filtering-ula-source-addresses-at-site-borders">
        <name>Filtering ULA-Source Addresses at Site Borders</name>
        <t><xref section="4.3" target="RFC4193"/> states, "Site border routers and firewalls should be configured to not forward
any packets with Local IPv6 source or destination addresses outside the site, unless they have been explicitly configured with routing information about specific /48 or longer Local IPv6 prefixes."</t>
        <t>And further that "Site border routers should respond with the appropriate ICMPv6 Destination Unreachable message to inform the source that the packet was not forwarded".</t>
        <t>As stated in the above discussion, such ICMPv6 messages can assist in fast failover for TCP connections.</t>
      </section>
      <section anchor="avoid-using-ula-addresses-in-the-global-dns">
        <name>Avoid Using ULA Addresses in the Global DNS</name>
        <t><xref section="4.4" target="RFC4193"/> states that "AAAA and PTR records for locally assigned local IPv6 addresses are not recommended to be installed in the global DNS."</t>
        <t>This is particularly important given that the general method presented in this document elevates the priority for ULAs above IPv4. However, where support for insertion of known-local prefixes is implemented, such "rogue" ULAs in the global DNS are a less serious concern for address selection as they would have the lowest precedence.</t>
      </section>
    </section>
    <section anchor="the-practicalities-of-implementing-address-selection-support">
      <name>The Practicalities of Implementing Address Selection Support</name>
      <t>As with most adjustments to standards, and using the introduction of <xref target="RFC6724"/> as a measuring stick, the updates defined in this document will likely take several years to become common enough for consistent behavior within most operating systems. At the time of writing, it has been over 10 years since <xref target="RFC6724"/> has been published, but we continue to see existing commercial and open source operating systems exhibiting behavior defined in <xref target="RFC3484"/> or other behavior.</t>
      <t>While it should be noted that <xref target="RFC6724"/> defines a solution to adjust the address precedence selection table that is theoretically functional, operationally the solution is operating system dependent, and in practice, policy table changes cannot be signaled by any currently deployed network mechanism. While <xref target="RFC7078"/> defines such a DHCPv6 option, there are few if any implementations. This lack of an intra-protocol or network-based ability to adjust address selection precedence, along with the inability to adjust a notable number of operating systems either programmatically or manually, renders operational scalability of such a mechanism challenging.</t>
      <t>It is especially important to note this behavior in the equipment that exists in industrial control and operational technology environments due to their very long life cycles and very long mean time to replacement.</t>
    </section>
    <section anchor="limitations-of-rfc6724">
      <name>Limitations of RFC 6724</name>
      <t>The procedures defined in <xref target="RFC6724"/> do not give optimal results for all scenarios. As stated in the introduction, the aim of this update is to improve the behavior for the most common scenarios.</t>
      <t>Operational experience has demonstrated that the model of RFCs 3484 and 6724 and of getaddrinfo() is fundamentally limited with regard to optimal address selection. A model that considers address pairs directly, rather than sorting on destination addresses with the best source for that address, would be preferable, but beyond the scope of this document.</t>
      <t>To simplify address selection, administrators may instead look to deploy IPv6 only and/or may choose to only use GUA addresses and no ULA addresses. Other approaches to reduce the use of IPv4, e.g., through use of DHCPv4 option code 108 as defined in <xref target="RFC8925"/> as part of an "IPv6 Mostly" deployment model, also help simplify address selection for nodes.</t>
    </section>

    <section anchor="security-considerations">
      <name>Security Considerations</name>
      <t>The mixed precedence for IPv6 over IPv4 from the default policy table in <xref target="RFC6724"/> represents a potential security issue, given that an operator may expect ULAs to be used when in practice private addresses are used instead.</t>
      <t>The requirements of <xref target="RFC4193"/>, stated earlier in this document, should be followed for optimal behavior.</t>
      <t>Administrators should be mindful of cases where communicating nodes have differing behavior for address selection, e.g., behavior defined by <xref target="RFC3484"/>, behavior defined by <xref target="RFC6724"/>, the updated behavior defined here, some other non-IETF-standardized behavior, or even no mechanism. There may thus be inconsistent behavior for communications initiated in each direction between two nodes. Ultimately all nodes should be made compliant to the updated specification described in this document.</t>
    </section>
    <section anchor="iana-considerations">
      <name>IANA Considerations</name>
      <t>This document has no IANA actions.</t>
    </section>

    <section anchor="summary-of-changes-and-additional-text-since-rfc6724">
      <name>Summary of Changes and Additional Text Since RFC 6724</name>
      <ul spacing="normal">
        <li>
          <t>Introduced the concept of known-locals and rules for their insertion/removal in the table.</t>
        </li>
        <li>
          <t>Changed the default policy table to move fc00::/7 to precedence 30, above legacy IPv4.</t>
        </li>
        <li>
          <t>Changed the default policy table to move the 6to4 address block 2002::/16 to the same precedence as the Teredo prefix.</t>
        </li>
        <li>
          <t>Changed ::ffff:0:0/96 to precedence 20.</t>
        </li>
        <li>
          <t>Changed Rule 5.5 to a <bcp14>MUST</bcp14> support.</t>
        </li>
        <li>
          <t>Added text clarifying intended behavior.</t>
        </li>
        <li>
          <t>Added text discussing ULA to GUA/ULA case.</t>
        </li>
        <li>
          <t>Added text to the Security Considerations section.</t>
        </li>
        <li>
          <t>Added text to account for the SNAC Router flag bit.</t>
        </li>
      </ul>
    </section>
  </middle>
  <back>
    <references anchor="sec-combined-references">
      <name>References</name>
      <references anchor="sec-normative-references">
        <name>Normative References</name>
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.6724.xml"/>
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.8028.xml"/>
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.4861.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.4191.xml"/>
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.4193.xml"/>
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.7526.xml"/>
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.10075.xml"/>
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.8174.xml"/>
      </references>
      <references anchor="sec-informative-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.6555.xml"/>
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.8305.xml"/>
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.3587.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.3484.xml"/>
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.4862.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.4380.xml"/>
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.5461.xml"/>
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.7078.xml"/>
      </references>
    </references>

    <section anchor="acknowledgements" numbered="false">
      <name>Acknowledgements</name>
      <t>The authors would like to acknowledge the valuable input and contributions of the 6man WG including (in alphabetic order) <contact fullname="Erik Auerswald"/>, <contact fullname="Dale Carder"/>, <contact fullname="Brian Carpenter"/>, <contact fullname="Tom Coffeen"/>, <contact fullname="Lorenzo Colitti"/>, <contact fullname="David Farmer"/> (in particular for the ULA to GUA/ULA discussion text, and discussion of using the specific fd00::/8 prefix for known-locals), <contact fullname="Bob Hinden"/>, <contact fullname="Scott Hogg"/>, <contact fullname="Ed Horley"/>, <contact fullname="Ted Lemon"/>, <contact fullname="Jen Linkova"/>, <contact fullname="Michael Richardson"/>, <contact fullname="Kyle Rose"/>, <contact fullname="Nathan Sherrard"/>, <contact fullname="Fern Seidel"/>, <contact fullname="Ole Troan"/>, <contact fullname="Eduard Vasilenko"/>, <contact fullname="Éric Vyncke"/>, <contact fullname="Paul Wefel"/>, <contact fullname="Timothy Winters"/>, and <contact fullname="XiPeng Xiao"/>.</t>
    </section>

  </back>

</rfc>
