<?xml version="1.0" encoding="US-ASCII"?>
<!DOCTYPE rfc SYSTEM "rfc2629.dtd">
<?rfc toc="yes"?>
<?rfc tocompact="yes"?>
<?rfc tocdepth="2"?>
<?rfc tocindent="yes"?>
<?rfc symrefs="yes"?>
<?rfc sortrefs="yes"?>
<?rfc comments="yes"?>
<?rfc inline="yes"?>
<?rfc compact="yes"?>
<?rfc subcompact="no"?>
<rfc category="std" docName="draft-decraene-idr-next-hop-capability-03" ipr="trust200902" updates="6790" >
	<front>
		<title abbrev="BGP Next-Hop Capabilities">BGP Next-Hop dependant capabilities</title>

		<author fullname="Bruno Decraene" initials="B." surname="Decraene">
			<organization>Orange</organization>

			<address>
				<email>bruno.decraene@orange.com</email>
			</address>
		</author>
  
  <author initials="K." surname="Kompella" fullname="Kireeti Kompella">
    <organization>Juniper Networks, Inc.</organization>
    <address>
      <postal>
	<street>1194 N.  Mathilda Avenue</street>
	<city>Sunnyvale</city>
	<region>CA</region>
	<code>94089</code>
	<country>USA</country>
      </postal>
      <email>kireeti.kompella@gmail.com</email>
    </address>
  </author>
  
    <author initials="W." surname="Henderickx" fullname="Wim Henderickx">
    <organization>Nokia</organization>
    <address>
      <postal>
	<street>Copernicuslaan 50</street>
	<city>Antwerp 2018</city>
	<region>CA</region>
	<code>95134</code>
	<country>Belgium</country>
      </postal>
      <email>wim.henderickx@nokia.com</email>
    </address>
  </author>
		
		<date year="2017" />

		<abstract>
			<t>RFC 5492 defines capabilities advertisement for the BGP peer. In addition, it is useful to be able to advertise BGP Next-Hop dependant capabilities, in particular for forwarding plane features. RFC 5492 is not applicable because the BGP peer may be different from the BGP Next-Hop, in particular when BGP Route Reflection is used. This document defines a mechanism to advertise such BGP Next Hop dependant Capabilities.</t>
			
			<t>This document defines a new BGP non-transitive attribute to carry Next-Hop Capabilities. This attribute is deleted or possibly modified when the BGP Next Hop is changed.</t>
			
			<t>This document also defines a Next-Hop capability to advertise the ability to handle the MPLS Entropy Label defined in RFC 6790. It updates RFC 6790 with regard to this BGP signaling.</t>

		</abstract>

	    <note title="Requirements Language">
      <t>The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this  document are to be interpreted as described in <xref target="RFC2119">RFC 2119</xref>.</t>
		</note>
		
	</front>

	<middle>
		<section anchor="Introduction" title="Introduction">

			<t><xref target="RFC5492"></xref> defines capabilities advertisement for the BGP peer. In addition, it is useful to be able to advertise BGP Next-Hop dependant capabilities, in particular for forwarding plane features. RFC 5492 is not applicable because the BGP peer may be different from the BGP Next-Hop, in particular when BGP Route Reflection is used. This document defines a mechanism to advertise such BGP Next Hop Capabilities.</t>
			
			<t>This document defines a new BGP non-transitive attribute to carry Next-Hop Capabilities. When the BGP Next Hop is changed, this attribute is deleted or possibly modified to take into account the capabilities of the new BGP Next-Hop. Hence it allows advertising capabilities which are dependent of the BGP Next-Hop.</t>
						
			<t>This attribute advertises the capabilities of the BGP Next-Hop for the NLRI advertised in the same BGP update. A BGP Next-Hop may advertise different capabilities for different set of NLRI.</t>
			
			
			<t>This document also defines a first application to advertise the capability to handle the MPLS Entropy Label defined in <xref target="RFC6790"></xref>. Note that RFC 6790 had originally defined a BGP attribute for this but it has been latter deprecated in <xref target="RFC7447"></xref>.</t>
   
		</section>
   
		<section anchor="Attribute" title="BGP Next-Hop dependant Capabilities Attribute">  
   		<section anchor="Encoding" title="Encoding">

			<t>The BGP Next-Hop dependant Capabilities Attribute is an optional, non-transitive BGP Attribute, of value TBD1. The attribute consists of a set of Next-Hop Capabilities.</t>

			<t>The inclusion of a Next-Hop Capability "X" in a BGP UPDATE message, indicates that the BGP Next-Hop, encoded in either the NEXT_HOP attribute defined in <xref target="RFC4271"></xref> or the Network Address of Next Hop field of the MP_REACH_NLRI attribute defined in <xref target="RFC4760"></xref>, supports the capability "X" for the NLRI advertised in this BGP UPDATE.</t>
			<t>This document does not make a distinction between these two Next-Hop fields and uses the term 'BGP Next-Hop' to refer to whichever one is used in a given BGP UPDATE message.</t>

			<t>A Next-Hop Capability is a triple (Capability Code, Capability Length, Capability Value) aka a TLV:</t>
			
			<figure anchor="Capability" title='BGP Next-Hop Capability'><preamble></preamble><artwork align="center">
