<?xml version="1.0" encoding="US-ASCII"?>
<!DOCTYPE rfc SYSTEM "rfc2629.dtd">
<?rfc toc="yes"?>
<?rfc tocompact="yes"?>
<?rfc tocdepth="4"?>
<?rfc tocindent="yes"?>
<?rfc symrefs="yes"?>
<?rfc sortrefs="yes" ?>
<?rfc comments="yes"?>
<?rfc inline="yes"?>
<?rfc compact="yes" ?>
<?rfc subcompact="no" ?>
<rfc category="info" docName="draft-gredler-idr-bgplu-epe-00"
     ipr="trust200902">

  <!-- ***** FRONT MATTER ***** -->

  <front>
    <title>Egress Peer Engineering using BGP-LU</title>

    <!-- add 'role="editor"' below for the editors if appropriate -->

    <author fullname="Hannes Gredler" initials="H" surname="Gredler" role="editor">
      <organization>Juniper Networks, Inc.</organization>
      <address>
	<postal>
	  <street>1194 N. Mathilda Ave.</street>
	  <city>Sunnyvale</city>
	  <region>CA</region>
	  <code>94089</code>
	  <country>US</country>
	</postal>
	<email>hannes@juniper.net</email>
      </address>
    </author>

    <author fullname="Kaliraj Vairavakkalai" initials="K" surname="Vairavakkalai">
      <organization>Juniper Networks, Inc.</organization>
      <address>
	<postal>
	  <street>1194 N. Mathilda Ave.</street>
	  <city>Sunnyvale</city>
	  <region>CA</region>
	  <code>94089</code>
	  <country>US</country>
	</postal>
	<email>kaliraj@juniper.net</email>
      </address>
    </author>

    <author fullname="Chandra Ramachandran" initials="C" surname="Ramachandran">
      <organization>Juniper Networks, Inc.</organization>
      <address>
	<postal>
	  <street>Electra, Exora Business Park Marathahalli - Sarjapur Outer Ring Road</street>
	  <city>Bangalore</city>
	  <region>KA</region>
	  <code>560103</code>
	  <country>India</country>
	</postal>
	<email>csekar@juniper.net</email>
      </address>
    </author>

    <author fullname="Balaji Rajagopalan" initials="B" surname="Rajagopalan">
      <organization>Juniper Networks, Inc.</organization>
      <address>
	<postal>
	  <street>Electra, Exora Business Park Marathahalli - Sarjapur Outer Ring Road</street>
	  <city>Bangalore</city>
	  <region>KA</region>
	  <code>560103</code>
	  <country>India</country>
	</postal>
	<email>balajir@juniper.net</email>
      </address>
    </author>

    <author fullname="Luyuan Fang" initials="L" surname="Fang">
      <organization>Microsoft</organization>
      <address>
	<postal>
	  <street>5600 148th Ave NE</street>
	  <city>Redmond</city>
	  <region>WA</region>
	  <code>98052</code>
	  <country>US</country>
	</postal>
	<email>lufang@microsoft.com</email>
      </address>
    </author>


    <date day="26" month="October" year="2014"/>

    <area>Routing</area>

    <workgroup>Inter-Domain Routing</workgroup>

    <keyword>MPLS</keyword>
    <keyword>BGP</keyword>
    <keyword>Label advertisement</keyword>
    <keyword>Egress Peer Engineering</keyword>
    <keyword>Traffic Engineering</keyword>

    <abstract>
      <t>
	The MPLS source routing paradigm provides path control
	for both intra- and inter- Autonomous System (AS) traffic.
	For Intra-AS path control, protocols like
	RSVP-TE <xref target="RFC3209"/> and
	CR-LDP <xref target="RFC3212"/> are utilized.
	This documents outlines how MPLS routers
	may use the BGP labeled unicast protocol (BGP-LU)
	<xref target="RFC3107"/>
	for doing traffic-engineering on inter-AS links.
      </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 title="Introduction">
      <t>
	Today BGP-LU <xref target="RFC3107"/>
	is used both as an intra-AS <xref
        target="I-D.ietf-mpls-seamless-mpls"></xref> and inter-AS
	routing protocol. BGP-LU may advertise a MPLS transport path between
	IGP regions and Autonomous Systems. Those paths may span one or more
	router hops. This document describes advertisement and use of
	one-hop MPLS label-switched paths (LSP) for traffic-engineering
	the links between Autonomous Systems.
      </t>

      <t>
	Consider Figure <xref target="SINGLE_HOP_LSP"/>:
	an ASBR router (R2) advertises a labeled
	host route for the remote-end IP address of its link (IP3).

	The BGP next-hop gets set to R2s loopback IP address. For the
	advertised Label &lt;N&gt; a forwarding action of 'POP and forward' to
	next-hop (IP3) is installed in R2's MPLS forwarding table.

	Now consider if R2 had several links and R2 would advertise
	labels for all of its inter-AS links.
	By pushing the corresponding MPLS label &lt;N&gt; on the label-stack
	an ingress router R1 may control the egress peer selection.
      </t>


      <figure anchor="SINGLE_HOP_LSP" title="single-hop LSPs">
        <artwork>
          AS1           :        AS2
                        :
