<?xml version="1.0" encoding="utf-8"?>
<?xml-model href="rfc7991bis.rnc"?>  <!-- Required for schema validation and schema-aware editing -->
<!-- <?xml-stylesheet type="text/xsl" href="rfc2629.xslt" ?> -->
<!-- This third-party XSLT can be enabled for direct transformations in XML processors, including most browsers -->


<!DOCTYPE rfc [
  <!ENTITY nbsp    "&#160;">
  <!ENTITY zwsp   "&#8203;">
  <!ENTITY nbhy   "&#8209;">
  <!ENTITY wj     "&#8288;">
]>
<!-- If further character entities are required then they should be added to the DOCTYPE above.
     Use of an external entity file is not recommended. -->

<rfc
  xmlns:xi="http://www.w3.org/2001/XInclude"
  category="std"
  docName="draft-collink-6man-pio-pflag-03"
  ipr="trust200902"
  obsoletes=""
  updates="4861,4862"
  submissionType="IETF"
  xml:lang="en"
  version="3">
  <front>
<title abbrev="pio-p-flag">Signalling DHCPv6 Prefix Delegation Availability to Hosts</title>
    <seriesInfo name="Internet-Draft" value="draft-collink-6man-pio-pflag-00"/>

 <author initials="L." surname="Colitti" fullname="Lorenzo Colitti">
      <organization>Google</organization>
      <address>
        <postal>
          <street>Shibuya 3-21-3</street>
          <country>Japan</country>
        </postal>
        <email>lorenzo@google.com</email>
      </address>
    </author>
    <author fullname="Jen Linkova" initials="J" surname="Linkova">
      <organization>Google</organization>
      <address>
        <postal>
          <!-- Reorder these if your country does things differently -->
          <street>1 Darling Island Rd</street>
          <city>Pyrmont</city>
          <region>NSW</region>
          <code>2009</code>
          <country>AU</country>
        </postal>        
        <email>furry13@gmail.com</email>  
        <email>furry@google.com</email>  
      </address>
    </author>
<author fullname="Xiao Ma" initials="X" role="editor" surname="Ma">
      <organization>Google</organization>
      <address>
        <postal>
          <street>Shibuya 3-21-3</street>
          <country>Japan</country>
        </postal>        
        <email>xiaom@google.com</email>  
      </address>
    </author>
<author fullname="David 'equinox' Lamparter" initials="D" surname="Lamparter">
      <organization>NetDEF, Inc.</organization>
      <address>
        <postal>
          <city>San Jose</city>
          <country>USA</country>
        </postal>
        <email>equinox@diac24.net</email>
        <email>equinox@opensourcerouting.org</email>
      </address>
    </author>

   
    <date year="2023"/>
<area>Internet</area>
    <workgroup>IPv6 Maintenance</workgroup>
    <keyword>ipv6</keyword>
    <keyword>slaac</keyword>
    <keyword>pio</keyword>
    <keyword>dhcpv6-pd</keyword>


    <abstract>
 <t>
This document defines a "P" flag in the Prefix Information Option of IPv6 Router Advertisements (RAs).
The flag is used to indicate that the network prefers that clients do not use the prefix provided in the PIO for SLAAC but request a prefix via DHCPv6 PD instead, and use that delegated prefix to form addresses.
</t>

    </abstract>
 
  </front>

  <middle>
    
    <section>
      <name>Introduction</name>
<t>
IPv6-capable devices, especially mobile devices, usually have multiple global IPv6 addresses, such as stable addresses (<xref target="RFC8064"/>), temporary addresses (<xref target="RFC8981"/>), 464XLAT addresses (<xref target="RFC6877"/>), and dedicated addresses for virtual systems such as VMs or containers. Additionally, these devices often extend the network, either externally to other devices (e.g., when tethering) or internally, to virtual systems.
</t>

