<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE rfc SYSTEM "rfc2629.dtd" [    	
		<!ENTITY rfc2629 PUBLIC '' 'http://xml.resource.org/public/rfc/bibxml/reference.RFC.2629.xml'> 
		]>
<?xml-stylesheet type='text/xsl' href='rfc2629.xslt' ?>
<?rfc toc="yes"?>
<?rfc symrefs="yes"?>
<?rfc sortrefs="yes"?>
<?rfc iprnotified="no"?>
<?rfc strict="yes"?>
<?rfc compact="yes"?>
<?rfc subcompact="yes"?>
<rfc category="info"
     docName="draft-tan-quic-connection-migration-00"
     ipr="trust200902">
  <front>
    <title abbrev="QUIC Connection Migration">Connection Migration in QUIC</title>
	
<author fullname="Lizhuang Tan" initials="L" surname="Tan">
    <organization>Beijing Jiaotong University</organization>
    <address>
        <postal>
            <street>Shangyuan Cun. 3.</street>
            <city>Haidian, Beijing</city>
            <country>China</country>
            <code>100044</code>
        </postal>
    <email>lzhtan@bjtu.edu.cn</email>
    </address>
</author>

<author fullname="Xiaochuan Gao" initials="X" surname="Gao">
	<organization>China Unicom</organization>
	<address>
		<postal>
			<street>Zhonghe Street. 1.</street>
			<city>Daxing, Beijing</city>
			<country>China</country>
			<code>100176</code>
		</postal>
		<email>gaoxc50@chinaunicom.cn</email>
	</address>
</author>

<author fullname="Wei Su" initials="W" surname="Su">
    <organization>Beijing Jiaotong University</organization>
    <address>
        <postal>
            <street>Shangyuan Cun. 3.</street>
            <city>Haidian, Beijing</city>
            <country>China</country>
            <code>100044</code>
        </postal>
        <email>wsu@bjtu.edu.cn</email>
    </address>
</author>

<author fullname="Na Li" initials="N" surname="Li">
    <organization>CNCERT/SD</organization>
    <address>
        <postal>
            <street>Jingshiyi Road. 40.</street>
            <city>Shizhong, Jinan</city>
            <country>China</country>
            <code>250002</code>
        </postal>
        <email>lina@cert.org.cn</email>
    </address>
</author>

<author fullname="Wei Zhang" initials="W" surname="Zhang">
    <organization>Shandong Computing Science Center</organization>
    <address>
            <postal>
                <street>Keyuan Road. 19.</street>
                <city>Lixia, Jinan</city>
                <country>China</country>
                <code>250014</code>
            </postal>
            <email>wzhang@qlu.edu.cn</email>
    </address>
</author>

<date/>
<workgroup>QUIC WG</workgroup>
<keyword>QUIC, Connection Migration, Internet-Draft</keyword>
<abstract>
    <t>
    This document explores and classifies QUIC connection migration, and suggests possible improvements.
    </t>
</abstract>
</front>

  <middle>
    <section title="Introduction" anchor="sec_intro"><!--1--> 
	  <t>
	  This document explores and classifies QUIC connection migration in detail.
	  </t>
    </section>

    <section title="Terminology"><!--2-->
      <section title="Terms Used In This Document"><!--2.1-->
        <t>
        This document uses the terminology and concepts established in <xref target="QUIC-TRANSPORT"></xref>.
		It is assumed that the reader is familiar with the above document and the terms defines there.
        </t>
		
		<t>
        The following terms used in this document:
		  <list style="hanging" hangIndent="14">
		  	<t hangText="Endpoint">An entity that can participate in a QUIC connection by generating, receiving, and processing QUIC packets. There are only two types of endpoint in QUIC: client and server.</t>
			<t hangText="QUIC Client">The endpoint that initiates a QUIC connection.</t>
			<t hangText="QUIC Server">The endpoint that accepts a QUIC connection.</t>
			<t hangText="Connection ID">An identifier that is used to identify a QUIC connection at an endpoint. Each endpoint selects one or more Connection IDs for its peer to include in packets sent towards the endpoint. This value is opaque to the peer.</t>
			<t hangText="Connection migration">The QUIC endpoint uses the connection ID to make connections to survive changes to endpoint addresses.</t>
			<t hangText="Connection migration initiator">The endpoint that initiated the connection migration.</t>
			<t hangText="Connection migration responder">The peer communicating with the connection migration initiator.</t>
			<t hangText="Path validation">Endpoints test reachability between a specific local address and a specific peer address.</t>
			<t hangText="Probing frame">A Frame with probing function, such as PATH_CHALLENGE, PATH_RESPONSE, NEW_CONNECTION_ID, and PADDING frame.</t>
			<t hangText="Non-probing frame">A frame except the probing frame.</t>
			<t hangText="Probing packet">A packet containing only probing frame.</t>
			<t hangText="Non-probing packet">A packet containing any other non-probing frame.</t>
			<t hangText="Application">An entity that uses QUIC to send and receive data.</t>
		  </list>
        </t>
      </section>

      <section title="Abbreviations"><!--2.2-->
        <t>
        The following abbreviations used in this document:
          <!-- [JiK] Update later -->
          <list style="hanging" hangIndent="14">
		    <t hangText="CM">Connection Migration.</t>
			<t hangText="ACM">Active Connection Migration.</t>
		    <t hangText="PCM">Passive Connection Migration.</t>
			<t hangText="VCM">Vertical Connection Migration.</t>
			<t hangText="HCM">Horizontal Connection Migration.</t>
            <t hangText="CCM">Client Connection Migration.</t>
			<t hangText="SCM">Server Connection Migration.</t>
			<t hangText="SPCM">Single-path Connection Migration.</t>
			<t hangText="MPCM">Multi-path Connection Migration.</t>
          </list>
        </t>
      </section>
	</section>