+------------------------------+
| Capability Code (1 octet)    |
+------------------------------+
| Capability Length (1 octet)  |
+------------------------------+
| Capability Value (variable)  |
~                              ~
+------------------------------+
</artwork></figure>
			
			
			<t>Capability Code:	a one-octet unsigned binary integer which indicates the type of "Next-Hop Capability" advertised and unambiguously identifies an individual capability.</t>
							
			<t>Capability  Length: a one-octet unsigned binary integer which indicates the length, in octets, of the Capability Value field. A length of 0 indicates that no Capability Value Field is present.</t>
							
			<t>Capability Value: a variable-length field from 0 to 255 octets. It is interpreted according to the value of the Capability Code.</t>
		
			  <t>BGP speakers SHOULD NOT include more than one instance of a Next-Hop capability with the same Capability Code, Capability Length, and
   Capability Value.  Note, however, that processing of multiple instances of such capability does not require special handling, as
   additional instances do not change the meaning of the announced  capability; thus, a BGP speaker MUST be prepared to accept such
   multiple instances.</t>

   <t>BGP speakers MAY include more than one instance of a capability (as identified by the Capability Code) with non-zero Capability Length
   field, but with different Capability Value and either the same or different Capability Length.  Processing of these capability
   instances is specific to the Capability Code and MUST be described in the document introducing the new capability.</t>
		
		</section>
		
		 <section anchor="AttributeOperation" title="Attribute Operation">

			<t>The BGP Next-Hop dependant Capabilities attribute being non-transitive, as per <xref target="RFC4271"></xref>, a BGP speaker which does not understand it will quietly ignore it and not pass it along to other BGP peers.</t>
			<t>A BGP speaker that understands the BGP Next-Hop dependant Capabilities Attribute and does not change the BGP Next-Hop, SHOULD NOT change the BGP Next-Hop dependant Capabilities Attribute and SHOULD pass the attribute unchanged along to other BGP peers.</t>

			<t>A BGP speaker that understands the BGP Next-Hop dependant Capabilities Attribute and changes the BGP Next-Hop, MUST remove the received BGP Next-Hop dependant Capabilities Attribute before propagating the BGP UPDATE to other BGP peers. It MAY attach a new BGP Next-Hop dependant Capabilities attribute describing the capabilities of the new BGP Next-Hop for these NLRIs.</t>
   
		</section>
		
		
		<section anchor="CapabilityOperation" title="Capability Code Operation">

			<t>A BGP speaker receiving a BGP Next-Hop Capability Code that it supports behave as defined in the document defining this Capability Code.
		    A BGP speaker receiving a BGP Next-Hop Capability Code that it does not support MUST ignore this BGP Next-Hop Capability Code. In particular, this MUST NOT be handled as an error.	In both cases, the BGP speaker MUST examine the remaining BGP Next-Hop Capability Code(s) that may be present in the BGP Next-Hop Capabilities Attribute.</t>
			
			<t>The BGP Next-Hop Capability Code MUST reflect the capability of the router indicated in the BGP Next-Hop, for the NLRI advertised in the BGP UPDATE. If a BGP speaker sets the BGP Next-Hop to an address of a different router (e.g. R), it MUST NOT advertise BGP Next-Hop Capabilities not supported by this router R for these NLRI.</t>
			
			<t>The presence of a Next-Hop Capability SHOULD NOT influence route selection or route preference of a route, unless tunneling is used to reach the BGP Next-Hop or the selected route has been learnt from EBGP (i.e. the Next-Hop is in a different AS). Indeed, it is in general impossible for a node to know that all BGP routers of the Autonomous System (AS) will understand a given Next-Hop Capability; and having different routers, within an AS, use a different preference for a route, may result in forwarding loops if tunnelling is not used to reach the BGP Next-Hop.</t>
			
			<t>An implementations MAY allow, by configuration, removing this attribute or specific Next-Hop capabilities when advertising the routes over EBGP.</t>
				 
		</section>
		
		
		
		<section anchor="Error" title="Attribute Error Handling">

			<t>A BGP Next-Hop dependant Capabilities Attribute is considered malformed if the length of the Attribute is not equal to the sum of all 
			(BGP Next-Hop dependant Capability Length +2) of the capabilities carried in this attribute. Note that "2" is the length of the fields "Type" and "Length" of each BGP Next Hop dependant Capability, as the capability length only account for the length of the Value field.</t>

			<t>A document that specifies a new Next-Hop Capability SHOULD provide specifics regarding what constitutes an error for that Next-Hop Capability.</t>
			
			<t>A BGP UPDATE message with a malformed BGP Next-Hop dependant Capabilities Attribute SHALL be handled using the approach of "attribute discard" defined in <xref target="RFC7606"></xref>.</t>
			
			<t>Unknown Next-Hop Capabilities Codes MUST NOT be considered as an error. They MUST be silently ignored.</t>
		
			<t>If a Next-Hop dependant Capability is malformed, this Next-Hop Capability Type MUST be ignored. Others Next-Hop Capabilities MUST be processed as usual.</t>

   		</section>
   		</section>
   
   
      	<section anchor="ELC" title="Entropy Label Next-Hop dependant Capability">
			<t>The Entropy Label Next-Hop Capability has type code 1 and a length of 0 or 1 octet.</t>
			
			<t>The inclusion of the "Entropy Label" Next-Hop Capability indicates that the BGP Next-Hop can be sent packets, for all routes indicated in the NRLI, with a MPLS entropy label (ELI, EL) added immediately after the label stack advertised with the NLRI.</t>
			
			<t>On the receiving side, suppose BGP speaker S has determined that packet P is to be forwarded according to BGP route R, where R is a route of one of the labeled address families.  And suppose that L is the label stack embedded in the NLRI of route R. Then to forward packet P according to route R, S either replaces P's top label with L, or else pushes L onto the MPLS label stack. If the EL-Capability is advertised in the BGP UPDATE advertising this route R, S knows that it may safely place the ELI and an EL on the label stack immediately beneath L.</t>
			
			<t>A BGP speaker S that sends an UPDATE with the BGP Next-Hop "NH" MAY include the Entropy Label Next-Hop Capability only if the NLRI are labelled and for all the NLRI in the BGP UPDATE, either of the following is true:<list style="symbols" hangIndent="1">
			<t>Egress case: NH is the egress of the LSP advertised with the NLRI and its capable of handling the ELI during the lookup of the MPLS top label.</t>
			<t>Transit LSR case: NH is a transit LSR for the LSP advertised with the NLRI (i.e. NH swaps one of the label advertised in the NLRI) and next downstream BGP Next-Hop(s) has(have) advertised the Entropy Label Next-Hop Capability (or a similar capability signalled by protocol P if the route is redistributed, by NH, from protocol P to BGP).</t>
			</list></t>
			
			
		<section anchor="ELC-error" title="Entropy Label Next-Hop Capability error handling">
			<t>If the Entropy Label Next-Hop Capability is present more than once, it MUST be considered as received once with a length of 0.</t>
			<t>If the Entropy Label Next-Hop Capability is received with a length other than 0 or 1, it is not considered malformed, but its semantics are exactly the same as if it had a length of 1. In other words, additional octets MUST be ignored. This is to allow for graceful future extension.</t>
		</section>
		
	</section>
   

		<section anchor="IANA" title="IANA Considerations">
			<section anchor="IANA_Attribute" title="Next-Hop Capabilities Attribute">
			<t>IANA is requested to allocate a new Path Attribute, called "Next-Hop Capabilities", type Code TBD1, from the "BGP Path Attributes" registry.</t>
			</section>
			
			<section anchor="IANA_Registry" title="Next-Hop Capability registry">
			
				<t>The IANA is requested to create and maintain a registry entitled "Next-Hop Capabilities".</t>
				<t>The registration policies <xref target="RFC5226"></xref> for this registry are:</t>
				<t><figure align="left"><preamble></preamble><artwork align="left"> <![CDATA[
     1-63   IETF Review
   64-127   First Come First Served
  128-250   Standards Action
  251-254   Experimental Use
      255   Reserved
  ]]></artwork></figure></t>

				<t>IANA is requested to make the following initial assignments:</t>

				<t><figure align="left"><preamble></preamble><artwork align="left"> <![CDATA[
            Registry Name: Next-Hop Capability.

 Value      Meaning                                  Reference
 ---------- ---------------------------------------- ---------
       0    Reserved  (not to be allocated)          This document
       1    Entropy Label                            This document
   2-250    Unassigned
 251-254    Experimental                             This document
     255    Reserved (for futur registry extension)  This document
       ]]></artwork></figure></t>

			</section>

		</section>
		<section anchor="Security" title="Security Considerations" toc="default">

			<t>This document does not introduce new security vulnerabilities in BGP. Specifically, an operator who is relying on the information carried
   in BGP must have a transitive trust relationship back to the source of the information.  Specifying the mechanism(s) to provide such a
   relationship is beyond the scope of this document. Please refer to the Security Considerations section of <xref target="RFC4271"></xref> for security mechanisms applicable to BGP.</t>

		</section>

		<section anchor="Acknowledgement" title="Acknowledgement" toc="default">

			<t>The Entropy Label Next-Hop Capability defined in this document is based on the ELC BGP attribute defined in section 5.2 of <xref target="RFC6790"></xref>.</t>
			<t>The authors wish to thank John Scudder for the discussions on this topic and Eric Rosen for his in-depth review of this document.</t>
			<t>The authors wish to thank Jie Dond for his review and comments.</t>

		</section>

	</middle>

	<back>
		<references title="Normative References">
			<?rfc include="reference.RFC.2119"?>
			<?rfc include="reference.RFC.6790"?>
			<?rfc include="reference.RFC.5226"?>
			<?rfc include="reference.RFC.4271"?>
			<?rfc include="reference.RFC.4760"?>
			<?rfc include="reference.RFC.7606"?>


		</references>

		<references title="Informative References">
			<?rfc include="reference.RFC.5492"?>
			<?rfc include="reference.RFC.7447"?>



		</references>
	</back>
</rfc>