<t>
Extending the network to other devices or virtual systems requires that the device provide a way for those systems to obtain IP addresses. These addresses may be part of a prefix that is delegated to the device. Or they may be obtained by the device via other means such as by running SLAAC or DHCPv6 address assignment on the shared on-link prefix, and shared with other devices via ND proxying <xref target="RFC8981"/>.
</t>
<t>On large networks, the latter mode creates scalability issues, as the network infrastructure devices need to maintain state per address: IPv6 neighbor cache, SAVI mappings (<xref target="RFC7039"/>), VXLAN routes, etc.
<xref target="I-D.ietf-v6ops-dhcp-pd-per-device"/> provides a a solution that uses DHCPv6 PD <xref target="RFC8415"/> to provide a client with a dedicated prefix, which can be used to form addresses. This solves the scaling issues because the amount of state that has to be maintained by the network does not depend on how many addresses are in use.
</t>

<t>
On small networks, scaling to support multiple individual IPv6 addresses is less of a concern, because many home routers support hundreds of neighbor cache entries.
On the other hand, address space is more limited compared to the number of hosts connected - the smallest home network might only have /60 prefixes, or even just a single /64.
In such networks delegating an unique prefix per client would not provide any notable scalability benefits and would introduce a risk of address exhaustion.

</t>

<t>
When a host connects to a network which provides a shared prefix in PIO to be used for SLAAC and also supports delegating per-host prefix via DHCPv6 PD,
the host cannot know in advance which address assignment method is most appropriate for the network.
It's desirable to have a mechanism for the network to communicate the preference to the host.
</t>
    </section>
      
      <section>
        <name>Requirements Language</name>
        <t>The key words "MUST", "MUST NOT", "REQUIRED", "SHALL",
          "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT
          RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be
          interpreted as described in BCP 14 <xref target="RFC2119"/>
          <xref target="RFC8174"/> when, and only when, they appear in
          all capitals, as shown here.</t>
      </section>


    <section anchor="rationale">
<name>Rationale</name>
<t>
The network administrator might want to indicate to hosts that requesting a prefix via DHCPv6-PD and using that prefix for address assignment (see <xref target="I-D.ietf-v6ops-dhcp-pd-per-device"/>) should be preferred over forming SLAAC addresses from the prefix provided in the PIO.
The information is passed to the host via a P flag in the Prefix Information Option (PIO). The reason for it being a PIO flag is as follows:
</t>
<ul>
<li>
The information should be contained in the Router Advertisement because it must be available to the host before it decides to form IPv6 addresses from the PIO prefix using SLAAC. Otherwise, the host might form IPv6 addresses from the PIO provided and start using them, even if a unique per-host prefix is available via DHCPv6 PD.
This is suboptimal because if the host later acquires a prefix using DHCPv6 PD, it can either use both the prefix and SLAAC addresses, reducing the scalability benefits of using DHCPv6 PD, or can remove the SLAAC addresses, which would be disruptive for applications that are using them.

</li>
<li>
This information is specific to the particular prefix being announced. For example, a network administrator might want hosts to assign global addresses from delegated prefixes, but use the PIO prefix to form ULA addresses.
Also, in a multihoming situation, one upstream network might choose to assign prefixes via prefix delegation, and another via PIOs.

</li>
</ul>

<t>Note that the prefix(es) that the client obtains via DHCPv6 PD are not related in any way to the prefix(es) in the Router Advertisement which have the P bit set.</t>

    </section>
<section anchor="Router">
<name>Router Behaviour</name>
<t>
Routers SHOULD set the P flag to zero by default, unless explicitly configured by the administrator, and SHOULD allow the opearator to set the P flag value for any given prefix.
</t>
</section>
<section anchor="host">
<name>Host Behaviour</name>
   <section anchor="track">
   <name>Tracking and requesting prefixes</name>
<t>
The host SHOULD NOT use SLAAC to obtain IPv6 addresses from prefix(es) with the P bit set.
</t>

<t>
Otherwise, for each interface, the host MUST keep a list of every PIO it has received with the P flag. Each time the client receives a Router Advertisement containing a PIO with the P bit set that is not in the list, and every time a previously-received PIO with the P bit set becomes deprecated:


