<?xml version='1.0' encoding='utf-8'?>
<!DOCTYPE rfc [
  <!ENTITY nbsp    "&#160;">
  <!ENTITY zwsp   "&#8203;">
  <!ENTITY nbhy   "&#8209;">
  <!ENTITY wj     "&#8288;">
]>
<?xml-stylesheet type="text/xsl" href="rfc2629.xslt" ?>
<!-- generated by https://github.com/cabo/kramdown-rfc version 1.7.29 (Ruby 3.4.4) -->
<rfc xmlns:xi="http://www.w3.org/2001/XInclude" ipr="trust200902" docName="draft-munizaga-quic-new-preferred-address-00" category="std" consensus="true" tocInclude="true" sortRefs="true" symRefs="true" version="3">
  <!-- xml2rfc v2v3 conversion 3.30.2 -->
  <front>
    <title>QUIC New Server Preferred Address</title>
    <seriesInfo name="Internet-Draft" value="draft-munizaga-quic-new-preferred-address-00"/>
    <author fullname="Marco Munizaga">
      <organization>Ethereum Foundation</organization>
      <address>
        <email>marco@marcopolo.io</email>
      </address>
    </author>
    <author fullname="Marten Seemann">
      <organization>Smallstep</organization>
      <address>
        <email>martenseemann@gmail.com</email>
      </address>
    </author>
    <date year="2025" month="October" day="15"/>
    <area>Transport</area>
    <workgroup>QUIC</workgroup>
    <keyword>Internet-Draft</keyword>
    <abstract>
      <?line 55?>

<t>This document specifies an extension to QUIC to allow a server to request a
migration to a new preferred address.</t>
    </abstract>
    <note removeInRFC="true">
      <name>About This Document</name>
      <t>
        The latest revision of this draft can be found at <eref target="https://marcopolo.github.io/new-preferred-address/draft-munizaga-quic-new-preferred-address.html"/>.
        Status information for this document may be found at <eref target="https://datatracker.ietf.org/doc/draft-munizaga-quic-new-preferred-address/"/>.
      </t>
      <t>
        Discussion of this document takes place on the
        QUIC Working Group mailing list (<eref target="mailto:quic@ietf.org"/>),
        which is archived at <eref target="https://mailarchive.ietf.org/arch/browse/quic/"/>.
        Subscribe at <eref target="https://www.ietf.org/mailman/listinfo/quic/"/>.
      </t>
      <t>Source for this draft and an issue tracker can be found at
        <eref target="https://github.com/MarcoPolo/new-preferred-address"/>.</t>
    </note>
  </front>
  <middle>
    <?line 60?>

<section anchor="introduction">
      <name>Introduction</name>
      <t>The QUIC transport protocol allows a client to migrate connections at any time
to any new address (<xref section="9" sectionFormat="of" target="QUIC-TRANSPORT"/>). This allows the connection
to survive changes to the client's address. QUIC also allows a server to migrate
to a different address, but only a single time, and only to an address specified
at the start of a connection via the Server's Preferred Address (<xref section="9.6" sectionFormat="of" target="QUIC-TRANSPORT"/>). For some applications, including those where the server
and client are peers, limiting the server to only a single migration at the
beginning is too limiting. This document specifies an extension to QUIC to allow
a server to request a migration to a new preferred address.</t>
      <t>This document defines a new transport parameter that indicates support of this
extension and specifies a new frame type to inform the client of the server's
new preferred address.</t>
    </section>
    <section anchor="conventions-and-definitions">
      <name>Conventions and Definitions</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 14 <xref target="RFC2119"/> <xref target="RFC8174"/> when, and only when, they
appear in all capitals, as shown here.</t>
      <?line -18?>

</section>
    <section anchor="motivation">
      <name>Motivation</name>
      <t>In peer to peer networks, the role of server and client is arbitrary. An
endpoint may serve as a client in one connection and a server in another.
Limiting connection migration to clients limits the flexibility of endpoints in
this network. A peer in this network would like to migrate all of its
connections, not just the ones it happens to be a client in.</t>
      <t>While it is not the primary goal, this extension may also assist in NAT
traversal by migrating to a dynamically chosen server address. A server could
have a client connect over a relay, and later migrate to a direct connection
after applying NAT traversal techniques. The specific NAT traversal techniques
are out of scope of this document.</t>
    </section>
    <section anchor="negotiating-extension-use">
      <name>Negotiating Extension Use</name>
      <t>new_preferred_address (0xff0969d85c):</t>
      <t>Clients advertise their support of this extension by sending the
new_preferred_address (0xff0969d85c) transport parameter (<xref section="7.4" sectionFormat="of" target="QUIC-TRANSPORT"/>) with an empty value. Sending this transport parameter signals
to the server that the client understands the NEW_PREFERRED_ADDRESS frame.</t>
      <t>Servers <bcp14>MUST NOT</bcp14> send this transport parameter. A client that supports this
