<?xml version="1.0" encoding="US-ASCII"?>
<!DOCTYPE rfc SYSTEM "rfc2629.dtd" [
	<!ENTITY RFC2119 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.2119.xml">
	<!ENTITY RFC8277 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.8277.xml">
	<!ENTITY RFC4271 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.4271.xml">
	<!ENTITY RFC4272 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.4272.xml">
	<!ENTITY RFC4760 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.4760.xml">
	<!ENTITY RFC6790 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.6790.xml">
	<!ENTITY RFC7447 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.7447.xml">
	<!ENTITY RFC8174 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.8174.xml">
	<!ENTITY I-D.ietf-idr-next-hop-capability SYSTEM 
	  "http://xml.resource.org/public/rfc/bibxml3/reference.I-D.ietf-idr-next-hop-capability.xml">
	  	<!ENTITY I-D.scudder-bgp-entropy-label SYSTEM 
	  "http://xml.resource.org/public/rfc/bibxml3/reference.I-D.scudder-bgp-entropy-label.xml">
]>
<?xml-stylesheet type='text/xsl' href='rfc2629.xslt' ?>
<?rfc strict="yes" ?>
<!-- ><?rfc toc="no"?> -->
<?rfc tocdepth="4"?>
<?rfc symrefs="yes"?>
<?rfc sortrefs="yes" ?>
<?rfc compact="yes" ?>
<?rfc subcompact="no" ?>
<rfc category="std" docName="draft-scudder-idr-entropy-label-00" ipr="trust200902">


  <front>
    <title abbrev="ELCv3">BGP Entropy Label Capability, Version 3</title>

    <author fullname="John G. Scudder" initials="J. G."
            surname="Scudder"
            role="editor">
      <organization>Juniper Networks</organization>
      <address>
        <email>jgs@juniper.net</email>
      </address>
    </author>

    <author fullname="Kireeti Kompella" initials="K."
            surname="Kompella">
      <organization>Juniper Networks</organization>
      <address>
        <email>kireeti@juniper.net</email>
      </address>
    </author>
    
	<author fullname="Satya Mohanty" initials="S." surname="Mohanty">
		<organization>Cisco Systems</organization>
		<address>
			<email>satyamoh@cisco.com</email>
		</address>
    </author>

    <author fullname="James Uttaro" initials="J." surname="Uttaro">
    	<organization>AT&amp;T</organization>
    	<address>
    		<email>ju1738@att.com</email>
    	</address>
    </author>
    
    <author fullname="Bin Wen" initials="B." surname="Wen">
    	<organization>Comcast</organization>
    	<address>
    		<email>Bin_Wen@comcast.com</email>
    	</address>
    </author>
    
    <date/>

    <area>General</area>
    <workgroup>Internet Engineering Task Force</workgroup>
    <keyword>BGP</keyword>
    <keyword>MPLS</keyword>

    <abstract>
		<t>
This specification defines the Entropy Label Capability Attribute
version 3 (ELCv3), a BGP attribute that can be used to inform an
LSP ingress router about an LSP egress router's ability to 
process entropy labels. This version of the attribute corrects
a specification error in the first version, and an improper code
point reuse in the second.
		</t>
    </abstract>
  </front>

<middle>
<section anchor="intro" title="Introduction">
	<t>
<xref target="RFC6790"/> defines the Entropy Label Capability attribute
(ELC), an optional, transitive BGP path attribute. For correct
operation, it is necessary that any intermediate node modifying the next
hop of a route must remove the ELC unless the node so doing is able to
process entropy labels. Sadly, these requirements cannot be fulfilled
with the ELC as specified, because it is an optional, transitive
attribute: by definition, a node that does not support the ELC will
propagate the attribute. But such a node might be exactly the one that
we desire to remove it. For this reason, <xref target="RFC7447"/>
deprecated the attribute.
	</t>
	<t>
Roughly concurrently with the development and advancement of RFC 7447,
Juniper Networks began shipping routing code that implements what is
documented in <xref target="I-D.scudder-bgp-entropy-label"/> and dubbed
Entropy Label Capability version 2 (ELCv2). That implementation uses the
code point that was assigned by RFC 6790 and deprecated by RFC 7447. At
time of writing, the functionality is in use in operational networks.
	</t>
	<t>
The present specification is based on ELCv2 but moves to a new, previously
unallocated, code point.
	</t>
	<t>