</t>
<ul>
<li>
If the client has not previously received any delegated prefixes from the network, it SHOULD start DHCPv6 Prefix Delegation.

</li>
<li>
If the client has already received delegated prefix(es) from one or more
servers, it MUST consider this change in PIOs a change in configuration
information as described in <xref target="RFC8415" section="18.2.12"/>, i.e. it MUST perform
a REBIND.  This allows the host to obtain new prefixes if necessary, e.g. when
the network is being renumbered.  It also refreshes state related to the
delegated prefix(es).
</li>
</ul>

<t>
Whenever a Prefix Information Option’s Valid lifetime reaches zero, or its P flag changes to 0, the prefix is removed from the list. When there are no such prefixes, the host SHOULD stop the DHCPv6 client if it has no other reason to run it. The lifetimes of any already obtained via DHCPv6 are unaffected.
</t>

<t>
When a host requests a prefix via DHCPv6 PD, it MUST use the prefix length hint  <xref target="RFC8415" section="18.2.4"/> to request a prefix that is short enough to form addresses via SLAAC.

	 </t>
	   
	   
	   <t>
The P flag is meaningless for link-local prefixes and any Prefix Information Option containing the link-local prefix MUST be ignored as specified in <xref target="RFC4862" section="5.5.3"/>.

</t>

   </section>

<section anchor="received">
<name>
Using received prefix(es)
</name>

	<t>
		If the received prefix is too long to be used for SLAAC, the host MUST ignore it.
	If the prefix is shorter than required for SLAAC, the host SHOULD accept it, allocate one or more longer prefix suitable for SLAAC and use the prefixes as described below.
	</t>
<t>
For every accepted prefix:
</t>

<ul>
<li>
The host MAY form as many IPv6 addresses from the prefix as it chooses.
</li>
<li>
The host MAY use the prefix to provide IPv6 addresses to internal components such as virtual machines or containers.
</li>
<li>
If the host is capable of acting as a router, and doing so is allowed by local policy, it MAY use the prefix to allow devices directly connected to it to obtain IPv6 addresses, e.g., by sending a Router Advertisement containing the prefix to a connected interface.
</li>

</ul>
	
		   <t>
		   If the host doesn't obtain any suitable prefixes via DHCPv6 PD it MAY choose, as a fallback mechanism, to form addresses via SLAAC using PIOs with A flag set to 1.
	   </t>

</section>

<section anchor="p0">
<name>Absence of PIOs with P bit set</name>
<t>
The P bit is purely a positive indicator, telling nodes that DHCPv6
Prefix Delegation is available and the network prefers the node use it.
The absence of any PIOs with the P bit does not carry any kind of signal to
the opposite, and MUST NOT be processed to mean that DHCPv6-PD is absent.  In
particular, nodes that are already running DHCPv6 PD either by explicit
configuration or by default MUST NOT disable DHCPv6 PD on the absence of PIOs
with the P bit set.  A very common example of this are CE routers as described
by <xref target="RFC7084"/>.
</t>
</section>

<section anchor="addrselect">
<name>Source Address Selection</name>
<t>
For the purpose of source address selection <xref target="RFC6724"/>, if the host forms addresses from a delegated prefix, it SHOULD treat those addresses as if they were assigned to the interface on which the prefix was received. This includes placing them in the candidate set, and associating them with the outgoing interface when implementing rule 5.
</t>
</section>

</section>

<section anchor="mhoming">
<name>
Multihoming
</name>

<t>
In multi-prefix multihoming, the host generally needs to associate the prefix with the router that advertised it (see for example, <xref target="RFC6724"/> Rule 5.5). If the host supports Rule 5.5, then it SHOULD associate each prefix with the link-local address of the DHCPv6 relay from which it received the REPLY packet.
When receiving multiple REPLYs carrying the same prefix from distinct
link-local addresses, the host SHOULD associate that prefix with all of these
addresses.  This can commonly happen in networks with redundant routers and
DHCPv6 relays.