extension and receives this transport parameter <bcp14>MUST</bcp14> abort the connection with a
TRANSPORT_PARAMETER_ERROR.</t>
      <t>Endpoints <bcp14>MUST NOT</bcp14> remember the value of this extension for 0-RTT.</t>
    </section>
    <section anchor="new-preferred-address-frame">
      <name>New Preferred Address Frame</name>
      <t>A server can use an NEW_PREFERRED_ADDRESS frame to request the client to
migrate the connection to the provided server address. Upon receiving an
NEW_PREFERRED_ADDRESS, the client <bcp14>MAY</bcp14> initiate migration. If the
client does migrate it <bcp14>MUST</bcp14> adhere to the client behavior defined in <xref section="9.6" sectionFormat="of" target="QUIC-TRANSPORT"/>.</t>
      <t>The NEW_PREFERRED_ADDRESS is defined as follows:</t>
      <artwork><![CDATA[
NEW_PREFERRED_ADDRESS Frame {
  Type (i) = 0x1d5845e2,
  Sequence Number (i),
  IPv4 Address (32),
  IPv4 Port (16),
  IPv6 Address (128),
  IPv6 Port (16),
}
]]></artwork>
      <t>Following the common frame format described in <xref section="12.4" sectionFormat="of" target="QUIC-TRANSPORT"/>, NEW_PREFERRED_ADDRESS frames have a type of 0x1d5845e2, and
contain the following fields:</t>
      <dl>
        <dt>Sequence Number:</dt>
        <dd>
          <t>A variable-length integer representing the sequence number assigned to the
NEW_PREFERRED_ADDRESS frame by the sender so receivers can ignore obsolete
frames. A sending endpoint <bcp14>MUST</bcp14> send monotonically increasing values in the
Sequence Number field to allow obsolete NEW_PREFERRED_ADDRESS frames to be
ignored when packets are processed out of order.</t>
        </dd>
        <dt>IPv4 and IPv6 Address and Port:</dt>
        <dd>
          <t>Analogous to the preferred_address transport parameter, this frame contains an
address and port for both IPv4 and IPv6. The four-byte IPv4 Address field is
followed by the associated two-byte IPv4 Port field. This is followed by a
16-byte IPv6 Address field and two-byte IPv6 Port field.</t>
        </dd>
      </dl>
      <t>NEW_PREFERRED_ADDRESS frames are ack-eliciting, and <bcp14>MUST</bcp14> only be sent in the
application data packet number space.</t>
      <t>The server <bcp14>SHOULD</bcp14> ensure that its peer has a sufficient number of available and
unused connection IDs, as the client will be unable to migrate without an unused
connection ID. The server <bcp14>MAY</bcp14> bundle a NEW_CONNECTION_ID frame with the
NEW_PREFERRED_ADDRESS. Likewise, the client should ensure the same to allow the
server to probe new paths.</t>
    </section>
    <section anchor="security-considerations">
      <name>Security Considerations</name>
      <section anchor="request-forgery-attacks">
        <name>Request Forgery Attacks</name>
        <t>The same considerations from <xref section="21.5" sectionFormat="of" target="QUIC-TRANSPORT"/> apply here as
well.</t>
      </section>
      <section anchor="ddos-thundering-herd">
        <name>DDoS - Thundering herd</name>
        <t>A malicious server could wait until it has received a large number of clients,
and request a migration from all of them at the same time to a victim endpoint.
If the clients all migrate at the same time, they may overload or otherwise
negatively impact the victim endpoint.</t>
        <t>Clients may mitigate this by randomly delaying the migration.</t>
      </section>
    </section>
    <section anchor="iana-considerations">
      <name>IANA Considerations</name>
      <section anchor="quic-transport-parameter">
        <name>QUIC Transport Parameter</name>
        <t>This document registers the new_preferred_address transport parameter in the "QUIC
Transport Parameters" registry established in <xref section="22.3" sectionFormat="of" target="QUIC-TRANSPORT"/>. The following fields are registered:</t>
        <dl>
          <dt>Value:</dt>
          <dd>
            <t>0xff0969d85c</t>
          </dd>
          <dt>Parameter Name:</dt>
          <dd>
            <t>new_preferred_address</t>
          </dd>
          <dt>Status:</dt>
          <dd>
            <t>Provisional</t>
          </dd>
          <dt>Specification:</dt>
          <dd>
            <t>This document</t>
          </dd>
          <dt>Change Controller:</dt>
          <dd>
            <t>IETF (iesg@ietf.org)</t>
          </dd>
          <dt>Contact:</dt>
          <dd>
            <t>Marco Munizaga (marco@marcopolo.io)</t>
          </dd>
        </dl>
      </section>
      <section anchor="quic-frame-types">
        <name>QUIC Frame Types</name>
        <t>This document registers one new value in the "QUIC Frame Types" registry