+----+   iBGP   +----+  :  eBGP   +----+
| R1 |----------| R2 |-IP2----IP3-| R3 |
+----+          +----+  :         +----+
                        :
   -----------traffic-flow----------&gt;
   &lt;------------route-flow-----------
        </artwork>
      </figure>

    </section>

    <section title="Motivation, Rationale and Applicability">
      <t>
	BGP-LU is often just seen as a 'stitching' protocol for
	connecting Autonomous Systems. BGP-LU is often not visible
	as a viable protocol for solving the Inter-domain
	traffic-engineering problem.
      </t>
      <t>
	With this document the authors want to clarify the use
	of BGP-LU for traffic-engineering purposes and encourage
	both implementers and network operator to use a widely deployed and
	operationally well understood protocol,
	rather than inventing and deploying new protocols.
      </t>
    </section>

    <section title="Sample Topology">
      <t>
	The following <xref target="SAMPLE_TOPOLOGY">topology</xref>
	and IP addresses shall be used throughout
	the Egress Peering Engineering advertisement examples.
      </t>

      <figure anchor="SAMPLE_TOPOLOGY" title="Sample Topology">
        <artwork>
                                 :                  :    
           AS 1                  :        AS 2      :     AS 4
                                 :                  :    
                                 :      +-----+     :
                           /IP1--:-IP2--|ASBR3|     :
+-----+             +-----+-IP3--:-IP4--+-----+-----------+-----+
| R1  +-------------+ASBR1|      :                        |ASBR6|
+--+--+             +--+--+-IP5--:-IP6--+-----+-----------+-----+
   |                   |   \     :      |ASBR4|     :    /
   |                   |    \    :      +-----+     :   /
   |                   |     IP7-                    ---
   |                   |         \ ................ /
   |                   |          IP8-           ---
   |                   |         :    \         /   :
   |                   |         :     \       /    :