</t>

</section>

<section anchor="rfcchanges">
<name>
Modifications to RFC-Mandated Behavior 
</name>

<section>
<name>
Changes to RFC4861
</name>
<t>
This document makes the following changes to Section 4.6.2 of <xref target="RFC4861"/>,
(last updated by <xref target="RFC6275"/>):
</t>
<t>
OLD TEXT:
</t>
<t>
==
</t>
<figure align="center" anchor="fig_Option">
<artwork align="center"><![CDATA[
       0                   1                   2                   3
       0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |     Type      |    Length     | Prefix Length |L|A|R|Reserved1|
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
]]></artwork>
		      </figure>

<t>
===
</t>
<t>
NEW TEXT
</t>
<t>
===
</t>
<figure align="center" anchor="fig_Option_new">
<artwork align="center"><![CDATA[
       0                   1                   2                   3
       0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |     Type      |    Length     | Prefix Length |L|A|R|P| Rsvd1 |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
]]></artwork>
		      </figure>


<t>
OLD TEXT
</t>
<t>
===
</t>

<t>

A         1-bit autonomous address-configuration flag.  When set indicates that this prefix can be used for stateless address configuration as specified in [ADDRCONF].
</t>

<t>
Reserved1     6-bit unused field.  It MUST be initialized to zero by the sender and MUST be ignored by the receiver.
</t>


<t>
===
</t>
<t>
NEW TEXT
</t>
<t>
===
</t>
<t>

A         1-bit autonomous address-configuration flag.  When set indicates that this prefix can be used for stateless address configuration as specified in [ADDRCONF].
</t>
<t>

P             1-bit DHCPv6-PD flag. When set, indicates that this prefix SHOULD NOT be used for stateless address configuration. Instead the host SHOULD request a dedicated prefix via DHCPv6-PD and use that prefix for stateless address configuration.
</t>

<t>
Rsvd1         4-bit unused field.  It MUST be initialized to zero by the sender and MUST be ignored by the receiver.
</t>

<t>
===
</t>


</section>
<section>
<name>
Changes to RFC4862
</name>
<t>
This document makes the following changes to Section 5.5.3 of <xref target="RFC4862"/>:
</t>


<t>
OLD TEXT
</t>
<t>
===
</t>

<t>

For each Prefix-Information option in the Router Advertisement:
</t>

<t>

    a)  If the Autonomous flag is not set, silently ignore the Prefix
      Information option.
</t>

<t>
===
</t>
<t>
NEW TEXT:
	Insert the following text after "For each Prefix-Information option in the Router Advertisement:" but before "If the Autonomous flag is not set, silently ignore the Prefix Information option.":
</t>
<t>
===
</t>
<t>
a) If the P flag is set, start the DHCPv6 PD process and use the delegated prefix to assign addresses to the interfaces as described in draft-collink-6man-pio-pflag. The Prefix Information option SHOULD be processed as if A flag is set to zero.
</t>
<t>
===
</t>

</section>


</section>

    <section anchor="Security">
      <!-- All drafts are required to have a security considerations section. See RFC 3552 for a guide. -->
      <name>Security Considerations</name>
<t>
	The mechanism described in this document relies on the information provided in the Router Advertisement and therefore shares the same security model as SLAAC.
	If the network doesn't implement RA Guard <xref target="RFC6105"/>, an attacker might sent RAs containing the PIO used by the network, set P flag to 1 and force hosts to ignore A flag. 
	In the absense of DHCPv6 PD infrastructure, hosts would experience delays in obtaining IPv6 addresses (as no delegated prefixes are available, hosts MAY choose to fallback to SLAAC).
</t>
	    <t>
		    The attacker might force hosts to oscillate between DHCPv6 PD and PIO-based SLAAC by sending the same set of PIOs with and then w/o P flag set.
		    That would cause the clients to issue REBIND requests, increasing the load on the DHCP infrastructure. 
		    However Section 14.1 of <xref target="RFC8415"/> requires that DHCPv6 PD clients rate limit transmitted DHCPv6 messages.
