<?xml version="1.0" encoding="US-ASCII"?>
<!DOCTYPE rfc SYSTEM "rfc2629.dtd" [
<!ENTITY RFC2119 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.2119.xml">
]>
<?xml-stylesheet type='text/xsl' href='rfc2629.xslt' ?>
<?rfc strict="yes" ?>
<?rfc toc="yes"?>
<?rfc tocdepth="4"?>
<?rfc symrefs="yes"?>
<?rfc sortrefs="yes" ?>
<?rfc compact="yes" ?>
<?rfc subcompact="no" ?>
<rfc category="info" docName="draft-kuhn-quic-bdpframe-extension-00" ipr="trust200902">
	<!-- category values: std, bcp, info, exp, and historic
     ipr values: full3667, noModification3667, noDerivatives3667
     you can add the attributes updates="NNNN" and obsoletes="NNNN"
     they will automatically be output with "(if approved)" -->

	<!-- ***** FRONT MATTER ***** -->

	<front>
		<!-- The abbreviated title is used in the page header - it is only necessary if the
         full title is longer than 39 characters -->

		<title abbrev="BDP Frame Extension">BDP Frame Extension</title>

		<author fullname="Nicolas Kuhn" initials="N" surname="Kuhn">
			<organization></organization>
			<address>
				<email>nicolas.kuhn.ietf@gmail.com</email>
			</address>
		</author>

		<author fullname="Emile Stephan" initials="E" surname="Stephan">
			<organization>Orange</organization>
			<address>
				<email>emile.stephan@orange.com</email>
			</address>
		</author>

		<author fullname="Godred Fairhurst" initials="G" surname="Fairhurst">
			<organization>University of Aberdeen</organization>
			<address>				
				<postal>
          			<street>Department of Engineering</street>
          			<street>Fraser Noble Building</street>
          			<city>Aberdeen</city>
          			<code>AB24 3UE</code>
          			<country>Scotland, UK</country>
        			</postal>

				<email>gorry@erg.abdn.ac.uk</email>
			</address>
		</author>
	
		<author fullname="Tom Jones" initials="T" surname="Jones">
			<organization>University of Aberdeen</organization>
			<address> 
				<postal>
          			<street>Department of Engineering</street>
          			<street>Fraser Noble Building</street>
          			<city>Aberdeen</city>
          			<code>AB24 3UE</code>
          			<country>Scotland, UK</country>
        			</postal>
				<email>tom@erg.abdn.ac.uk</email>
			</address>
		</author>

		<author fullname="Christian Huitema" initials="C" surname="Huitema">
			<organization>Private Octopus Inc.</organization>
			<address>
				<email>huitema@huitema.net</email>
			</address>
		</author>

		<date year="2022"/>

		<!-- If the month and year are both specified and are the current ones, xml2rfc will fill
         in the current day for you. If only the current year is specified, xml2rfc will fill
	 in the current day and month for you. If the year is not the current one, it is
	 necessary to specify at least a month (xml2rfc assumes day="1" if not specified for the
	 purpose of calculating the expiry date).  With drafts it is normally sufficient to
	 specify just the year. -->

		<!-- Meta-data Declarations -->

		<area>Transport</area>

		<workgroup>Internet Engineering Task Force</workgroup>

		<!-- WG name at the upperleft corner of the doc,
         IETF is fine for individual submissions.
	 If this element is not present, the default is "Network Working Group",
         which is used by the RFC Editor as a nod to the history of the IETF. -->

		<keyword>QUIC, 0-RTT</keyword>

		<!-- Keywords will be incorporated into HTML output
         files in a meta tag but they have no effect on text or nroff
         output. If you submit your draft to the RFC Editor, the
         keywords will be used for the search engine. -->

	<abstract>
		<t>
                This draft describes the BDP Frame extension for QUIC.
                It enables the exchange of information related to the
                path characteristics between the client
                and the server during a connection.
                This information can later be exploited
                when a new connection is established.
		</t>
	</abstract>
	</front>

	<middle>

	<section anchor="sec:introduction" title="Introduction">
		<t>
                This document proposes a method to exchange values between
                a client and the server in a interoperable manner:
		<list style="numbers">
			<t>
                        For an established connection, the
                        current RTT (current_rtt), bottleneck bandwidth
                        (current_bb) and current client IP
                        (current_client_ip) are
                        stored as saved_rtt, saved_bb and
                        saved_client_ip within a BDP_FRAME;
			</t>
			<t>
                        The BDP_FRAME can be sent to the client and
                        the client can also be notified of the values of the
			BDP_FRAME parameters; 
			</t>
			<t>
                        When resuming a session to the same IP address,
			the client is allowed to send the BDP_FRAME;
			</t>
			<t>	
			The server can then utilise the parameters from the 
			BDP_FRAME in a later new connection to the same endpoint.
			</t>
		</list>
                This method applies to any resumed QUIC session: both
                a saved_session and a recon_session can be a 0-RTT QUIC
		connection or a 1-RTT QUIC connection.
		</t>
			
		<section anchor="sec:terms_def" title="Notations and terms">
			<t>
			<list style="symbols">
				<t>
				BDP: defined below
				</t>
				<t>
                                CWND: the congestion window used by
                                server (maximum number of bytes allowed in flight by the CC)
				</t>
				<t>
				current_bb : Current estimated bottleneck bandwidth
				</t>
				<t>
                                saved_bb: Estimated bottleneck bandwidth preserved
                                from a previous connection
				</t>
				<t>
				RTT: Round-Trip Time
				</t>
				<t>
				current_rtt: Current RTT
				</t>
				<t>
                                saved_rtt: RTT preserved from a previous connection
				</t>
				<t>
				client_ip : IP address of the client
				</t>
				<t>
                                current_client_ip : Current IP address of the client
				</t>
				<t>
                                saved_client_ip : IP address of the
                                client preserved from a previous connection
				</t>
				<t>
                                remembered BDP parameters: a combination
                                of saved_rtt and saved_bb
				</t>
			</list>
			</t>
	
			<t>
                	<xref target="RFC6349"></xref>
                        defines the BDP as follows: "Derived from
                        Round-Trip Time (RTT) and network Bottleneck
                        Bandwidth (BB), the Bandwidth-Delay Product
                        (BDP) determines the Send and Received Socket
                        buffer sizes required to achieve the maximum
                        TCP Throughput."
                        This document considers the BDP
                        estimated by a server that includes all
                        buffering along the network path.
		        The estimated BDP estimated is related to the amount of 
			bytes in flight and the measured path RTT.
			</t> 
                        
			<t>
			A QUIC connection could use the procedure detailed in 
                        <xref target="RFC6349"></xref>
                        to measure the BDP, but is permitted to choose another
			method <xref target="RFC9002"></xref> . A server might be able to utilise
                        an other information to provide an estimate of the BDP. 
			</t>

			<t> Congestion controllers, such as CUBIC or RENO, could estimate the
        saved_bb and current_bb values by utilizing a combination of the
        cwnd/flight_size and the minimum RTT. A different method could be used
        to estimate the same values when using a rate-based congestion
        controller, such as BBR <xref target="I-D.cardwell-iccrg-bbr-congestion-control"></xref>. It is important to
        consider whether the methods could result in over-estimating the
        bottleneck bandwidth, and the preserved values there ought to be used
				with caution.</t>
 			


		</section>

		<section anchor="sec:req_language" title="Requirements Language">
			<t>
                        The keywords "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>
                        <xref target="RFC8174"></xref>
                        when, and only when, they appear in all capitals, as
                        shown here.
			</t>
		</section>
	
	</section>

	<section anchor="sec:bdp_frame_section" title="BDP Frame">

		<t>
                This section describes the use of a new Frame, the BDP Frame.
                The BDP Frame MUST be considered by the congestion controller
                and its data is not be limited by flow control limits. The server and the client MAY
                send multiple BDP Frames in both 1-RTT and 0-RTT connections. 
		</t>

		<section anchor="sec:bdp_metadata" title="BDP Frame Format">

			<t>
        	        A BDP Frame is formatted as shown in <xref target="fig:bdp_frame_format"></xref>.
			</t>

