<?xml version="1.0" encoding="US-ASCII"?>

<?xml-model href="rfc7991bis.rnc"?>

<!-- <?xml-stylesheet type="text/xsl" href="rfc2629.xslt" ?> --> 
<!-- This third-party XSLT can be enabled for direct transformations in XML processors, including most browsers -->


<!DOCTYPE rfc [
  <!ENTITY nbsp    "&#160;">
  <!ENTITY zwsp   "&#8203;">
  <!ENTITY nbhy   "&#8209;">
  <!ENTITY wj     "&#8288;">
  <!ENTITY I-D.ietf-bess-evpn-l2gw-proto SYSTEM "https://xml2rfc.ietf.org/public/rfc/bibxml3/reference.I-D.ietf-bess-evpn-l2gw-proto.xml">
  <!ENTITY I-D.ietf-bess-evpn-mh-pa SYSTEM "https://xml2rfc.ietf.org/public/rfc/bibxml3/reference.I-D.ietf-bess-evpn-mh-pa.xml">
  <!ENTITY I-D.draft-ietf-bess-rfc7432bis SYSTEM "https://xml2rfc.ietf.org/public/rfc/bibxml3/reference.I-D.ietf-bess-rfc7432bis.xml">

]>
<!-- If further character entities are required then they should be added to the DOCTYPE above.
     Use of an external entity file is not recommended. -->

<?rfc strict="yes" ?>
<!-- give errors regarding ID-nits and DTD validation -->

<?rfc compact="yes" ?>
<!-- do not start each main section on a new page -->
<?rfc subcompact="no" ?>
<!-- keep one blank line between list items -->

