<?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-rfc2629 version 1.6.2 (Ruby 2.7.0) -->
<?rfc comments="yes"?>
<rfc xmlns:xi="http://www.w3.org/2001/XInclude" ipr="trust200902" docName="draft-banks-quic-cibir-00" category="exp" tocInclude="true" sortRefs="true" symRefs="true" version="3">
  <!-- xml2rfc v2v3 conversion 3.12.3 -->
  <front>
    <title abbrev="QUIC-CIBIR">QUIC Connection ID Based Initial Routing</title>
    <seriesInfo name="Internet-Draft" value="draft-banks-quic-cibir-00"/>
    <author initials="N." surname="Banks" fullname="Nick Banks">
      <organization>Microsoft Corporation</organization>
      <address>
        <email>nibanks@microsoft.com</email>
      </address>
    </author>
    <date/>
    <area>Transport</area>
    <workgroup>QUIC</workgroup>
    <keyword>Internet-Draft</keyword>
    <abstract>
      <t>This document defines an extension to the QUIC transport protocol to
consistently route all packets from a client to the appropriate server on a
shared UDP port.</t>
    </abstract>
  </front>
  <middle>
    <section anchor="introduction">
      <name>Introduction</name>
      <t>Several scenarios exist where multiple independent or isolated servers need to
run in the same environment, but cannot use independent local UDP ports.  For
instance, in server deployments that have hundreds or thousands of machines,
each with tens or hundreds of different QUIC servers running on them, the
server infrastructure may not be able to support the number of local UDP ports
it would require to give each server a unique one.  Additionally, because of
infrastructure requirements additional IP addresses may not be able to be used
as a solution either.</t>
      <t>In these scenarios, the server infrastructure needs a way to essentially NAT
QUIC packets on a shared local UDP port between all servers using that port.
This document defines a mechanism for using QUIC connection IDs to encode the
necessary information for all client to server QUIC packets to be correctly
routed to the appropriate server.  A cooperating client can then use this to
specifically target a server on a shared port.</t>
      <section anchor="terms-and-definitions">
        <name>Terms and Definitions</name>
        <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 target="RFC8174"/>
when, and only when, they appear in all capitals, as shown here.</t>
      </section>
    </section>
    <section anchor="specification">
      <name>Specification</name>
      <section anchor="transport-parameter">
        <name>Transport Parameter</name>
        <t>Support for encoding CIBIR information is negotiated by means of a QUIC
Transport Parameter (name=cibir_encoding, value=0x30).  The cibir_encoding
transport parameter consists of two integer values (represented as
variable-length integers) that represent the length and offset to the
well-known identifier encoded into the client's source connection ID.</t>
        <t>Servers that share a local UDP port using the CIBIR extension unconditionally
route received packets according to the CIBIR extension's protocol.  The
cibir_encoding transport parameter is used on the server side after the routing
has already happened to validate the intent of the client.  Servers MUST
validate the client sent the cibir_encoding transport parameter with the
matching offset and length that has been configured locally.  If the transport
parameter is missing or contains incorrect values the server MUST terminate the
connection with an error of type CONNECTION_REFUSED.</t>
        <t>No special routing is done on the client side, but client MUST also validate
the server sent the cibir_encoding transport parameter with the matching offset
and length so as to verify the server is cooperating in the expected routing
scheme.  If the transport parameter is missing or contains incorrect values the
client MUST terminate the connection with an error of type
TRANSPORT_PARAMETER_ERROR.</t>
      </section>
      <section anchor="packet-encoding-and-routing">
        <name>Packet Encoding and Routing</name>
        <t>The base QUIC transport protocol provides no way to consistently route long
header packets to the correct server in a shared UDP environment.  The only
possibly way a server's infrastructure has to identify which server the client
is trying to connect to is the ALPN or SNI, but these are not included in all
long header packets.  Additionally, the destination connection ID in packets
sent to the server cannot be used because there is no stateless way determine if
the CID is client or server chosen, not to mention the complexities around
server chosen CIDs in a load balanced environment (which the client does not
necessarily know anything about).</t>
        <t>To achieve consistent routing for these long header packets, the client encodes