<figure anchor="fig:bdp_frame_format" title="BDP Frame Format">
<artwork>
BDP Frame {
  Type (i) = 0xXXX,
  Lifetime (i),
  Saved BB (i),
  Saved RTT (i),
  Saved IP length (i),
  Saved IP (...)
}
</artwork>
</figure>
			<t>
                	A BDP Frame contains the following fields: 
                	<list style="symbols">
			<t>
                        Lifetime (extension_lifetime):
                        The extension_lifetime is a value in milliseconds,
                        encoded as a variable length integer. This follows the design
                        of a NewSessionTicket of TLS  <xref target="RFC8446"></xref>.
			This represents the validity in time of this extension.
			</t> 

			<t>
                        Saved BB
                        (saved_bb): The
                        saved_bb is a value in bytes, encoded as a variable length integer. The
                        bottleneck bandwidth estimated for the previous connection by
			the server.
			Using the previous values of bytes_in_flight defined in 
                        <xref target="RFC9002"></xref>
			can result in overshoot of
			the bottleneck capacity and is not advised.
			</t>

			<t>
                        Saved RTT
                        (saved_rtt): The
                        saved_rtt is a value in
                        milliseconds, encoded as
                        a variable length integer.
                        This could be set to 
                        the minimum RTT (min_rtt). The
                        saved_rtt can be set to the
                        min_rtt.  NOTE: The min_rtt defined in 
                        <xref
                        target="RFC9002"></xref>, does not track a
                        decreasing RTT: therefore the
                        min_rtt reported might be larger than the
                        actual minimum RTT measured during the 1-RTT
                        connection.
			</t>
			<t>
			Saved IP length (saved_ip_length) : The 
			length of the IP address in octets is set to either 4
			(IPv4) or 16 (IPv6).
			</t>
			<t>
                        Saved IP (saved_client_ip) : The
                        saved_client_ip could be set to
                        the IP address of the client.
			</t>
			</list>
			</t>
		</section>

		<section anchor="sec:bdp_activation" title="Extension activation">
			<t>
                	The client can accept the transmission
                	of BDP Frames from the server by using
                	the enable_bdp transport
                	extension.
			</t>
			<t>
                	enable_bdp (0xTBD): in the 1-RTT
                	connection, the client indicates to the
                	server that it wishes to receive BDP
                	extension Frames for improving ingress
                	of 0-RTT connection. The default value is 0.
                	Values larger than 3 are invalid, and
                	receipt of these values MUST be treated
                	as a connection error of type
                	TRANSPORT_PARAMETER_ERROR.
			</t>
			<t><list style="symbols">
				<t>
                	        0: Default value. If the client
                	        does not send this parameter,
                	        the server considers that the
                	        client does not support or does
                	        not wish to activate the BDP
                	        extension.
				</t>
				<t>
                	        1: The client indicates to the
                	        server that it wishes to receive
                	        BDP Frame and activates the
                	        ingress optimization for the
                	        0-RTT connection.
				</t>
				<t>
                	        2: The client indicates that it
                	        does not wish to receive BDP
                	        Frames but activates ingress
                	        optimization.
				</t>
				<t>
                	        3: The client indicates that it
                	        wishes to receive BDP Frames, but
                	        does not activate ingress
                	        optimization.
				</t>
			</list></t>
			<t>
                	This Transport Parameter is encoded as
                	described in Section 18 of 
                	<xref target="RFC9000"></xref>.
			</t>
		</section>
	</section>

	<section anchor="sec:discuss" title="Discussion">
		<t>
                With the BDP Frame extension, the client has the choice
                of accepting the reuse of the previous parameters or not.
		</t>
		<t>
                The BDP metadata parameters are measured by
                the server during a previous
                connection. The BDP extension is
                protected by the mechanism that
                protects the exchange of the 0-RTT
                transport parameters. For version 1 of
                QUIC, the BDP extension is protected
                using the mechanism that already
                protects the "initial_max_data"
                parameter. This is defined in sections
                4.5 to 4.7 of 
                <xref target="RFC9001"></xref>.
                This provides a way for the server to
                verify that the parameters proposed by the
                client are the same as those that the server
                sent to the client during the previous
                connection.
		</t>

		<t>
                The server SHOULD NOT trust
                the client. Indeed, even if 0-RTT
                packets containing the BDP Frame are
                encrypted, a client could modify the
                values within the extension and
                encrypt the 0-RTT packet.
                Authentication mechanisms
                might not guarantee that
                the values are safe.
                It is not an easy operation for a client
                to modify authenticated or encrypted data
                without this being detected by a server.
                Modification could be realized by malicious clients.
                One way to avoid this is for a server to also 
                store the saved_rtt and saved_bb parameters.
		</t>

	</section>
	
	<section anchor="sec:acknowledgments" title="Acknowledgments">
		<t>
                The authors would like to thank Gabriel Montenegro,
                Patrick McManus, Ian Swett, Igor Lubashev, Robin Marx,
                Roland Bless and Franklin Simo for their fruitful
                comments on earlier versions of this document.
		</t>
	</section>

	<section anchor="sec:IANA" title="IANA Considerations">
		<t>
                TBD: Text is required to register the BDP Frame and the
                enable_bdp transport parameter. Parameters are
                registered using the procedure defined in 
                <xref target="RFC9000"></xref>.
		</t>
	</section>

	<section anchor="sec:security" title="Security Considerations">
		<t>
                Security considerations are discussed in 
                <xref target="sec:discuss"></xref>.
                </t>
	</section>
	</middle>

	<!--  *****BACK MATTER ***** -->
	<back>
		<!-- References split into informative and normative -->
		<!-- There are 2 ways to insert reference entries from the citation libraries:
	1. define an ENTITY at the top, and use "ampersand character"RFC2629; here (as shown)
	2. simply use a PI "less than character"?rfc include="reference.RFC.2119.xml"?> here
	(for I-Ds: include="reference.I-D.narten-iana-considerations-rfc2434bis.xml")
	Both are cited textually in the same manner: by using xref elements.
	If you use the PI option, xml2rfc will, by default, try to find included files in the same
	directory as the including file. You can also define the XML_LIBRARY environment variable
	with a value containing a set of directories to search.  These can be either in the local
	filing system or remote ones accessed by http (http://domain/dir/... ).-->

		<references title="Normative References">		
			<?rfc include="reference.RFC.2119.xml"?>
			<?rfc include="reference.RFC.6349.xml"?>
			<?rfc include="reference.RFC.8174.xml"?>
			<?rfc include="reference.RFC.8446.xml"?>
			<?rfc include="reference.RFC.9000.xml"?>
			<?rfc include="reference.RFC.9001.xml"?>
			<?rfc include="reference.RFC.9002.xml"?>
		</references>
			
		<references title="Informative References">
			<?rfc include="reference.I-D.cardwell-iccrg-bbr-congestion-control.xml"?>
			<!--
			<reference anchor="TMA18">
				<front>
					<title>Demystifying TCP Initial Window Configurations of Content Distribution Networks</title>
					<author initials="J" surname="Ruth">
					</author>
					<author initials="O" surname="Hohlfeld">
					</author>
					<date year="2018"/>
				</front>
				<seriesInfo name="2018 Network Traffic Measurement and Analysis Conference (TMA)" value=""/>
			</reference>
			--> 
		</references>
		<!-- <section anchor="appendix-numerical" title="Example">
			<t> TBD </t>
		</section> -->
	</back>
</rfc>