A related solution to the problem of signaling entropy label capability
is <xref target="I-D.ietf-idr-next-hop-capability"/>. That specification
is based on an optional, non-transitive path attribute. In contrast,
ELCv3 (and ELCv2) is based on an optional, transitive path attribute.
This expands the deployment options available -- in many cases (for
example, route reflectors) it's fine that an intermediate node does
propagate an ELCv3 even if it doesn't itself have the ability to process
entropy labels. 
	</t>
	<t>
In order to prevent use of the signaled information beyond the intended
perimeter (the problem that led to the deprecation of ELC, and which is
inherently solved by <xref target="I-D.ietf-idr-next-hop-capability"/>'s
use of a non-transitive attribute), in this specification we take the
approach of carrying a copy of the next hop information in the ELCv3.
This allows the node processing it to know if it can rely on the
information carried therein, while still allowing it to be propagated by
all intermediate nodes.
	</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 <xref target="RFC2119">BCP 14</xref> <xref
		target="RFC8174"/> when, and only when, they appear in all
		capitals, as shown here.</t>
	</section>
</section>

<section anchor="ELCv3" title="Entropy Label Capability Path Attribute, Version 3">
     <t>
The Entropy Label Capability Path Attribute, Version 3 (ELCv3) is an
optional, transitive BGP attribute with type code TBD1. The ELCv3 has as
its data a network layer address, representing the next hop of the route
the ELCv3 accompanies. The ELCv3 signals a useful optimization, so it is
desirable to make it transitive; the next hop data is to ensure
correctness if it traverses BGP speakers that do not understand the ELCv3.   
	</t>
	<t>
The Attribute Data field of the ELCv3 path attribute is encoded as
shown below:
	</t>
	<t>
    	<figure align="center">
    		<artwork align="left"><![CDATA[
   +---------------------------------------------------------+
   | Address Family Identifier (2 octets)                    |
   +---------------------------------------------------------+
   | Subsequent Address Family Identifier (1 octet)          |
   +---------------------------------------------------------+
   | Length of Next Hop Network Address (1 octet)            |
   +---------------------------------------------------------+
   | Network Address of Next Hop (variable)                  |
   +---------------------------------------------------------+
			]]></artwork>
    	</figure>
	</t>
	<t>
The meanings of the fields are as given in Section 3 of <xref
target="RFC4760"/>.
	</t>
	<t>
When BGP <xref target="RFC4271"/> is used for distributing labeled
Network Layer Reachability Information (NLRI) as described in, for
example, <xref target="RFC8277"/>, the route may include the ELCv3 as
part of the Path Attributes.  The inclusion of this attribute with a
route indicates that the egress of the associated Label Switched Path
(LSP) can process entropy labels as an egress Label Switched Router
(LSR) for that route -- see <xref target="RFC6790" section="4.2"/>. 
Below, we refer to this for brevity as being "EL-capable."
	</t>
	
	<section anchor="sending" title="Sending the ELCv3">
	<t>
When a BGP speaker S has a route R it wishes to advertise with next hop
N to its peer, it MUST NOT include the ELCv3 attribute except if it
knows that the egress of the associated LSP L is EL-capable.
Specifically, this will be true if S:
	</t>
	
	<t>
	<list style="symbols">
		<t>
	Is itself the egress, and knows itself to be EL-capable, or
		</t>
		
		<t>
	Is re-advertising a BGP route it received with a valid
	ELCv3 attribute, and is not changing the value of N, or
		</t>
		
		<t>
	Is re-advertising a BGP route it received with a valid ELCv3
	attribute, and is changing the value of N, and knows (for example,
	through configuration) that the router represented by N is either
	the LSP egress and is EL-capable, or that it will process the
	outer label(s) without processing the entropy label below, as 
	with a transit LSR, or
		</t>
		
		<t>
	Is redistributing a route learned from another protocol, and
	that other protocol conveyed the knowledge that the egress of L
	was EL-capable (for example, this might be known through the LDP
	ELC TLV, <xref target="RFC6790" section="5.1"/>).
		</t>
	</list>
	</t>
	
	<t>
In any event, when sending an ELCv3, S MUST set the data portion of the
ELCv3 to be equal to N, using the encoding given in <xref
target="ELCv3"/>.
	</t>
		
	<t>
The ELCv3 MAY be advertised with routes that are labeled,
such as those using SAFI 4 <xref target="RFC8277"/>. It MUST NOT
be advertised with unlabeled routes.
	</t>

	<t>