<section title="Connection Migration"  anchor="Process">
	<t>
	QUIC connections are not strictly bound to a single network path.
	Connection migration is one of the important features of QUIC.
	</t>
	<t>
	The QUIC endpoint that initiates the connection migration is called the connection migration initiator (CM Initiator).
	The peer is the connection migration responder (CM Responder).
	</t>
	<t>
	Connection migration uses connection ID to allow connections to transfer to a new network path.
	The use of a connection ID allows connections to survive changes to endpoint addresses (IP address and port), such as those caused by an endpoint migrating to a new network, as shown in Figure <xref target="migration"/>.
	</t>
	<t>
	The connection ID MUST be non-zero.
	</t>
	<figure title="The connection migration" anchor="migration">
		<artwork>
         <![CDATA[
       (Before connection migration) 
       +--------------+   Non-probing Packet   +--------------+
       | CM Initiator |  ------------------->  |              |
       |(Source IP: 1)|  <-------------------  |              |
       +--------------+   Non-probing Packet   |              |
              |                                |              |
              |                                |              |
              |                                |              |
              v             Probing Packet     |              |
       +--------------+    (PATH_CHALLENGE)    |              |
       |              |  ------------------->  |              |
       |              |  <-------------------  |              |
       |              |     Probing Packet     |              |
       |              |     (PATH_RESPONSE)    |              |
       |              |                        | CM Responder |
       |              |     Probing Packet     |              |
       |              |    (PATH_CHALLENGE)    |              |
       | CM Initiator |  <-------------------  |              |
       |(Source IP: 2)|  ------------------->  |              |
       |              |     Probing Packet     |              |
       |              |     (PATH_RESPONSE)    |              |
       |              |                        |              |
       |              |   Non-probing Packet   |              |
       |              |  ------------------->  |              |
       |              |  <-------------------  |              |
       |              |   Non-probing Packet   |              |
       +--------------+                        +--------------+
       (After connection migration)
         ]]>
		</artwork>
	</figure>
	<section title="Initiating Connection Migration">
	<t>
	An CM Initiator can migrate a connection to a new local address by sending packets containing non-probing frames from that address.
	</t>
	</section>
	<section title="Path Verification">
		<t>
		The endpoint sends a PATH_CHALLENGE frame containing a random number to initialize path verification.
		Each endpoint validates its peer’s address during connection establishment.
		Therefore, a migrating endpoint can send to its peer knowing that the peer is willing to receive at the peer’s current address.
		</t>
		<t>
		Path verification MUST be performed for most connection migrations, unless the endpoints have verified the path, the reason is to verify the reachability and security of the path.
		But in some special cases, the connection migration initiator should be allowed to send data packets directly without path confirmation from the peer.
		The condition is to ensure that the packet received by connection migration responder does not carry a spoofed source address.
		</t>
		<t>
		Endpoints can use PATH_CHALLENGE frames (type=0x1a) to check reachability to the peer and for path validation during connection migration.
		</t>
		<t>
		PATH_CHALLENGE frames are formatted as shown in Figure <xref target="challenge"/>.
		</t>
		<t>
		A PATH_RESPONSE frame (type=0x1b) is sent in response to a PATH_CHALLENGE frame.
		</t>
		<t>
		PATH_RESPONSE frames are formatted as shown in Figure <xref target="response"/>.
		</t>
	
	<figure title="PATH_CHALLENGE Frame Format" anchor="challenge">
		<artwork>
         <![CDATA[ 
  +-+-+-+-+-+-+-+-+
  |      0x1a     |
  +-+-+-+-+-+-+-+-++-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  |                           Data (64)                          |
  +-+-+-+-+-+-+-+-++-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 
		 ]]>
		</artwork>
	</figure>
	
	<figure title="PATH_RESPONSE Frame Format" anchor="response">
		<artwork>
         <![CDATA[ 
  +-+-+-+-+-+-+-+-+
  |      0x1b     |
  +-+-+-+-+-+-+-+-++-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  |                           Data (64)                          |
  +-+-+-+-+-+-+-+-++-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 
		 ]]>
		</artwork>
	</figure>
	</section>
	<section title="Completing Connection Migration">
	<t>
	The endpoint receives a packet containing the new peer address of the non-probing frame from the peer, indicating that the connection migration initiator has migrated to this address.
	</t>
	<t>
	After the connection is migrated, the endpoints need to reset the congestion control parameters.
	</t>
	</section>
	<section title="Special Cases">
	<t>
	Some situations that do not allow connection migration:
	</t>
	<t>
		<list style="numbers">
		<t>An endpoint MUST NOT initiate connection migration before the handshake is confirmed, as defined in section 4.1.2 of <xref target="QUIC-TLS"></xref>.</t>
		<t>An endpoint MUST NOT initiate connection migration if the peer sent the disable_active_migration transport parameter.</t>
		</list>
	</t>
	<t>
	The section 9.1 of <xref target="QUIC-TRANSPORT"></xref> analyzes several potential security problems and solutions in the process of connection migration.
	</t>
	</section>