<rfc category="std"
    xmlns:xi="http://www.w3.org/2001/XInclude"
    docName="draft-kriswamy-idr-route-type-capability-01"
    updates=""
    consensus="true"
    submissionType="IETF"
    ipr="trust200902"
    tocInclude="true"
    tocDepth="4"
    symRefs="true"
    sortRefs="true">

 <!-- ***** 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="BGP Route Type Capability">BGP Route Type Capability</title>
    <seriesInfo name="Internet-Draft" value="draft-kriswamy-idr-route-type-capability-01"/>

    <author fullname="Krishnaswamy Ananthamurthy" initials="K." surname="Ananthamurthy">
     <organization>Cisco</organization>
     <address>
	    <postal>
          <street>170 W. Tasman Drive</street>
          <street/>
          <city>San Jose</city>
          <code>95134</code>
          <region>CA</region>
          <country>USA</country>
        </postal>
       <email>kriswamy@cisco.com</email>
     </address>
   </author>

  <author fullname="Mankamana Mishra" initials="M." surname="Mishra">
     <organization>Cisco</organization>
     <address>
	    <postal>
          <street>170 W. Tasman Drive</street>
          <street/>
          <city>San Jose</city>
          <code>95134</code>
          <region>CA</region>
          <country>USA</country>
        </postal>
       <email>mankamis@cisco.com</email>
     </address>
   </author>
  
  <author fullname="Lukas Krattiger" initials="L." surname="Krattiger">
     <organization>Cisco</organization>
     <address>
	    <postal>
          <street>170 W. Tasman Drive</street>
          <street/>
          <city>San Jose</city>
          <code>95134</code>
          <region>CA</region>
          <country>USA</country>
        </postal>
       <email>lkrattig@cisco.com</email>
     </address>
   </author>

   <author fullname="Keyur Patel" initials="K." surname="Patel">
     <organization>Arrcus</organization>
     <address>
       <email>keyur@arrcus.com</email>
     </address>
   </author>
   
   <author fullname="Jeffrey Haas" initials="J." surname="Haas">
     <organization>Juniper Networks</organization>
     <address>
       <email>jhaas@juniper.net</email>
     </address>
   </author>
   
   <date year="2024" />

   <!-- Meta-data Declarations -->
   <area>Routing</area>
   <workgroup>Inter-Domain Routing</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>BGP</keyword>

   <abstract>
	<t> BGP supports different route types, which define the encoding of Network Layer Reachability Information (NLRI)
		for some of the Address Family Identifier (AFI)/Subsequent Address Family Identifier (SAFI), like 
		Ethernet VPN (EVPN), Multicast VPN(MVPN) and so on. BGP speaker MAY reset the BGP session if a given route type 
		in an NLRI is not supported instead of treat-as-withdraw.
		This document defines Optional Capabilities pertaining to the exchange of route types that are supported
		for a particular AFI and SAFI. This framework facilitates the maintenance of sessions without necessitating
		resets or the inadvertent dropping of updates.
	</t>
   </abstract>


   <note 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>
   </note>
 </front>

 <middle>
	 
	<section anchor="intro" title="Introduction">

	<t> BGP Ethernet VPN (EVPN), Multicast VPN (MVPN), and other address families are designed to accommodate
		multiple route types. Each route type possesses distinct key lengths that consist of several fields, 
		which together form a BGP Route Key. In instances where a specific route type is unsupported by a BGP speaker, 
		there is a possibility that the session may be reset. This occurs due to the inability to ascertain the key; 
		alternatively, the speaker might interpret the update as a withdrawal and subsequently discard it. </t>
		
	<t> The sending BGP speaker remains unaware when a peer drops an Update due to an unsupported route type. </t>
		
	<t> This document defines an optional capability exchange for route types linked to each AFI/SAFI and 
		BGP speakers can signal the supported route types.  Send a specific route type in the MP_REACH_NLRI attribute
		only if they have received confirmation from their peers that the route type is supported.
		This process reduces the risk of unsupported route type exchanges, 
		improving the efficiency and reliability of routing between network peers. </t>

	</section>

	<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&nbsp;14 <xref target="RFC2119"/> <xref target="RFC8174"/> when,
      and only when, they appear in all capitals, as shown here. 
     </t>
	</section>

	
	<section title="Route Type Capability" anchor="RTC">

	<t> The Route Type Capability is a new optional BGP capability <xref target="RFC5492"/> that can be used by 
		BGP speaker to indicate the route types of a given AF/SAFI supported.</t>
		
	<t> This capability is defined as follows: </t>
		<t>              
		<list style="symbols">

			<t> Capability code: To be assigned by IANA </t>
			<t> Capability length: Variable</t>
			<t> Capability value: Consists of 0 to 63 of the tuples "AFI, SAFI, Route Type length and Route Type values for address family"</t>
		</list>
		</t>

            <figure><artwork><![CDATA[
 
         +----------------------------------------------------------+
         | Address Family Identifier (2 octets)                     |
         +----------------------------------------------------------+
         | Subsequent Address Family Identifier (1 octet)           |
         +----------------------------------------------------------+
         | Route Type length (1 cotet)                              |
         +----------------------------------------------------------+
         | Route Types (variable length)                            |
         +----------------------------------------------------------+
           ]]>
            </artwork></figure>
		
	
	<t>              
	<list style="symbols">
		<t>
			The AFI and SAFI, taken in combination, indicate that Route Types
			supported for routes that are advertised with the
			same AFI and SAFI.  Route Types may be explicitly associated with a
			AFI and SAFI using the encoding of <xref target="RFC4760"/>.
		</t> 
		
		<t> 
		Route Type length: 
		This field specifies the total length in octets ranging from 1 to 32, of Route Types field. </t> 
		
		<t> 
		Route Type: 
		This field specifies the route types and consists of a bit-string, with each bit set to indicate that the corresponding
		route type that can be accepted by the BGP Speaker advertising this capability. </t> 
	</list>
	</t>
	<t>
	<figure>
	<artwork>
		Example encoding for Capability Value:
				
		0                1
		 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5
		+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
		|0|1|1|1|1|1|1|1|1|1|1|1|1|1|1|1|
		+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
	</artwork>
	</figure>
		
			Bit 0 set to 0, while bits 1 through 15 are all set to 1, 
			which indicates that the speaker supports route types 1 through 15.
			This indicates that the speaker has the capability to support route types
			ranging from 1 to 15 for a particular AFI and SAFI. Each of these bits
			corresponds to a specific route type, and setting them to 1 signifies 
			that the speaker can successfully exchange route information of these types
			with its peers. Thus, the configuration effectively communicates the speaker's 
			readiness to handle various route types within the designated AFI/SAFI.
	</t> 
	
	<t>
		A speaker that supports multiple "AFI, SAFI" tuples that requires route type capability exchanges 
		includes them as multiple capabilities in the Capabilities Optional Parameter.</t> 
	
	<t>
	If route type capabilities are exchanged between BGP speakers for a specific AFI/SAFI, and 
	the BGP peer does not support a particular route type, that route should not be advertised to the peer.</t> 
	
	</section>
	
	<section anchor="Operation" title="Operation">
	<t>
		When the Route Type Capability is advertised, any route type bits that are not included in the 
		encoded bit-string will be interpreted as if they were transmitted with a value of zero for 
		the corresponding bit.
	</t>
	<t>
		The Route Type length specifies the octets required to represent the Route Type Bits. 
		Although the complete representation of all possible route types only demands 32 octets, 
		it is recommended that implementations limit the number of octets transmitted to those 
		essential for encoding the final one-bit. This practice helps optimize data transmission. 
		Furthermore, in certain implementations, the available capacity for BGP Route Type may be 
		limited due to the need to convey multiple route type capabilities, potentially affecting 
		the overall size and efficiency of the routing information exchanged.
		(See <xref target="I-D.ietf-idr-ext-opt-param"/> for discussion on a feature to address this point.)
	</t>
	<t>
		Bit-values 0 and 255 SHOULD be set to zero as they are RESERVED.
	</t>
	<t>
		A BGP Speaker that has received the Route Type Capability Bits MUST ensure it does not originate or propagate any 
		BGP Route Type encoded NLRI containing a route type that is absent from the received bit-string. 
	</t>
	<t>
		A BGP Speaker that has received an AFI/SAFI without Route Type Capability MUST treat the 
		absence as equivalent to having received the Route Type Capability Bits covered by the 
		base or relevant specification for that address family.
	</t>
	<t>
		The Route Type Capability MAY be dynamically updated through the use of the 
		Dynamic Capability capability and associated mechanisms defined in
		 <xref target="I-D.ietf-idr-dynamic-cap"/>.
	</t>
	</section>
	
	<section anchor="Error Handling" title="Error Handling">
	<t>
		If a BGP Speaker sends BGP Route Type Capability Bits for a given AFI/SAFI and receives a 
		BGP NLRI with an unadvertised route type, it MUST discard those routes unless specified 
		otherwise for that address family.
	</t>
	</section>

	<section title="Security Considerations">
		<t> 
			This extension to BGP does not change the underlying security issues
			inherent in the existing BGP.
		</t>
	</section>

		<section anchor="iana" title="IANA Considerations">
		<t>
			IANA is requested to assign a new BGP Capability to the Capability
			Codes registry from the First Come, First Served pool.  The Reference
			for the registration is this document.  The Change Controller is IETF.
		</t>
		</section>


</middle>

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

<back>
    <!-- References split into informative and normative -->
    <references title="Normative References">
        <xi:include href="https://www.rfc-editor.org/refs/bibxml/reference.RFC.2119.xml"/>
        <xi:include href="https://www.rfc-editor.org/refs/bibxml/reference.RFC.5492.xml"/>
        <xi:include href="https://www.rfc-editor.org/refs/bibxml/reference.RFC.8174.xml"/>
        <xi:include href="https://www.rfc-editor.org/refs/bibxml/reference.RFC.4760.xml"/>
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml3/reference.I-D.ietf-idr-ext-opt-param.xml"/>
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml3/reference.I-D.ietf-idr-dynamic-cap.xml"/>





    </references> 

	
	<section anchor="contributors" numbered="false" toc="include" removeInRFC="false">
		<name slugifiedName="name-contributors">Contributors</name>
	<t indent="0">
		In addition to the authors listed on the front page, the following
		coauthors have also contributed to this document:</t>
				<t indent="0"> <contact fullname="Satya Mohanty"/></t>
	</section>



</back>
</rfc>