a well-known identifier into its source connection ID.  The length and offset of
the well-known ID must be pre-agreed upon between the client and server, and is
validated via the cibir_encoding transport parameter as described above.  When
the server infrastructure receives a QUIC long header packet on the shared UDP
port it uses the well-known identifier to route the packet to the correct
server.</t>
        <t>No special routing is necessary for short header packets.  These packets always
use server chosen destination connection IDs, and the logic by which these CIDs
 are chosen, created and interpreted is purely up to the server and server
infrastructure.  The client doesn't need to be involved in this logic beyond the
normal use of destination connection IDs.</t>
      </section>
    </section>
    <section anchor="security-considerations">
      <name>Security Considerations</name>
      <t>The client encodes well-known IDs in the QUIC connection ID that may expose
information to an observer.</t>
    </section>
    <section anchor="iana-considerations">
      <name>IANA Considerations</name>
      <section anchor="quic-transport-parameter">
        <name>QUIC Transport Parameter</name>
        <t>This document registers a new value in the QUIC Transport Parameter Registry
maintained at
<eref target="https://www.iana.org/assignments/quic/quic.xhtml#quic-transport"/>.</t>
        <dl>
          <dt>Value:</dt>
          <dd>
            <t>0x30</t>
          </dd>
          <dt>Parameter Name:</dt>
          <dd>
            <t>cibir_encoding</t>
          </dd>
          <dt>Status:</dt>
          <dd>
            <t>permanent</t>
          </dd>
          <dt>Specification:</dt>
          <dd>
            <t>This document</t>
          </dd>
        </dl>
      </section>
    </section>
  </middle>
  <back>
    <references>
      <name>Normative References</name>
      <reference anchor="RFC2119" target="https://www.rfc-editor.org/info/rfc2119">
        <front>
          <title>Key words for use in RFCs to Indicate Requirement Levels</title>
          <author fullname="S. Bradner" initials="S." surname="Bradner">
            <organization/>
          </author>
          <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" target="https://www.rfc-editor.org/info/rfc8174">
        <front>
          <title>Ambiguity of Uppercase vs Lowercase in RFC 2119 Key Words</title>
          <author fullname="B. Leiba" initials="B." surname="Leiba">
            <organization/>
          </author>
          <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>
  </back>
  <!-- ##markdown-source:
H4sIAMgbHmIAA51YYW/bOBL9bsD/Ya790BaI07S7wN0aWODcxMUaSJyc49zh
sFgUtETZRCTSS1J2haL//d6QlGwlzt5ivySSJXJm3pt5M9RoNBoOvPKlHNO/
HmaXdGm0lplXRtPsij4JJ3OaaeWVKGlhaq/0ejgQq5WVu7hidDn7NFsMB7nJ
tKiwTW5F4UcroR/d6PdaZaNMrZQdXVwMB5nwcm1sMyb5dYsluB3Tt6vJcvp9
OFBbOyZva+c/Xlz8dPERZqwUY1paod3WWD8c7NfR5nDwuB/DLS+tln50xRaH
A+eFzr+I0mjs2kgHeyaHv2Oq3Ui4TKnhYKvG9Ks32Rk57Ghl4XDVVPEiM1Ul
tXe/DQcwXvuNsePhgGjEf4iUdmOanwMUhBZ/ihHPVfZ4/KuxsHmjMmucKTwg
tXBfMKbxuayEKsekVQDpn1X75jkcYNOj0YjEynkrMs/3y41yBHxr9o5yWSgt
HQkNFL3UjrnyhvxGRgp9CxhtrUGspsRjBgOvOizwZUMWVEoSZUlbkT1K76iw
piJBWanYSNpPbLHF1ioQRU7anbQEYwJYb0BOTg9Xd8SWzlu3K5XnpeS718yP
NXmdxcCHg3uJ9Ugjl0ktrDIO/sMh2m+klVTVpVfbUgLmXG4l/sANY0k5U8J8
nuw70hI3HJCtNV4OfjrwQFLvlDWaQTqjVe0pE1obD/b7m5Ymgxet6+6c6LOx
yD/NCZTJM940BYtFpWlCUsCO8LQRO0mbWueI3rF7SJLaIe9wU1Alsg1zczYc
SFzSXvkNMUX85mFVQbkqCgQNZwJjbWiISCNhGWNEVZ3xX2AdfVG6sAJJAU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