established in <xref section="22.4" sectionFormat="of" target="QUIC-TRANSPORT"/>. The following fields are
registered:</t>
        <dl>
          <dt>Value:</dt>
          <dd>
            <t>0x1d5845e2</t>
          </dd>
          <dt>Frame Type Name:</dt>
          <dd>
            <t>NEW_PREFERRED_ADDRESS</t>
          </dd>
          <dt>Status:</dt>
          <dd>
            <t>Provisional</t>
          </dd>
          <dt>Specification:</dt>
          <dd>
            <t>This document</t>
          </dd>
          <dt>Change Controller:</dt>
          <dd>
            <t>IETF (iesg@ietf.org)</t>
          </dd>
          <dt>Contact:</dt>
          <dd>
            <t>Marco Munizaga (marco@marcopolo.io)</t>
          </dd>
        </dl>
      </section>
    </section>
  </middle>
  <back>
    <references anchor="sec-normative-references">
      <name>Normative References</name>
      <reference anchor="QUIC-TRANSPORT">
        <front>
          <title>QUIC: A UDP-Based Multiplexed and Secure Transport</title>
          <author initials="J." surname="Iyengar" fullname="Jana Iyengar" role="editor">
            <organization>Fastly</organization>
          </author>
          <author initials="M." surname="Thomson" fullname="Martin Thomson" role="editor">
            <organization>Mozilla</organization>
          </author>
          <date year="2021" month="May"/>
        </front>
        <seriesInfo name="RFC" value="9000"/>
        <seriesInfo name="DOI" value="10.17487/RFC9000"/>
      </reference>
      <reference anchor="RFC2119">
        <front>
          <title>Key words for use in RFCs to Indicate Requirement Levels</title>
          <author fullname="S. Bradner" initials="S." surname="Bradner"/>
          <date month="March" year="1997"/>
          <abstract>
            <t>In many standards track documents several words are used to signify the requirements in the specification. These words are often capitalized. This document defines these words as they should be interpreted in IETF documents. This document specifies an Internet Best Current Practices for the Internet Community, and requests discussion and suggestions for improvements.</t>
          </abstract>
        </front>
        <seriesInfo name="BCP" value="14"/>
        <seriesInfo name="RFC" value="2119"/>
        <seriesInfo name="DOI" value="10.17487/RFC2119"/>
      </reference>
      <reference anchor="RFC8174">
        <front>
          <title>Ambiguity of Uppercase vs Lowercase in RFC 2119 Key Words</title>
          <author fullname="B. Leiba" initials="B." surname="Leiba"/>
          <date month="May" year="2017"/>
          <abstract>
            <t>RFC 2119 specifies common key words that may be used in protocol specifications. This document aims to reduce the ambiguity by clarifying that only UPPERCASE usage of the key words have the defined special meanings.</t>
          </abstract>
        </front>
        <seriesInfo name="BCP" value="14"/>
        <seriesInfo name="RFC" value="8174"/>
        <seriesInfo name="DOI" value="10.17487/RFC8174"/>
      </reference>
    </references>
    <?line 245?>

<section numbered="false" anchor="acknowledgments">
      <name>Acknowledgments</name>
      <t>TODO acknowledge.</t>
    </section>
    <section numbered="false" anchor="todos">
      <name>TODOs</name>
    </section>
    <section numbered="false" anchor="questions">
      <name>Questions</name>
      <ul spacing="normal">
        <li>
          <t>Any new security conserations from allowing a dynamically chosen preferred
address?</t>
        </li>
        <li>
          <t>Any new security conserations from allowing a deferred chosen preferred
address?</t>
        </li>
      </ul>
    </section>
  </back>
  <!-- ##markdown-source:
H4sIAAAAAAAAA81Z23IbNxJ9x1dg6YfYWyJFKrJis3JjRGqjlHVZit5UKpVS
gTMgifUMQA8wpBmX8y37LftlexrADIfSyJXdp9ULSQzQ3Th9Oz3qdrvMKZfJ
Ie/8/e3lOb+WW34ni40s+G0hF7IoZMpHaVpIazssEU4uTbEbcutSlppEixxH
00IsXDcvtfpdLEX3famSrpbb7rqS0BVBQrffZ0ytiyF3RWndSb//un/CRCEF
9M8Koe3aFK7DtqZ4tyxMuY5mddg7ucNiOuSX2slCS9cdk1K2kbqUQ8b54XbO
3W5Nl/oZkpRe8r/RY1rPhcqwTjZ+r6Rb9EyxpHVRJCusr5xb2+HxMW2jJbWR
vWrbMS0czwuztfKYBBzTwaVyq3KOo1d4bG5NZo5b7057M+Bn3YEanFnjTC+I
6aknTh//aYx7K5dnHcasEzq9F5nRwGEnLbNQ5u7flwY2DLk2bK2G/FdnkiNu
gTrkWHzb5fTlN8ZE6VamALRdGM75osyy4G1/T34VLfEPAY6gn04ZPeQTt5KF
LHN+YUqd+kW/Swbs/Z2/399cmVY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