We note that due to the nature of BGP optional transitive path attributes,
any BGP speaker that does not implement this specification will propagate
the ELCv3, the requirements of this section notwithstanding. However,
such a speaker will not update the data part of the ELCv3.
	</t>
	</section>
	
	<section anchor="receiving" title="Receiving the ELCv3">
	<t>
When a BGP speaker receives an unlabeled route that includes the ELCv3,
it MUST discard the ELCv3.
	</t>
	<t>
When a BGP speaker receives a labeled route that includes the ELCv3, it
MUST compare the address given in the ELCv3's data portion to the next hop of the route. If the two
are equal, the egress of the LSP supports entropy labels, which implies
that the receiving BGP speaker, if acting as ingress, MAY insert an
entropy label below the advertised label, as per <xref
target="RFC6790" section="4.2"/>. If the two are not equal, either some
intermediate router that does not implement this specification modified
the next hop, or some router on the path had an incorrect
implementation. In either case, the action taken is the same: the ELCv3
MUST be discarded. The Partial bit MAY be inspected -- if it is equal to
zero, then the mismatch must have been caused by an incorrect
implementation, and the error MAY be logged.
	</t>
	<t>
When a BGP speaker receives a route that includes an ELCv3 whose
Attribute Length is less than 4, whose Attribute Length is not equal to
4 plus the value encoded in the Length of Next Hop Network Address
carried in the Attribute Data, or whose Attribute Data is otherwise
inconsistent with the encoding specified in <xref target="ELCv3"/>, it
MUST discard the ELCv3.
	</t>
	</section>
</section>
	
<section anchor="iana" title="IANA Considerations">
	<t>
IANA is requested to make a new allocation in the BGP Path Attributes
registry:
	</t>

<t>
<list style="none">
<t>Value = TBD1</t>
<t>Code = ELCv3</t>
<t>Reference = (this document)</t>
</list>
</t>
</section>
        
<section title="Security Considerations">
	<t>
Insertion of an ELCv3 by an attacker could cause forwarding to fail.
Deletion of an ELCv3 by an attacker could cause one path in the network
to be overutilized and another to be underutilized. However, we note
that an attacker able to accomplish either of these (below, an "on-path
attacker") could equally insert or remove any other BGP path attribute
or message. The former attack described above denies service for a given
route, which can be accomplished by an on-path attacker in any number of
ways even absent ELCv3. The latter attack defeats an optimization but
nothing more; it seems dubious that an attacker would go to the trouble
of doing so rather than launching some more damaging attack. In sum, the 
ELCv3 attribute creates no significant issues beyond those analyzed in 
<xref target="RFC4272"/>. 
	</t>
</section>

</middle>

<back>
	<references title="Normative References">
      &RFC2119;
      &RFC4271;
      &RFC4760;
      &RFC6790;
	  &RFC8174;
    </references>

	<references title="Informative References">
      &RFC4272;
	  &RFC7447;
      &RFC8277;
      &I-D.ietf-idr-next-hop-capability;
      &I-D.scudder-bgp-entropy-label;
    </references>
    
<!--><section>
  <name>Backward Compatibility</name>
  <t>
As was noted in <xref target="intro"/>, there are networks in which
ELCv2 (documented in <xref target="I-D.scudder-bgp-entropy-label"/>) is
already in use. 
  </t>
  <t>
Any node that sends the ELCv2 format may also include an ELCv3
per <xref target="sending"/>, so that both formats are sent. 
  </t>
  <t>
When a BGP speaker that supports the ELCv2 format receives a 
labeled route that includes both ELCv2 and ELCv3 it should evaluate each 
attribute as per their documented use (<xref target="receiving"/> in the 
case of this document). If, after evaluation, either ELCv2 or ELCv3 is 
determined to be valid, the route may be considered EL-capable.
  </t>
</section>-->

<section anchor="Contributors">
  <name>Contributors</name>
  <contact fullname="Serge Krier" initials="S" surname="Krier"><!-- https://authors.ietf.org/en/rfcxml-vocabulary#contact-->
	<!-- including contact information for contributors is optional -->
	<organization>Cisco Systems</organization>
	<address>
	  <email>sekrier@cisco.com</email>
	</address>
  </contact>
</section>

<section title="Acknowledgements">
	<t>
Thanks to Alia Atlas, Bruno Decraene, Martin Djernaes, John Drake,
Adrian Farrell, Keyur Patel, Toby Rees, and Ravi Singh, for
their discussion of this issue. Particular thanks to Kevin Wang for his
many valuable contributions.
	</t>
</section>

</back>
</rfc>
