<?xml version='1.0'?>
    <!DOCTYPE rfc SYSTEM 'rfc2629.dtd' [
        <!ENTITY rfc2119 PUBLIC '' 'http://xml.resource.org/public/rfc/bibxml/reference.RFC.2119.xml'>
        <!ENTITY rfc4271 PUBLIC '' 'http://xml.resource.org/public/rfc/bibxml/reference.RFC.4271.xml'>
        <!ENTITY rfc4272 PUBLIC '' 'http://xml.resource.org/public/rfc/bibxml/reference.RFC.4272.xml'>
        <!ENTITY rfc4486 PUBLIC '' 'http://xml.resource.org/public/rfc/bibxml/reference.RFC.4486.xml'>
        <!ENTITY rfc4760 PUBLIC '' 'http://xml.resource.org/public/rfc/bibxml/reference.RFC.4760.xml'>
        <!ENTITY rfc5492 PUBLIC '' 'http://xml.resource.org/public/rfc/bibxml/reference.RFC.5492.xml'>
        <!ENTITY rfc6286 PUBLIC '' 'http://xml.resource.org/public/rfc/bibxml/reference.RFC.6286.xml'>
        <!ENTITY rfc7301 PUBLIC '' 'http://xml.resource.org/public/rfc/bibxml/reference.RFC.7301.xml'>
        <!ENTITY rfc7454 PUBLIC '' 'http://xml.resource.org/public/rfc/bibxml/reference.RFC.7454.xml'>
        <!ENTITY rfc8174 PUBLIC '' 'http://xml.resource.org/public/rfc/bibxml/reference.RFC.8174.xml'>
        <!ENTITY rfc8446 PUBLIC '' 'http://xml.resource.org/public/rfc/bibxml/reference.RFC.8446.xml'>
        <!ENTITY rfc9000 PUBLIC '' 'http://xml.resource.org/public/rfc/bibxml/reference.RFC.9000.xml'>
        <!ENTITY rfc9001 PUBLIC '' 'http://xml.resource.org/public/rfc/bibxml/reference.RFC.9001.xml'>
        <!ENTITY rfc9002 PUBLIC '' 'http://xml.resource.org/public/rfc/bibxml/reference.RFC.9002.xml'>
        <!ENTITY I-D.ietf-idr-bgp-multisession PUBLIC '' 'http://xml.resource.org/public/rfc/bibxml-ids/reference.I-D.draft-ietf-idr-bgp-multisession-07.xml'>
        <!ENTITY I-D.chen-idr-bgp-over-quic PUBLIC '' 'http://xml.resource.org/public/rfc/bibxml-ids/reference.I-D.draft-chen-idr-bgp-over-quic-00.xml'>
        <!ENTITY I-D.retana-idr-bgp-quic-stream PUBLIC '' 'http://xml.resource.org/public/rfc/bibxml-ids/reference.I-D.draft-retana-idr-bgp-quic-stream-02.xml'>
        <!ENTITY I-D.ietf-quic-version-negotiation PUBLIC '' 'http://xml.resource.org/public/rfc/bibxml-ids/reference.I-D.draft-ietf-quic-version-negotiation-11.xml'>
        ]>
<?rfc toc="yes"?>
<?rfc tocompact="no"?>
<?rfc tocdepth="6"?>
<?rfc symrefs="yes"?>
<?rfc sortrefs="yes"?>
<?rfc compact="yes"?>
<?rfc subcompact="no"?>
<?rfc strict="yes" ?>
<rfc category="std" ipr="trust200902" docName="draft-retana-idr-bgp-quic-01">
  <!-- ***** FRONT MATTER ***** -->
  <front>
    <title abbrev="BGP over QUIC">BGP over QUIC</title>

    <author initials="A" surname="Retana"
    fullname="Alvaro Retana">
      <organization>Futurewei Technologies</organization>

      <address>
        <postal>
          <street>2330 Central Expressway</street>
          <city>Santa Clara</city>
          <region>CA</region>
          <code>95050</code>
          <country>USA</country>
        </postal>
       <email>aretana@futurewei.com</email>
      </address>
    </author>

    <author fullname="Yingzhen Qu" initials="Y" surname="Qu">
      <organization>Futurewei Technologies</organization>
      <address>
        <postal>
          <street>2330 Central Expressway</street>
          <city>Santa Clara</city>
          <region>CA</region>
          <code>95050</code>
          <country>USA</country>
        </postal>
        <phone></phone>
        <email>yingzhen.qu@futurewei.com</email>
      </address>
    </author>
    <author fullname="Jeffrey Haas" initials="J" surname="Haas">
      <organization>Juniper Networks</organization>
      <address>
        <postal>
          <street></street>
          <city></city>
          <region></region>
          <code></code>
          <country></country>
        </postal>
        <phone></phone>
        <email>jhaas@pfrc.org</email>
      </address>
    </author>
    <author fullname="Shuanglong Chen" initials="S" surname="Chen">
      <organization>Huawei Technologies</organization>
      <address>
        <postal>
          <street>No.156 Beiqing Rd.</street>
          <city>Beijing</city>
          <region></region>
          <code>100095</code>
          <country>China</country>
        </postal>
        <phone></phone>
        <email>chenshuanglong@huawei.com</email>
      </address>
    </author>

    <author fullname="Jeff Tantsura" surname="Tantsura" initials="J">
      <organization>Microsoft</organization>
      <address>
        <postal>
        <street/>
        <city/>
        <region/>
        <code/>
        <country>USA</country>
        </postal>
        <email>jefftant.ietf@gmail.com</email>
      </address>