</section>

<section title="Classification of Connection Migration"  anchor="classification">
    <t>
    According to business scenarios, connection migration can be divided into multiple types, which involve different implementation technologies.
    </t>
	 	  
	 <section title="Active Connection Migration and Passive Connection Migration">
        <t>
        According to different initiators, connection migration can be divided into Active Connection Migration (ACM) and Passive Connection Migration (PCM).
		</t>
		<t>
		From the perspective of the network model, ACM can be regarded as connection migration initiated by the application layer, and PCM can be regarded as connection migration initiated by the IP layer or lower layers.
        </t>
		<t>
        ACM requires the IP layer to present all available network connections to QUIC. 
		The application layer or QUIC designs an effective connection migration strategy according to the measurement results of different network connections to achieve better user experience, security and economy.
		Available migration strategies include threshold-driven migration, polling migration, random migration, etc.
        </t>
		<t>
        The purpose of PCM is to maintain the connection between the QUIC client and the QUIC server in a mobile or weak network environment. QUIC is often forced to adapt to PCM.
		In addition, NAT/NAPT will also cause QUIC endpoints to perform forced connection migration.
        </t>
	</section>
	  	  
	<section title="Vertical Connection Migration and Horizontal Connection Migration">
        <t>
		Due to the movement of QUIC terminals or access networks, QUIC needs to support connection migration in a multi-network access environment.
		Therefore, connection migration in this situation can be divided into Vertical Connection Migration (VCM) and Horizontal Connection Migration (HCM).
		</t>
		<t>
		VCM occurs between heterogeneous networks and HCM occurs in homogeneous networks.
		Due to temporal and spatial changes, VCM and HCM MAY occur alternately or simultaneously.
		Since the HCM occurs under a homogeneous network, the network before migration MAY have some similarities with the network after migration.
		This guides QUIC to better maintain connections by drawing on historical information.
		</t>
	</section>
	
	<section title="Client Connection Migration and Server Connection Migration">
        <t>
		In most cases, the QUIC server is stationary. QUIC connection migration occurs on the QUIC client side.
		However, in scenarios such as P2P networks, mobile servers, and data center four-layer load balancing, both endpoints of QUIC communication MAY undergo connection migration.
		</t>
		<t>
		According to the location, connection migration is divided into Client Connection Migration (CCM) and Server Connection Migration (SCM).
		</t>
		<t>
		The section 9 of <xref target="QUIC-TRANSPORT"></xref> stipulates that only QUIC clients can actively initiate connection migration.
		The client MUST discard packets from unknown servers. 
		The section 9.6 of <xref target="QUIC-TRANSPORT"></xref> describes the scene when clients initially connect to an address shared by multiple servers but would prefer to use a unicast address to ensure connection stability.  
		So we believe that the client and server should be equal, and SCM is necessary.
		</t>
	</section>
	
	<section title="Single-path Connection Migration and Multi-path Connection Migration">
        <t>
		According to the number of connection paths maintained between the client and the server during connection migration, connection migration can be divided into single-path connection migration (SPCM) and multi-path connection migration (MPCM).
		</t>
		<t>
		SPCM is a simple and common form of connection migration.
		However, in the future, with the continuous development of heterogeneous converged networks, it is also possible for endpoints to perform connection migration while maintaining multi-path transmission.
		It is worth noting that there is a difference between MPCM and MPQUIC <xref target="QUIC-MPQUIC"></xref>. MPCM is an event that MAY occur during MPQUIC transmission.
		Therefore, MPCM has more decision variables than SPCM.
		</t>
	</section>