</t>
		    
	    <t>
		    It should be noted that if the network allows rogue RAs to be sent, the attacker would be able to disrupt hosts connectivity anyway, so this document doesn't introduce any fundamentally new security considerations.
	    </t>
    </section>

    <section anchor="privacy">
      <name>Privacy Considerations</name>
      <t>
        Implementing the P flag on a host / receiving side enables other
        systems on the network to trigger running DHCPv6 on that network.
        Doing so may reveal some minor additional information about the host,
        most prominently the hostname. This is the same consideration as for
        the M flag.
      </t>
      <t>
        No privacy considerations result from supporting the P flag on the
        sender side.
      </t>
    </section>
    
    <section anchor="IANA">
    <!-- All drafts are required to have an IANA considerations section. See RFC 8126 for a guide.-->
      <name>IANA Considerations</name>
      <t>This memo requests that IANA allocate bit 3 from the "IPv6 Neighbor
        Discovery Prefix Information Option Flags" registry created by
        <xref target="RFC8425"/> for use as the P flag as described in this
        document.  The following entry should be appended:</t>
      <table>
        <thead>
          <tr><th>PIO Option Bit</th><th>Description</th><th>Reference</th></tr>
        </thead>
        <tbody>
          <tr><td>3</td><td>P - DHCPv6-PD preferred flag</td><td>[THIS DOCUMENT]</td></tr>
        </tbody>
      </table>
    </section>
    
    <!-- NOTE: The Acknowledgements and Contributors sections are at the end of this template -->
  </middle>

  <back>
    <references>
      <name>References</name>
      <references>
        <name>Normative References</name>
        
        <xi:include href="https://www.rfc-editor.org/refs/bibxml/reference.RFC.2119.xml"/>
        <xi:include href="https://www.rfc-editor.org/refs/bibxml/reference.RFC.4861.xml"/>
        <xi:include href="https://www.rfc-editor.org/refs/bibxml/reference.RFC.4862.xml"/>
        <xi:include href="https://www.rfc-editor.org/refs/bibxml/reference.RFC.6724.xml"/>
        <xi:include href="https://www.rfc-editor.org/refs/bibxml/reference.RFC.8174.xml"/>
        <xi:include href="https://www.rfc-editor.org/refs/bibxml/reference.RFC.8415.xml"/>
        <xi:include href="https://www.rfc-editor.org/refs/bibxml/reference.RFC.8425.xml"/>
        <!-- The recommended and simplest way to include a well known reference -->
        
      </references>
 
      <references>
	      <name>Informative References</name>
	      <xi:include href="https://www.rfc-editor.org/refs/bibxml/reference.RFC.4389.xml"/>
	      <xi:include href="https://www.rfc-editor.org/refs/bibxml/reference.RFC.6105.xml"/>
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml3/reference.I-D.ietf-v6ops-dhcp-pd-per-device.xml"/>
        <xi:include href="https://www.rfc-editor.org/refs/bibxml/reference.RFC.6275.xml"/>
        <xi:include href="https://www.rfc-editor.org/refs/bibxml/reference.RFC.6877.xml"/>
	      <xi:include href="https://www.rfc-editor.org/refs/bibxml/reference.RFC.7084.xml"/>
	      <xi:include href="https://www.rfc-editor.org/refs/bibxml/reference.RFC.7039.xml"/>
        <xi:include href="https://www.rfc-editor.org/refs/bibxml/reference.RFC.8064.xml"/>
        <xi:include href="https://www.rfc-editor.org/refs/bibxml/reference.RFC.8981.xml"/>

      </references>
    </references>
    
    <section anchor="Acknowledgements" numbered="false">
      <name>Acknowledgements</name>
<t>
Thanks to Fernando Gont, Suresh Krishnan, Andrew McGregor, Tomek Mrugalski, Timothy Winters for the discussions, the input and all contribution.
</t>
    </section>
    
 </back>
</rfc>