</author>
    <date/>
    <area>Routing</area>
    <workgroup>IDR Workgroup</workgroup>
    <abstract>
      <t>
        This document defines the use of QUIC as BGP transport protocol.
      </t>
    </abstract>
  </front>

  <!-- ***** MIDDLE MATTER ***** -->

  <middle>
    <section title="Introduction">
	  <t>
	    The Border Gateway Protocol (BGP) <xref target="RFC4271"/> is the
      routing protocol used to exchange routing and reachability information
      among autonomous systems, and it uses TCP as its transport
      protocol to provide reliable packet communication.  BGP establishes
      peer relationships between routers using a TCP session on port
      179.
    </t>
    <t>
      The Multiprotocol Extensions for BGP-4 (MP-BGP) <xref target="RFC4760"/>
      allow BGP to carry information for multiple Network Layer protocols.
      However, only a single TCP connection can reach the Established state
      between a pair of peers <xref target="RFC4271"/>.  As a consequence, an
      error related to a particular Network Layer protocol may result in the
      termination of the connection for all.
    </t>
    <t>
      QUIC <xref target="RFC9000"/> is a UDP-based multiplexed and secure
      transport protocol that provides connection-oriented and stateful
      interaction between a client and server. It can provide low latency
      and encrypted transport with resilient connections.
    </t>
     <t>
      This document specifies the procedures for BGP to use QUIC as
      a transport protocol (<xref target="BoQ"/>), including error handling
      (<xref target="notifications"/>).  Changes to the BGP Finite State
      Machine (FSM) <xref target="RFC4271"/> are described in
      <xref target="FSM"/>.
	  </t>

    <section title="Requirements Language">
       <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>

    <section title="Terminology">
      <t>
        This document relies on the terminology used in
        <xref target="RFC4271"/> and <xref target="RFC9000"/>.  Familiarity
        with those documents is expected.
      </t>
    </section>


    <section anchor="BoQ" title="BGP over QUIC (BoQ)">
      <t>
        BGP over QUIC (BoQ) replaces only the transport layer of BGP. The BGP
        protocol specification remains backward compatible.
      </t>
      <t>Before two BGP speakers start exchanging routing information,
        they need to establish a BGP session. It is
        established in two phases:
      <list style="numbers">

      <t>
        Establish a transport layer connection. <xref target="BoQConn"/>
        specifies the BoQ connecition establishment.
      </t>

      <t>
        Establish a BGP session. After a transport-layer connection is established, BGP peers exchange protocol messages as specified in
        <xref target="RFC4271"/>.  <xref target="MBS"/> specifies a mechanism
        that allows multiple BGP sessions in a single QUIC connection.</t>
      </list></t>

      <t>
        <xref target="RFC4271"/> defines the BGP FSM operation, including
        transport connection conflict detection and resolution. BoQ follows
        the same definitions except where explicit modifications are defined in
        this document.
      </t>

      <section anchor="BoQConn" title="BoQ Connection Establishment">
       <t>
       BoQ uses QUIC version 1 as the underlying transport.  Other QUIC
       versions that meet the definition of a compatible version
       <xref target="I-D.ietf-quic-version-negotiation"/> with version 1 MAY be
       used.  The use of incompatible QUIC versions, as defined in
       <xref target="I-D.ietf-quic-version-negotiation"/>, may be specified in
       future documents.</t>
       <t>
       QUIC connections are established as described in
       <xref target="RFC9000"/>.  During connection establishment, a BGP
       speaker SHOULD use UDP port 179 and MUST select the Application-Layer
       Protocol Negotiation (ALPN) <xref target="RFC7301"/> token "bgp4"
       in the TLS handshake.  Support for other application-layer protocols
       MUST NOT be offered in the same handshake.  A connection MUST be closed
       if the ALPN token is not as indicated, or if other application-layer
       protocols are offered in the same handshake.</t>
       <t>
        After a QUIC connection is established, the first message sent by each
        endpoint is a BGP OPEN message, which can be used to indicate whether
        the speaker is capable of supporting more than one QUIC stream to
        exchange BGP messages (<xref target="MBS"/>).  The message format and
        framing is unchanged <xref target="RFC4271"/>.
      </t>
       </section>

       <section anchor="MBS" title="Multiple BGP Sessions">

           <t>
             In QUIC, application protocols exchange information using streams.
             Each stream is a separate unidirectional or bidirectional channel
             of "order stream of bytes."  Moreover, each stream has flow
             control which limits bytes sent on a stream, together with flow
             control of the connection. Multiple streams can be multiplexed
             onto an underlying connection.
           </t>
         <section title="Multiple BGP Sessions Using QUIC Streams">
           <t>
             This document specifies a mechanism to establish
             multiple BGP sessions using QUIC streams, one session per stream.
             An implementation can
             assign one or more Network Layer protocols to a BGP session.
           </t>
           <t>A QUIC stream is created by sending a BGP OPEN message, and
             each stream MUST be bidirectional as described in Section 2.1
             of <xref target="RFC9000"/>.  In addition, the corresponding stream
             MUST end (clean termination) as described in Section 2.4 of
             <xref target="RFC9000"/> when a BGP session is terminated.
           </t>
           <t>
             <xref target="connection"/> describes the Connection Collision
             Detection procedure to be used with streams.  Each BGP session
             operates independently, which means critical conditions (such
             as a malformed message) in one session won't affect others.
           </t>
         </section>
         <section anchor="MSC" title="MultiStream Capability">
         <t>
          The MultiStream Capability (MSC) is defined to indicate that a BGP
          speaker supports multiple sessions as specified in this document.
          The capability <xref target="RFC5492"/> is defined as follows:

           <list style="empty">
             <t>Capability code (1 octet): TBD1</t>
             <t>Capability length (1 octet): 1</t>
             <t>Capability value (1 octet): flag field reserved.</t>
           </list></t>
           <figure title="" suppress-title="false" align="left" alt="" width="" height="">
           <artwork xml:space="preserve" name="" type="" align="left" alt="" width="" height="">
      0 1 2 3 4 5 6 7
     +-+-+-+-+-+-+-+-+
     |   Reserved    |
     +-+-+-+-+-+-+-+-+

           </artwork>
           </figure>
           <t>Flags: bitfield - MUST be set to zero and ignored by the receiver.
           </t>
           <t>
             The MSC only applies when using BoQ. It MUST be
             included in all OPEN messages.  It MUST be ignored otherwise.
           </t>
           <t>
             BGP multiple session support defined in <xref target="MBS"/>
             applies only if both peers advertise the MSC
             during the establishment of the "initial session." In
             particular, if a peer that advertises the MSC doesn't receive an OPEN
             message with the MSC from its peer, it SHOULD NOT terminate the
             session.
           </t>
           <t>
             Using the MSC allows peers to establish multiple BGP sessions, one
             per QUIC stream.  Each new BGP session is established using a separate
             OPEN message <xref target="RFC4271"/> and MUST include the MSC.  If
             both peers exchange the MSC in the "initial session," they MUST
             include it when establishing other sessions.  Otherwise, the new
             session MUST be terminated, and the Error Subcode MUST be set to
             MultiStream Conflict (TBD2), defined in
             <xref target="notifications"/>.
           </t>
           <t>
             Once a BGP session is established, it follows the procedures
             specified in <xref target="RFC4271"/>.</t>
         </section>
         <section title="The Control Stream and Function Streams">
          <t>If both peers support MSC, the "initial session" creates a
            control stream for the BGP connection. The OPEN messages exchanged
            contrain information such as its AS number and the BGP protocol
            version it supports, if the peers agree on the parameters for
            the session, they will begin to send BGP KEEPALIVE messages to
            each other.
          </t>
          <t>If the entire BGP connection needs to be reset for any reason,
            such as a configuration change or a network outage, a notification
            is sent over the control stream to inform the other router that
            the connection is being reset.
          </t>
          <t>If for whatever reason the control stream is closed, the
            QUIC connection needs to be terminated using a CONNECTION_CLOSE
            frame, and an error message (TBD) should be included to indicate
            that the connection has been terminated by BGP. If there are
            other open streas, they are implicitly clsed when the connection
            is closed.
          </t>
          <t>In addition to the control stream, there may be other function
            streams that are used to exchange specific types of routing
            information. For example, one AFI/SAFI may be mapped to one
            function stream. These function streams cannot be established
            until the control stream has reached an established state.
          </t>
          <t>Each function stream has its own keepalive messages with its
            own timers. These timers are used to ensure that the session
            stays alive even if no routing updates are being exchanged.
            Non-routing related function streams, such as BGP FLowSpec,
            may have longer keepalive timers, for example 120 seconds,
            as they do not need to exchange routing updates as frequently
            as other function streams and can run in a relatively lower
            priority.
          </t>
          <t>A single QUIC stream provides ordered and reliable delivery,
            however there is no guarantee of transmission and deliver
            order across streams. Therefore, if specific data from one
            stream needs to be received before data from other streams,
            this requirement must be accomplished through BGP..
          </t>

        </section>
        <section title="Stream Priorites">
          <t>As defined in <xref target="RFC9000"/>, a QUIC implementation
            SHOULD provide ways in which an application can indicate the
            relative priority of streams.</t>
          <t>For a BGP implementation utilizing QUIC as its transport
            protocol with MultiStream Capability, it MUST support a prioritization
            mechanism for BGP streams. This is essential for ensuring
            that critical routing information can be transmitted with
            higher priority compared to non-routing information.</t>
          <t>How to implement the supported priorities using QUIC congestion
            control at connection level, stream level flow control, and packetization
            are out of the scope of this document.
          </t>
        </section>
         <section title="Modifications to the BGP FSM">
         <t>
           The modifications to the BGP FSM are described in
           <xref target="FSM"/>.  For simplicity and security reason, it is
           suggested that 1-RTT is used.
         </t>
         <t>
           BGP multi-session support doesn't modify the BGP FSM, but the
           collision handling procedure should be replaced with the procedure
           described below.
         </t>
         </section>
         <section anchor="connection" title="BGP Session Establishment and Collision Avoidance">

            <t>
            Before creating a new session, a BGP speaker should check that no
            session exists for the same Network Layer protocol(s).  If a session
            already exists, the BGP speaker SHOULD NOT attempt to create a new one.
            </t>
            <t>
            If a pair of BGP speakers try to establish a BGP session with each
            other simultaneously, then two parallel sessions will be formed. In
            the case of BoQ, the IP addresses of the connection cannot
            be used to resolve collisions when using multiple streams.
            </t>
            <t>
            To avoid connection collisions, a session is
            identified by the My Autonomous System and BGP Identifier fields pair
            in the OPEN message.  In this context, a connection collision is
            the attempt to open a BGP session for which the set of
            Network Layer protocols is the same.  One of the connections MUST be
            closed.
            </t>
            <t>
            The connection collision is resolved using the extension specified in
            <xref target="RFC6286"/>.  In other words, the session with the
            higher-valued BGP Identifier is preserved <xref target="RFC4271"/>.
            If the BGP Identifiers are identical, then the session with the larger
            ASN is preserved <xref target="RFC6286"/>.
            </t>
            <t>
            Upon receiving an OPEN message, the local system MUST examine all of
            its sessions in the OpenConfirm state. A BGP speaker MAY
            also examine sessions in an OpenSent state if it knows the BGP
            Identifier of the peer by means outside of the protocol.  If among
            these sessions, there is one to a remote BGP speaker whose BGP
            Identifier and ASN pair equals the one in the OPEN message, and this
            session collides with the connection over which the OPEN message is
            received, then the local system performs the following collision
            resolution procedure:
            <list style="empty">
            <t>
               1) The BGP Identifier of the local system is compared to the BGP
                  Identifier of the remote system (as specified in the OPEN
                  message).  Comparing BGP Identifiers is done by converting them
                  to host byte order and treating them as 4-octet unsigned
                  integers.
                  </t>
                  <t>
               2) If the value of the local BGP Identifier is less than the
                  remote one, the local system closes the BGP connection that
                  already exists (the one that is already in the OpenConfirm
                  state) and accepts the BGP connection initiated by the remote
                  system.
                  </t>
                  <t>
               2a) Otherwise, the local system closes the newly created BGP
                  connection (the one associated with the recently received OPEN
                  message) and continues to use the existing one (the one that
                  is already in the OpenConfirm state).
                  </t>
                  <t>
               3) If the BGP Identifiers of the peers involved in the connection
                  collision are identical, then the session initiated by the BGP
                  speaker with the larger AS number is preserved.
                  </t>
               </list></t>
            <t>
            Unless allowed via configuration, a connection collision with an
            existing BGP session in the Established state causes the
            closing of the newly created session.
            </t>
            <t>
            Closing the BGP session (that results from the collision resolution
            procedure) is accomplished by sending the NOTIFICATION message with
            the Error Code Cease, Subcode Connection Collision Resolution (7)
            <xref target="RFC4486"/>.
            </t>
            <t>
            The remainder of the process is as specified in
            <xref target="RFC4271"/>.
            </t>
         </section>
       </section>
     </section>


         <section anchor="notifications" title="Error Handling">
           <t>BoQ error handling involves the
               following three types of errors:</t>

               <t>(1) QUIC error: Includes stream error and connection error <xref
               target="RFC9001"/>. In some cases, a stream error may cause a
               connection error. For example, if an operation error occurs on all
               streams, the connection error should be triggered to close the
               connection.</t>

               <t>(2) TLS alert: In <xref target="RFC9001"/>,a QUIC endpoint MUST
               treat any alert from TLS as if it were at the "fatal" level. For TLS
               alerts, this includes replacing any alert with a generic alert, such
               as handshake_failure (0x128 in QUIC).</t>

               <t>(3) BGP error: If an error occurs in BGP processing <xref
               target="RFC4271"/>, it can be mapped to the following BoQ Error
               Codes<xref target="RFC9000"/>.</t>

               <t>This document defines some of the following BoQ Error Codes:</t>

               <t>(1) BOQ_NO_ERROR (0x00): No error. This is used when the
               connection or stream needs to be closed, but there is no error to
               signal.</t>

               <t>(2) BOQ_INTERNAL_ERROR (0x01): The BoQ implementation encountered
               an internal error and is incapable of continuing the stream or the
               connection.</t>

           <section title="Error Handling with MultiSteam Support">
           <t>
             OPEN message error handling is defined in section 6.2 of
             <xref target="RFC4271"/>. This document introduces the following
             OPEN Message Error subcodes:
           <list style="empty">
             <t>
               TBD2 - MultiSession Conflict - Used if the MSC is exchanged by both
               peers in the "initial session" but is not present when establishing
               a new session.
             </t>
             <t>
               TBD3 - Session Capability Mismatch -  Used if a BGP speaker
               terminates a session in the case where it sends an OPEN message with
               the MSC but receives an OPEN message without it.
             </t>
             <t>
               TBD4 - Network Layer Protocol Mismatch - Used if a BGP session has
               already been established for a signaled Network Layer Protocol,
               either individually or as part of a set.
             </t>
           </list></t>
           <t>
             <xref target="MSC"/> recommends not terminating a session when only one
             peer supports the MSC.  If such a BGP speaker does terminate the
             session, the Error Subcode MUST be set to Session Capability Mismatch
             (TBD3).
           </t>
           <t>
             Any individual BGP session can be terminated as specified in
             <xref target="RFC4486"/>.  If multiple sessions are to be terminated,
             then the procedure MUST be followed for each one.
           </t>
           </section>
           <section title="Session closure">
               <t>QUIC provides three ways to close a connection(<xref
               target="RFC9000"> see </xref> Section 10):</t>

               <t>(1) Idle timeout</t>

               <t>(2) Immediate Close</t>

               <t>(3) Stateless Reset</t>

               <t>When the idle timer expires, the connection is closed
               immediately. Idle timeout can be calculated using the following
               formula:</t>

               <t>idle_timeout=MAX(min_idle_timeout, 3*PTO)</t>

               <t>The PTO is a time that the sender should wait for an
               acknowledgment of a sent packet. For a calculation method, refer to
               <xref target="RFC9002"/> Section 6.2.1.</t>

               <t>When establishing a QUIC connection, the transmission parameter
               max_idle_timeout is used. Endpoints advertise local idle_timeout to
               each other. If no max_idle_timeout advertisement is received from
               the remote end, the remote idle_timeout is set to a value of 0.
               Based on the values of local idle_timeout and remote idle_timeout,
               there are three possible scenarios:</t>

               <t>(1) If both the values are 0, disable the idle timeout
               function.</t>

               <t>(2) If there is only one value 0, set min_idle_timeout to a
               non-zero value in between.</t>

               <t>(3) If neither value is 0, set min_idle_timeout to the smaller
               value.</t>

               <t>Two options are available for the idle timer during BGP session
               establishment. Option 1 is recommended by default.</t>

               <t>Option 1: Set this parameter to 0, indicating that idle timeout
               is disabled.</t>

               <t>Option 2: The value must be greater than the value of BGP
               HoldTimer. It is recommended that the value be greater than five
               times the value of BGP HoldTimer.</t>

               <t/>
             </section>
         </section>


    <section anchor="FSM" title="BGP Finite State Machine">

      <section title="Optional Session Attributes">
        <t>This document adds two optional Session attributes to the list in
          Section 8 of <xref target="RFC4271"/>:</t>
          <dl spacing="compact">
            <dt>14)</dt><dd> PassiveQUICEstablishment</dd>
            <dt>15)</dt><dd> TrackQUICState</dd>
          </dl>
          <t>Section 8.1.1 of <xref target="RFC4271"/> describes the linkage
          between the FSM functionality, events, and optional session
          attributes.  When using BoQ, Group 3 (TCP processing) is replaced
          with:</t>
          <t indent="3">
          Group 3: QUIC processing</t>
          <ul empty="true" indent="6">
             <li>Optional Session Attributes: PassiveQUICEstablishment,
                                          TrackQUICState</li>

             <li>Option 1:    PassiveQUICEstablishment</li>

             <li>Description: This option indicates that the BGP FSM will
                          passively wait for the remote BGP peer to
                          establish the BGP QUIC connection.  The local
                          node is a QUIC server <xref target="RFC9000"/>.</li>

             <li>Value:       TRUE or FALSE</li>

             <li>Option 2:    TrackQUICState</li>

             <li>Description: The BGP FSM tracks the end result of a QUIC
                          connection attempt rather than individual QUIC
                          messages.  Optionally, the BGP FSM can support
                          additional interaction with the TCP connection
                          negotiation.</li>

             <li>Value:       TRUE or FALSE</li>
           </ul>
      </section>

      <section title="FSM Event">

          <t>QUIC directly encapsulates the handshake process of TLS 1.3 <xref
          target="RFC8446"/>. In addition, QUIC requires that all packets must
          be explicitly acknowledged. Therefore, QUIC defines the end state of
          two connection establishment <xref target="RFC9001"/></t>

          <t>(1) Handshake Complete: TLS 1.3 has successfully completed the
          handshake.</t>

          <t>(2) Handshake Confirmed: The QUIC has successfully completed the
          handshake.</t>

          <t>On the QUIC client, the state is Handshake Complete and then
            Handshake Confirmed. On the QUIC server, the two states are reached
            at the same time.</t>

          <t>The transport layer events for BoQ FSM are defined as follows
          :</t>

          <t>Event 29: ManualStart_with_PassiveQuicEstablishment</t>

          <t>Definition: Local system administrator manually starts the peer
          connection, but has PassiveQuicEstablishment enabled.</t>

          <t>Status: Optional, depending on local system</t>

          <t>Optional Attribute Status:</t>

          <t>1) The PassiveTcpEstablishment attribute SHOULD be set to TRUE if
          this event occurs.</t>

          <t>2) The DampPeerOscillations attribute SHOULD be set to FALSE when
          this event occurs.</t>

          <t>Corresponding TCP events: Event 4</t>

          <t/>

          <t>Event 30: AutomaticStart_with_PassiveQuicEstablishment</t>

          <t>Definition: Local system automatically starts the BGP connection
          with the PassiveQuicEstablishment enabled.</t>

          <t>Status: Optional, depending on local system</t>

          <t>Optional Attribute Status:</t>

          <t>1) The AllowAutomaticStart attribute SHOULD be set to TRUE.</t>

          <t>2) The PassiveTcpEstablishment attribute SHOULD be set to
          TRUE.</t>

          <t>3) If the DampPeerOscillations attribute is supported, the
          DampPeerOscillations SHOULD be set to FALSE.</t>

          <t>Corresponding TCP events: Event 5</t>

          <t/>

          <t>Event 31:
          AutomaticStart_with_DampPeerOscillations_and_PassiveQuicEstablishment</t>

          <t>Definition: Local system automatically starts the BGP peer
          connection with peer oscillation damping enabled and
          PassiveQuicEstablishment enabled. The exact method of damping
          persistent peer oscillations is determined by the implementation and
          is outside the scope of this document.</t>

          <t>Status: Optional, depending on local system</t>

          <t>Optional Attribute Status:</t>

          <t>1) The AllowAutomaticStart attribute SHOULD be set to TRUE.</t>

          <t>2) The DampPeerOscillations attribute SHOULD be set to TRUE.</t>

          <t>3) The PassiveTcpEstablishment attribute SHOULD be set to
          FALSE.</t>

          <t>Corresponding TCP events: Event 7</t>

          <t/>

          <t>Event 32: QuicConnection_Valid</t>

          <t>Definition: This parameter is applicable only to the QUIC server.
          It indicates that the Handshake Confirmed state is reached.</t>

          <t>Status: Optional</t>

          <t>Optional Attribute Status: 1) The TrackTcpState attribute SHOULD
          be set to TRUE if this event occurs.</t>

          <t>Corresponding TCP events: Event 14</t>

          <t/>

          <t>Event 33: Quic_CR_Invalid</t>

          <t>Definition: This parameter applies only to the QUIC server and
          indicates that an invalid QUIC connection request is received.
          Initial packets with invalid source addresses or port
          numbers,invalid destination addresses or port numbers or version
          negotiation or address validation fails.</t>

          <t>Status: Optional</t>

          <t>Optional Attribute Status: 1) The TrackTcpState attribute should
          be set to TRUE if this event occurs.</t>

          <t>Corresponding TCP events: Event 15</t>

          <t/>

          <t>Event 34: Quic_CR_Acked</t>

          <t>Definition: This parameter applies only to the QUIC client. It
          indicates that an Initial ACK message is received from the QUIC
          server and an Initial/Handshake message is sent to the QUIC server.
          Note: When this event is received, the QUIC client has reached the
          Handshake Complete state.</t>

          <t>Status: Mandatory</t>

          <t>Corresponding TCP events: Event 16</t>

          <t/>

          <t>Event 35: QuicConnectionConfirmed</t>

          <t>Definition: This parameter applies to both QUIC client and QUIC
          server, indicating that the Handshake Confirmed state has been
          reached.</t>

          <t>Status: Mandatory</t>

          <t>Corresponding TCP events: Event 17</t>

          <t/>

          <t>Event 36: QuicConnectionFails</t>

          <t>Definition: This parameter applies to both the QUIC client and
          the QUIC server. It indicates that an error occurs in the QUIC
          handshake before the system enters the Handshake Confirmed
          state.</t>

          <t>Status: Mandatory</t>

          <t>Corresponding TCP events: Event 18</t>

          <t/>
      </section>

    </section>

    <section title="Operational Considerations">
      <section title="Using BoQ">
      <t>
      The decision to use BoQ instead of the TCP-based mechanism defined in
      <xref target="RFC4271"/> is an operational decision and out of the scope
      of this document.  An implementation MUST provide a configuration
      mechanism to enable BoQ on a per-peer basis.  More granularity (per
      Network Layer protocol, for example) is not recommended as it may
      increase the operational complexity.</t>
      <t>
      Connectivity problems (e.g., blocking UDP) can result in a failure to
      establish a QUIC connection; BGP speakers SHOULD attempt to establish a
      TCP-based BGP session in this case.</t>
    </section>

      <section title="BGP Multi Session Backward Compatibility">
        <t>
          A BGP speaker that doesn't understand the MSC will ignore it
          <xref target="RFC5492"/>.  <xref target="MSC"/> recommends not
          terminating a session when only one peer supports the MSC.
        </t>
      </section>

      <section title="BGP Multi Session Prioritization">
        <t>
          One of the drawbacks of a single BGP session is that control
          plane messages for all supported Network Layer protocols use the same
          connection, which may cause resource contention.
        </t>
        <t>
          QUIC <xref target="RFC9000"/> does not provide a mechanism for
          exchanging prioritization information. Instead, it recommends that
          implementations provide ways for an application to indicate the
          relative priority of streams, in this case, mapped to BGP sessions.
          An operator should prioritize BGP sessions (streams) that carry
          critical control plane information if the functionality is available.
          The definition of this functionality and the determination of the
          importance of a BGP session are both outside the scope of this
          document.
        </t>
        <t>An example implementation is to have four priority (0-3) defined,
          and smaller number means higher priority. Each AFI/SAFI should be
          assigned a default priority and optional configuration to modify
          the default value. For example, IPv4 and IPv6 unicast AFI/SAFI
          (1/1 and 2/1) may have priority of 1, while BGP-LS (16388/71 and
          16388/72) may have a priority of 3, and BGP FlowSpec (1/133 and
          1/134) may have a priority of 4.</t>
      </section>

      <section title="Configurations">
      <t>For BGP multi session, a configuration command SHOULD be implemented
        to allow grouping of some AFI/SAFIs into one session.</t>
      </section>
    </section>
    <section title="Security Considerations">
      <t>This document replaces the transport protocol layer of BGP from TCP
      to QUIC. It does not modify the basic protocol specifications of BGP,
      and therefore does not introduce new security risks to the basic BGP
      protocol. The non-TCP-related considerations of <xref target="RFC4271"/>,
        <xref target="RFC4272"/>, and <xref target="RFC7454"/> apply
        to the specification in this document.</t>

      <t>BoQ enhances transport-layer security for BGP sessions, refer to <xref
      target="RFC7454"/> :</t>

      <t>(1) Supports QUIC server identity authentication.</t>

      <t>(2) (Optional) Supports QUIC client identity authentication.</t>

      <t>(3) Confidentiality protection of BGP messages is supported. All BGP
      messages are encrypted for transmission.</t>

      <t>(4) Supports integrity protection for BGP messages.</t>

      <t>
       The use of a specific UDP port number and an ALPN token <xref target="BoQConn"/> protects a BGP
       Speaker from attempts to establish an unexpected BGP session.
       Additionally, all packets directed to UDP port 179 on the local device
       and sourced from an address not known or permitted to become a BGP
       neighbor SHOULD be discarded. </t>
      <t>
        With BGP multi session support using QUIC streams, it separates
        the control plane traffic over multiple sessions, the
        effect of a session-based vulnerability is reduced; only a single
        session is affected and not the whole connection.  The result is
        increased resiliency.
      </t>
      <t>
        On the other hand, a high number of BGP sessions may result in higher
        resource utilization and the risk of depletion.  Also, more sessions
        may imply additional configuration and operational complexity.
        However, this risk is mitigated by the fact that BGP sessions typically
        require explicit configuration by the operator.
      </t>
    </section>

    <section anchor="IANA" title="IANA Considerations">

     <section title="UDP Port for BoQ">
     <t>
      IANA is requested to add a reference to [this document] for the UDP
      port 179 entry in the "Service Name and Transport Protocol Port Number Registry".</t>
    </section>

     <section title="Registration of the BGP4 Identification String">
      <t>
       This document creates a new registration for the identification of
       BGP [RFC4271] in the "TLS Application-Layer Protocol Negotiation (ALPN)
       Protocol IDs" registry.</t>
      <t>
       The "bgp4" string identifies BGP-4 [RFC4271]:</t>
      <t>
       Protocol:  BGP-4</t>
      <t>
       Identification Sequence:  0x62 0x67 0x70 0x34 ("bgp4")</t>
      <t>
       Specification:  This document</t>
    </section>

     <section title="Multiple Streams">
      <t>
        IANA is asked to assign a new Capability Code for the MultiStream
        Capability (<xref target="MSC"/>) as follows:
      </t>
        <texttable title="MultiStream Capability">
          <ttcol>Value</ttcol>
          <ttcol>Description</ttcol>
          <ttcol>Reference</ttcol>
          <ttcol>Change Controller</ttcol>
          <c>TBD1</c>
          <c>MultiStream Capability</c>
          <c>[This Document]</c>
          <c>IETF</c>
        </texttable>
      </section>

      <section title="Error Codes">
      <t>
        IANA is asked to assign three values from the OPEN Message Error
        subcodes registry as follows:
      </t>
      <texttable>
        <ttcol>Value</ttcol>
        <ttcol>Name</ttcol>
        <ttcol>Reference</ttcol>
        <c>TBD2</c> <c>MultiSession Conflict</c> <c>[This Document]</c>
        <c>TBD3</c> <c>Session Capability Mismatch</c> <c>[This Document]</c>
        <c>TBD4</c> <c>Network Layer Protocol Mismatch</c><c>[This Document]</c>
      </texttable>
      <t>
        IANA is asked to assign two values from the Cease NOTIFICATION Message Error
        subcodes registry as follows:
      </t>
      <texttable>
        <ttcol>Value</ttcol>
        <ttcol>Name</ttcol>
        <ttcol>Reference</ttcol>
        <c>BOQ_NO_ERROR</c> <c>Stream Closed No Error</c> <c>[This Document]</c>
        <c>BOQ_INTERNAL_ERROR</c> <c>Stream Internal Error</c> <c>[This Document]</c>
      </texttable>
    </section>
    </section>

    <section title="Acknowledgement">
      <t>
        This document merges and replaces
        <xref target="I-D.chen-idr-bgp-over-quic"/> and
        <xref target="I-D.retana-idr-bgp-quic-stream"/>.  The authors
        acknowledge the contributions made by the authors and contributors of
        those documents.</t>
      <t>
        This document references the text and procedures defined in
        <xref target="I-D.ietf-idr-bgp-multisession"/>, and we are grateful
        for their contributions.</t>
      <t>
      The authors would like to thank xx for review and comments.
      </t>
    </section>

</middle>

  <!--  *****BACK MATTER ***** -->

<back>
    <references title="Normative References">
        &I-D.ietf-quic-version-negotiation;
        &rfc2119;
        &rfc4271;
        &rfc4486;
        &rfc5492;
        &rfc6286;
        &rfc7301;
        &rfc8174;
        &rfc9000;
    </references>
    <references title="Informative References">
        &I-D.ietf-idr-bgp-multisession;
        &I-D.chen-idr-bgp-over-quic;
        &I-D.retana-idr-bgp-quic-stream;
        &rfc4272;
        &rfc4760;
        &rfc7454;
        &rfc8446;
        &rfc9001;
        &rfc9002;
    </references>

</back>
</rfc>