</section>

<section title="Connection Migration Strategy" anchor="strategy">
	<t>
	In addition to the connection migration classification in <xref target="classification"/>, QUIC can also consider connection migration from strategy.
	</t>
	
	<section title="Failover Mode">
    <t>
	In failover mode, the networking stack monitors the quality of the connection or link, when they are not operating normally, the QUIC connection is migrated to an alternative path.
	</t>
	<t>
	QUIC doesn’t require any packets to be exchanged before migrating to a new path, so this migration is seamless. However, if the new path hasn’t been validated, there’s less confidence that it will work.
	In this mode, the QUIC connection MAY be temporarily interrupted.
    </t>
	</section>
	
	<section title="Standby Mode">
    <t>
	In standby mode, the networking stack establishes and validates an alternative path shortly after establishing a connection on the main path. 
	When the link or the connection deteriorate, QUIC can switch to the alternative path.
	</t>
	<t>
	This means that there are two or more logical paths between the QUIC client and the QUIC server. In this mode, QUIC always uses only one of these paths for communication at any time.
    </t> 
	</section>
	
	<section title="Aggregation Mode">
    <t>
	In the aggregation mode, the QUIC client (or QUIC server) can use MPQUIC <xref target="QUIC-MPQUIC"></xref> technology to achieve greater network throughput.
	This means that multiple source IPs will share the same connection ID.
	</t>
	</section>
	
	<section title="Load Balance Mode">
    <t>
	The section 9.6 of <xref target="QUIC-TRANSPORT"></xref> detailed load balancing mode.
	</t>
	<t>
	Servers MAY communicate a preferred address of two or more addresses to allow clients to pick the one most suited to their network attachment.
	The client SHOULD select one of the two or more addresses provided by the server and initiate path validation.
	As soon as path validation succeeds, the client SHOULD begin sending all future packets to the new server address using the new connection ID and discontinue use of the old server address.
	</t>
	</section>
</section>

<section title="Trigger Condition for Connection Migration" anchor="Trigger">
    <t>
	Except for PCM, other connection migrations can be triggered by RTT, packet loss rate, timeout, ECN or application signals.
	</t>
</section>


    <section title="Security Considerations">
    <t>TBD.</t>
    </section>
	
	<section anchor="IANA" title="IANA Considerations">
    <t>TBD.</t>
    </section>
     
    <section anchor="Acknowledgements" title="Acknowledgements">
    <t>None.</t>
    </section>
	
  </middle>

  <back>
    <references title="Normative references">
	
	<reference  anchor="QUIC-TRANSPORT" target='https://tools.ietf.org/html/draft-ietf-quic-transport-31'>
      <front>
        <title>QUIC: A UDP-Based Multiplexed and Secure Transport</title>
        <author initials='J.' surname='Iyengar' fullname='J. Iyengar'><organization /></author>
        <author initials='M.' surname='Thomson' fullname='M. Thomson'><organization /></author>
        <date year='2020' month='September' />
        <abstract><t> This document defines the core of the QUIC transport protocol. Accompanying documents describe QUICs loss detection and congestion control and the use of TLS for key negotiation.
        </t></abstract>
      </front>
    </reference>
	
	<reference  anchor="QUIC-MPQUIC" target='https://tools.ietf.org/html/draft-deconinck-quic-multipath-05'>
      <front>
        <title>Multipath Extensions for QUIC (MP-QUIC)</title>
        <author initials='Q.' surname='Coninck' fullname='Q. De Coninck'><organization /></author>
        <author initials='O.' surname='Bonaventure' fullname='O. Bonaventure'><organization /></author>
        <date year='2020' month='August' />
        <abstract><t> This document specifies extensions to the QUIC protocol to enable the simultaneous usage of multiple paths for a single connection.
        </t></abstract>
      </front>
    </reference>
	
	<reference  anchor="QUIC-TLS" target='https://tools.ietf.org/html/draft-ietf-quic-tls-31'>
      <front>
        <title>Using TLS to Secure QUIC</title>
        <author initials='M.' surname='Thomson' fullname='M. Thomson'><organization /></author>
        <author initials='S.' surname='Turner' fullname='S. Turner'><organization /></author>
        <date year='2020' month='September' />
        <abstract><t> This document describes how Transport Layer Security (TLS) is used to secure QUIC.
        </t></abstract>
      </front>
    </reference>
	
    </references>
   </back>
</rfc>