+--+--+             +--+--+      :      +--+--+     :
| R2  +-------------+ASBR2|-IP9--:-IP10-|ASBR5|     :
+-----+             +-----+      :      +-----+     :
                                 :                  :
                                 :        AS3       :
                                 :                  :
	</artwork>
      </figure>

      <section title="Loopback IP addresses and Router-IDs">
	<t><list style="symbols">
	  <t>R1: 192.168.1.1</t>
	  <t>R2: 192.168.1.2</t>
	  <t>ASBR1: 192.168.1.11</t>
	  <t>ASBR2: 192.168.1.12</t>
	  <t>ASBR3: 192.168.1.13</t>
	  <t>ASBR4: 192.168.1.14</t>
	  <t>ASBR5: 192.168.1.15</t>
	  <t>ASBR5: 192.168.1.15</t>
	</list></t>	
      </section>
      
      <section title="Link IP addresses">
	<t><list style="symbols">
	  <t>ASBR1 to ASBR3 link #1: 10.0.0.1, 10.0.0.2</t>
	  <t>ASBR1 to ASBR3 link #2: 10.0.0.3, 10.0.0.4</t>
	  <t>ASBR1 to ASBR4 link: 10.0.0.5, 10.0.0.6</t>
	  <t>ASBR1 to ASBR5 link: 10.0.0.7, 10.0.0.8</t>
	  <t>ASBR2 to ASBR5 link: 10.0.0.9, 10.0.0.10</t>
	</list></t>		
      </section>      
    </section>
    
    <section title="Egress Link Advertisement">
      <t>An ASBR assigns for each of its egress links facing a BGP
      peer, a distinct label and advertises it to its internal BGP mesh.
      The ASBR programs a forwarding action 'POP and forward'
      into the MPLS forwarding table.
      Note that the neighboring AS is not required
      to support exchanging NRLIs using BGP-LU.
      It is the local ASBR (ASBR{1,2})
      which generates the BGP-LU routes. The forwarding next-hop
      for those routes points to the link-IP addresses of the remote ASBRs (ASBR{3,4,5}).
      Note that the generated BGP-LU routes always match the BGP next-hop that the
      remote ASBRs set their BGP service routes to, such that the
      software component doing route-resolution understands
      the association between the BGP service route and the
      BGP-LU forwarding route.
      </t>

      <section title="Single-hop eBGP">
	<t>In <xref target="SAMPLE_TOPOLOGY"/> the ASBR{1,5}
	and ASBR{2,5} links are examples for single-hop eBGP
	advertisements.
	</t>
	<t>
	  <list style="symbols">
	    <t>ASBR5 advertises a BGP service (SAFI-1)
	    route {172.16/12}
	    to ASBR1 with a BGP next-hop of 10.0.0.8. ASBR1
	    re-advertises this BGP service route towards its iBGP mesh
	    (R{1,2}) it does not overwrite the BGP next-hop,
	    but rather leave it unchanged. 
	    </t>
	    <t>ASBR1 advertises a BGP-LU route {10.0.0.8/32, label 100}
	    over a single-hop eBGP session with a BGP next hop of 192.168.1.11.
	    ASBR1 programs a MPLS forwarding state of 'POP and forward'
	    to 10.0.0.8 for the advertised label 100.
	    </t>

	    <t>ASBR5 advertises a BGP service (SAFI-1)
	    route {172.16/12}
	    to ASBR2 with a BGP next-hop of 10.0.0.10. ASBR2
	    re-advertises this BGP service route towards its iBGP mesh
	    (R{1,2}) it does not overwrite the BGP next-hop,
	    but rather leave it unchanged. 
	    </t>
	    <t>ASBR2 advertises BGP-LU route {10.0.0.10/32, label 101}
	    with a BGP next hop of 192.168.1.12.
	    ASBR2 programs a MPLS forwarding state of 'POP and forward'
	    to 10.0.0.10 for the advertised label 101.
	    </t>
	  </list>
	</t>
      </section>

      <section title="Multi-hop eBGP">
	<t>
	  Todays operational practice for load-sharing across
	  parallel links is to configure a single multi-hop eBGP
	  session between a pair of routers.
	  Since the BGP next-hops of the received BGP service routes
	  are typically not on a common IP subnet, the operator
	  configures a static route with next-hops pointing
	  to each of the remote-IP addresses of the
	  underlying links.
	</t>

	<t>In <xref target="SAMPLE_TOPOLOGY"/> both ASBR{1,3}
	links are examples of a multi-hop eBGP
	advertisement. In order to advertise a distinct label
	for a common FEC throughout the iBGP mesh, ASBR1 and
	all the receiving iBGP routers need to support the
	BGP Add-paths extension.
	<xref target="I-D.ietf-idr-add-paths"/>.
	</t>

	<t>
	<list style="symbols">
	  <t>ASBR3 advertises a BGP service (SAFI-1)
	  route {172.16/12} over multi-hop eBGP
	  to ASBR1 with a BGP next-hop of 192.168.1.13. ASBR1
	  re-advertises this BGP service route towards its iBGP mesh
	  (R{1,2}) it does not overwrite the BGP next-hop,
	  but rather leave it unchanged. 
	  </t>

	  <t>For link #1, ASBR1 advertises a BGP-LU route {192.168.1.13/32, label 102}
	  with a BGP next hop of 192.168.1.11. To differentiate
	  this from the link #2 route-advertisement (which contains the same FEC)
	  it is setting the path-ID to 1.
	  ASBR1 programs a MPLS forwarding state of 'POP and forward'
	  to 10.0.0.2 for the advertised label 102.
	  </t>

	  <t>For link #2, ASBR1 advertises a BGP-LU route {192.168.1.13/32, label 103}
	  with a BGP next hop of 192.168.1.11. To differentiate
	  this from the link #1 route-advertisement (which contains the same FEC)
	  it is setting the path-ID to 2.
	  ASBR1 programs a MPLS forwarding state of 'POP and forward'
	  to 10.0.0.4 for the advertised label 103.
	  </t>
	  
	</list>
	</t>
      </section>

      <section title="Grouping of Peers">
	<t>
	  In addition to offer a distinct BGP-LU label for each egress
	  link, an ASBR MAY want to advertise a BGP-LU label which represents
	  a load-balancing forwarding action across all links going
	  to a particular Peer.
	</t>

	<t>
	  For link #1 and link #2 in <xref target="SAMPLE_TOPOLOGY"/>,
	  ASBR1 advertises a BGP-LU route {192.168.1.13/32, label 104}
	  with a BGP next hop of 192.168.1.11. To differentiate
	  this from the link #1 and link #2 route-advertisements (which contains the same FEC)
	  it is setting the path-ID to 3.
	  ASBR1 programs a MPLS forwarding state of 'POP and
	  load-balance'
	  to 10.0.0.2 and 10.0.0.4 for the advertised label 104.
	</t>
     </section>

    </section> <!-- end 'Egress Link Advertisement' -->

    <section title="Egress Link Protection">
      <t> It is desirable to provide a local-repair based
      protection scheme, in case a redundant path
      is available to reach a peer AS. Protection
      may be applied at multiple levels in the routing stack.
      Since the ASBR has insight in both BGP-LU and BGP service
      advertisements, protection can be provided at the BGP-LU,
      at the BGP service or both levels.
      </t>

      <section title="FRR backup routes">
	<t>
	  Assume the network operator wants to provide
	  a local-repair next-hop for the 172.16/12 BGP
	  service route at ASBR1. The active route
	  resolve over the parallel links towards ASBR3.
	  In case the link #1 between ASBR{1,3} fails
	  there are now several candidate backup paths providing
	  protection against link or node failure.
	</t>

	<section title="Local links">
	  <t>
	    Assuming that the remaining link #2 between ASBR{1,3}
	    has enough capacity, and link-protection is sufficient,
	    this link MAY serve as temporary backup.
	  </t>

	  <t>
	    However if node-protection or additional capacity is
	    desired, then the local link between ASBR{1,4} or ASBR{1,5}
	    MAY be used as temporary backup.
	  </t>
	</section>

	<section title="Remote BGP-LU labels">
	  <t>ASBR1 is both originator and receiver of
	  BGP routing information. For this protection
	  method it is required that the ASBRs support the
	  <xref target="I-D.ietf-idr-best-external"/>
	  behavior.

	  ASBR1 receives both the BGP-LU and BGP service routes from
	  ASBR2 and therefore can use the ASBR2 advertised label
	  as a backup path given that ASBR1 has a tunnel towards
	  ASBR2.
	  </t>
	</section>

	<section title="Local IP forwarding tables">
	  <t>
	    For protecting plain unicast (Internet) routing
	    information a very simple backup scheme
	    could be to recurse to the relevant IP forwarding
	    table and do an IP lookup to further determine
	    a new egress link.	    
	  </t>
	</section>
      </section>

    </section> <!-- end 'Egress Link Protection' -->

    
    <section title="Dynamic link utilization">
      <t>For a software component which controls the egress
      link selection it may be desirable to know about
      a particular egress link current utilization, such that
      it can adjust the traffic that gets sent to
      a particular interface.
      </t>

      <t>
      In <xref target="I-D.ietf-idr-link-bandwidth"/>
      a community for reporting link-bandwidth is specified.
      Rather than reporting the static bandwidth of the link,
      the ASBRs shall report the available bandwidth as seen
      by the data-plane via the link-bandwidth
      community in their BGP-LU update message.
      </t>
      <t>It is crucial that ingress routers
      learn quickly about congestion of an egress link and hence
      it is desired to get high frequency updates of the
      advertised per-link BGP-LU labels.
      </t>
    </section>

    <section anchor="Acknowledgements" title="Acknowledgements">
      <t>Many thanks to Yakov Rekhter for his detailed review and
      insightful comments</t>
    </section>

    <section anchor="IANA" title="IANA Considerations">
      <t>
	This documents does not request any action from IANA.
      </t>
    </section>

    <section anchor="Security" title="Security Considerations">
      <t>This document does not introduce any change in terms of BGP security.</t>
    </section>
  </middle>

  <!--  *****BACK MATTER ***** -->

  <back>

    <references title="Normative References">
      <?rfc include="http://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.2119.xml"?>
      <?rfc include="http://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.3107.xml"?>
      <?rfc include="http://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.3209.xml"?>
      <?rfc include="http://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.3212.xml"?>
    </references>

    <references title="Informative References">
      <?rfc include="http://xml2rfc.tools.ietf.org/public/rfc/bibxml3/reference.I-D.draft-ietf-mpls-seamless-mpls-07.xml"?>
      <?rfc include="http://xml2rfc.tools.ietf.org/public/rfc/bibxml3/reference.I-D.draft-ietf-idr-add-paths-10.xml"?>
      <?rfc include="http://xml2rfc.tools.ietf.org/public/rfc/bibxml3/reference.I-D.draft-ietf-idr-best-external-05.xml"?>
      <?rfc include="http://xml2rfc.tools.ietf.org/public/rfc/bibxml3/reference.I-D.draft-ietf-idr-link-bandwidth-06.xml"?>
    </references>

  </back>
</rfc>
