<?xml version="1.0"?>
<!DOCTYPE rfc SYSTEM "rfc2629.dtd" [
<!ENTITY RFC2119 PUBLIC "" "http://xml.resource.org/public/rfc/bibxml/reference.RFC.2119.xml">
<!ENTITY RFC7752 PUBLIC "" "http://xml.resource.org/public/rfc/bibxml/reference.RFC.7752.xml">
<!ENTITY RFC8402 PUBLIC "" "http://xml.resource.org/public/rfc/bibxml/reference.RFC.8402.xml">
]>
<?rfc toc="yes"?>
<?rfc tocompact="yes"?>
<?rfc tocdepth="3"?>
<?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-hegde-idr-bgp-ls-epe-inter-as-01" ipr="trust200902">
<front>
  <title abbrev=" BGP-LS extensions for Inter-AS TE using EPE ">BGP-LS Extensions for Inter-AS TE using EPE based mechanisms</title>

 
 

 <author initials="S." surname="Hegde" fullname="Shraddha Hegde">
    <organization>Juniper Networks Inc.</organization>
    <address>
      <postal>
        <street>Exora Business Park</street>
        <city>Bangalore</city>
        <region>KA</region>
        <code>560103</code>
        <country>India</country>
      </postal>
      <email>shraddha@juniper.net</email>
    </address>
  </author>
 
   <author initials="S." surname="Sangli" fullname="Srihari Sangli">
    <organization>Juniper Networks Inc.</organization>
    <address>
      <postal>
        <street>Exora Business Park</street>
        <city>Bangalore</city>
        <region>KA</region>
        <code>560103</code>
        <country>India</country>
      </postal>
      <email>ssangli@juniper.net</email>
    </address>
  </author>
    <author initials="X." surname="Xu" fullname="Xiaohu Xu">
    <organization>Alibaba Inc.</organization>
    <address>
      <postal>
        <street></street>
        <city>Beijing</city>
        <region></region>
        <code></code>
        <country>China</country>
      </postal>
      <email>xiaohu.xxh@alibaba-inc.com</email>
    </address>
  </author>
  
  <date year="2019"/>
  <area>Routing</area>
  <workgroup>SPRING</workgroup>
  <keyword>EPE</keyword>
  <keyword>BGP-LS</keyword>
  <keyword>AS</keyword>
  <keyword>IGP</keyword>
  <keyword>SPRING</keyword>
  <abstract>
 <t>In certain network deployments, a single operator has multiple 
  Autonomous Systems(AS) to facilitate ease of management. A multiple AS network design 
 could also be a result of network mergers and acquisitions. 
  In such scenarios, a centralized 
  Inter-domain TE approach could provide most optimal allocation of resources and the most
  controlled path placement.
   BGP-LS-EPE <xref target ='I-D.ietf-idr-bgpls-segment-routing-epe'/> describes an
   extension to BGP Link State (BGP-LS) for the
   advertisement of BGP Peering Segments along with their BGP peering
   node and inter-AS link information, so that efficient BGP Egress Peer Engineering (EPE)
   policies and strategies can be computed based on Segment Routing.
   This document describes extensions to the BGP-LS EPE to enable it to be used
   for inter-AS Traffic-Engineering (TE) purposes.
</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" anchor='intro'>
<t>   Segment Routing (SR) leverages source routing.  A node steers a
   packet through a controlled set of instructions, called segments, by
   prepending the packet with an SR header with segment identifiers
   (SID).  A SID can represent any instruction, topological or service-
   based.  SR segments allows to enforce a flow through any topological
   path or service function while maintaining per-flow state only at the
   ingress node of the SR domain.</t>
   <t>
     As there is no per-path state in the network, the bandwidth management for the paths is
     expected to be handled by a centralized entity which has a complete view of:
	 <list>
	<t> 1. Up-to-date topology of the network</t>
     <t>2. Resources, States and Attributes of links and nodes of the network</t>
     <t>3. Run-time utilization/availability of resources</t>
     </list>
	The BGP Link-State extensions provide mechanisms whereby link-state and TE information can be propagated n a network
	and a consumer of such BGP LS updates may build topology, provide bandwidth calendering and other traffic engineering 
	services. The centralized entity can be such a consumer (also referred to as controller). In the case of multi-AS 
	networks, the controller needs to learn the per-AS network information and the inter-AS link information thus arriving 
	at a consolidated Traffic Engineering Database which can be used to compute end-to-end Traffic Engineering Path. 
	The controller can learn the topology, link-state and TE information from each of the AS networks either by 
	participating in their IGPs or by listening to BGP LS updates <xref target="RFC7752"/>. Similar information about 
	the inter-AS links can be learnt via BGP-LS EPE <xref target = 'I-D.ietf-idr-bgpls-segment-routing-epe'/> along with 
	extensions defined in this documet. </t>

</section>
<section title="Reference Topology" anchor='topo'>
	<t> The controller learns TE attributes of all the links, including
     the inter-AS links and uses the attributes to compute constrained paths.
	 The controller should be able to correlate the
     inter-AS links for bidirectional connectivity from both ASes.
     

<figure anchor="reference_diagram" title="Reference Diagram">
      <artwork>
        
        +----------+
        |Controller|
        +----------+
             |       
         |----------|
   +---------+      +------+
   |         |      |      |
   |    H    B------D      G
   |         | +---/| AS 2 |\  +------+
   |         |/     +------+ \ |      |---L/8
   A   AS1   C---+            \|      |
   |         |\\  \  +------+ /| AS 4 |---M/8
   |         | \\  +-E      |/ +------+
   |    X    |  \\   |      K
   |         |   +===F AS 3 |
   +---------+       +------+
   
    </artwork>
    </figure>
    
	
    The reference diagram from 
   <xref target ='I-D.ietf-spring-segment-routing-central-epe'/> represents multiple
    Autonomous Systems connected to each other. When the Multiple ASes belong to same operator
	and are organised into separate domains
    for operational purposes, it is advantageous to support Traffic-Engineering across 
	the ASes including the inter-AS links.
    The controller has visibility of all of the ASes by means of IGP topology exported via BGP-LS
	<xref target="RFC7752"/>,
	or other means. In addition, the inter-AS links and the labels 
    associated with the inter-AS links are exported via <xref target ='I-D.ietf-idr-bgpls-segment-routing-epe'/>.
    The controller needs to correlate the information acquired from all of the ASes, including
	the inter-AS links in order to get a view of the unified
    topology so that it can build end-to-end Traffic-Engineered paths. 
    
    </t>
   
</section>

  <section anchor='FRR_Label' title='Fast Reroute Label'>

<t> <xref target ='I-D.ietf-spring-segment-routing-central-epe'/> section 3.6 describes mechanisms to provide 
Fast Reroute (FRR) protection for the EPE Labels.  The BGP-LS EPE <xref target ='I-D.ietf-idr-bgpls-segment-routing-epe'/> 
describes "B" bit to indicate that a PeerNodeSID or PeerAdjSID is eligible for backup. However, it does not specify what 
is the behaviour when the failure kicks-in. The controller needs to know which links are used for protection
so that admission control and failure simulation can be done effectively and appropriate inter-AS links
used for path construction.</t>


<t>This document defines a new flag "F" in the Peering SIDs TLV to indicate a SID as an FRR SID. With the "F" flag set,
 the protection for any peering SID can be specified using another PeerAdjSID, PeerNodeSID or PeerSetSID to the controller.
If the protection is achieved by fallback to local IP lookup, FRR SID SHOULD not be advertised.

The link(s) represented by the FRR SID will carry the traffic when there is a failure. These SIDs are included as an FRR SIDs
in the peerAdjSID, PeerNodeSID and PeerSetSID advertisements.
</t> 
  
    <figure anchor="flags" title="Peering SID TLV Flags Format">
      <artwork>

      0 1 2 3 4 5 6 7
   +-+-+-+-+-+-+-+-+
   |V|L|B|P|F|Rsvd |
   +-+-+-+-+-+-+-+-+

      </artwork>
    </figure>



<t>
*  F-Flag: FRR Label Flag: If set, the peer SID where the FRR Label appears is using backup links represented by FRR Label.

</t>

</section>

<section title='TE Link attributes of PeerNode SID'>


<t> In any eBGP deployment, the peering session can be either single-hop of multi-hop. For single-hop eBGP sessions, the 
	peering address is that of the directly attached interface to which the session is pinned down. For multi-hop 
	eBGP session, the peering adress is reachable over more than one interface and that the peering session is not pinned 
	down to any of the directly attached interfaces. </t>

<t> A Peer Node Segment is a segment describing a peer, including the SID (PeerNodeSID) allocated to it. The link descriptors 
	for the  PeerNodeSID include the addresses used by the BGP session encoded using TLVs as defined in 
	<xref target="RFC7752"/>. Since the eBGP session can be either single-hop or multi-hop, the IP address used by BGP 
	session as local/neigbour is not sufficient to identify the underlaying interface(s). Also, the controller needs to
	know the links associated with the PeerNodeSID, to be able derive TE link attributes. This can be achieved by 
	including the interface local and remote addresses in the Link attributes in PeerNodeSID NLRI.  </t>

	  <t>PeerAdjSID MUST be advertised for each inter-AS link for the purposes of inter-AS TE. The PeerAdjSID should 
	contain link TE attributes such as bandwidth, admin-group etc. The PeerAdjSID should also contain the local and 
	remote interface IPv4/IPv6 addresses which is used for correlating the links. PeerNodeSID SHOULD contain the 
	additional attribute of link local address which is used by the controller to find corresponding PeerAdjSID and 
	hence the corresponding link TE attributes.</t>
	  
	  <t> A peerAdj segment carries mandatory link descriptors as local and remote link id.
	  Remote link id of the neighboring ASBR is not readily available.
	  <xref target ='I-D.ietf-idr-bgpls-segment-routing-epe'/> suggests to carry the value '0' for the remote
	  link id. The Controller needs to associate the links in both directions to effectively handle failure notifications
	  and for this purpose a unque remote link is necessary. The remote link ID cannot be manually configured on the router
	  as the link-ids generally change over router reboot etc and hence manual configuration is operationally very
	  difficult to manage.
	  
	  This document mandates advertisement of local and remote iterface addresses for the inetr-AS TE purposes. </t>

<t>
   	  The Unnumbered interface is not in the scope of this document.</t>
      
      <figure anchor="Link_Attributes" title="Link Addresses carried as attributes">
      <artwork>
   +-----------+---------------------+--------------+------------------+
   |  TLV Code | Description         |  IS-IS TLV   | Reference        |
   |   Point   |                     |   /Sub-TLV   | (RFC/Section)    |
   +-----------+---------------------+--------------+------------------+
   |    259    | IPv4 Local interface|    22/6      | [RFC5305]/3.2    |
   |           | Address             |              |                  |
   |    261    | IPv6 Local interface|   22/12      | [RFC6119]/4.2    |
   |           | Address             |              |                  |
   +-------------------------------------------------------------------+
   
                   
      </artwork>
    </figure>
	
 </section>

<section title='Example Advertisements'>
<t>The below diagram represents two ASBR routers and inter-AS links between them. The inter-AS links could be connected via switches 
L1 and L2 as shown in the diagram or via Point-to-point links A2->B2, A3->B3 as shown in the diagram below.
In the below example, lets assume peerNodeSID 1 is  configured to use peerAdjSID 10002 then PeerNodeSID 1 will have the B bit set
which means the PeerNodeSID 1 is eligible for backup. Label 10002 is added to the PeerNodeSID with a "F" bit set, which means
10002 is a backup for PeerNodeSID 1.

</t>
     
      <figure anchor="Sample" title="Example Advertisements">
      <artwork>

+------------------------------------------------------------------+
|         PeerNodeSID                          PeerAdjSID          |
|                                                                  |
|+-+----------------------------+ +-+-----------------------------+|
||N|Loc Node Descr:     AS1:A   | |N|Loc Node Descr:         AS1:A||
||L|Rmt Node Descr:     AS2:B   | |L|Rmt Node Descr:         AS2:B||
||R|Link Descr:         lo1:lo1 | |R|Link Descr LinkLocRmtID: 1:0 ||
||I|                            | |I|Link IP (mandatory):    A1:B1||
|+-+----------------------------+ +-+-----------------------------+|
||A|Link IP (new):  A1:B1       | |A|PeerAdjSID: 10001            ||
||T|Link IP (new):  A2:B2       | |T|SRLG                         ||
||T|PeerNodeSID: 1              | |T|affinity group               ||
||R|PeerSetSID (optional)       | |R|MaxB/W                       ||
|+-+----------------------------+ +-+-----------------------------+|
|+-+----------------------------+ +-+-----------------------------+|
||N|Loc Node Descr:     AS1:A   | |N|Loc Node Descr:         AS1:A||
||L|Rmt Node Descr:     AS2:B   | |L|Rmt Node Descr:         AS2:B||
||R|Link Descr:         lo2:lo2 | |R|Link Descr LinkLocRmtID: 2:0 ||
||I|                            | |I|Link IP (mandatory):    A2:B2||
|+-+----------------------------+ +-+-----------------------------+|
||A|Link IP (new):  A1:B1       | |A|PeerAdjSID: 10002            ||
||T|Link IP (new):  A3:B3       | |T|SRLG                         ||
||T|PeerNodeSID: 2              | |T|affinity group               ||
||R|PeerSetSID (optional)       | |R|MaxB/W                       ||
|| |                            | | |Unused B/W                   ||
|+-+----------------------------+ +-+-----------------------------+|
|+-+----------------------------+ +-+-----------------------------+|
||N|Loc Node Descr:     AS1:A   | |N|Loc Node Descr:         AS1:A||
||L|Rmt Node Descr:     AS2:B   | |L|Rmt Node Descr:         AS2:B||
||R|Link Descr:         A3:B3   | |R|Link Descr LinkLocRmtID: 2:0 ||
||I|                            | |I|Link IP (mandatory):    A3:B3||
|+-+----------------------------+ +-+-----------------------------+|
|| |PeerNodeSID: 3              | |A|PeerAdjSID: 10103            ||
||A|SRLG                        | |T|SRLG                         ||
||T|affinity group              | |T|affinity group               ||
||T|MaxB/W                      | |R|MaxB/W                       ||
||R|Unused B/W                  | | |Unused B/W                   ||
|| |...                         | | |                             ||
|+-+----------------------------+ +-+-----------------------------+|
+------------------------------------------------------------------+
                                  ^                                 
              BGP-LS EPE          |                                 
+----------> w/ InerDomain -------+                                 
|             extensions                                            
|                                                                   
|  +---------------------------------mh-eBGP--------------------+   
|  |                                                            |   
|  |   +-----------------------------mh-eBGP----------------+   |   
|  |   |                                                    |   |   
+--+---+-----+ static lo1 -->   +-----+    +-----+    +-----+---+--+
|  v   v     | static lo2 -->   | L2  |    | L2  |    |     v   v  |
| lo1 lo2  A1*------------------| swt |--->| swt |----*B1  lo2 lo1 |
|            |                  +-----+    +-----+    |            |
|            |                                        |            |
|            |                                        |            |
|   RtR A    | static lo1 -->                         |   RtR B    |
|          A2*----------------------------------------*B2          |
|            |                                        |            |
|            | static lo2 -->                         |            |
|          A3*----------------------------------------*B3          |
|            |                                        |            |
+-----------+^                                        ^+-----------+
             |                                        |              
             |                                        |              
             +-------------------eBGP-----------------+              
 
</artwork>
</figure>

</section>


  <section anchor='backward_compatibility' title='Backward Compatibility'>
         <t>The extension proposed in this document is backward compatible with procedures described in 
         <xref target ='I-D.ietf-idr-bgpls-segment-routing-epe'/> and 
         <xref target ='I-D.ietf-spring-segment-routing-central-epe'/></t>
         
</section>
  <section title='Security Considerations' anchor='sec-con'>
    <t>TBD</t>
  </section>
  <section anchor="IANA" title="IANA Considerations">
    <t> No new TLV code points are needed.</t>
  </section>
   <section title='Acknowledgements' anchor='ack'>
    <t>Thanks to Julian Lucek and Rafal Jan Szarecki for careful review and suggestions.</t>
  </section>
</middle>

<back>
  <references title='Normative References'>
    &RFC7752;
    
    &RFC2119;
     <?rfc include="reference.I-D.ietf-spring-segment-routing-central-epe"?>  
     <?rfc include="reference.I-D.ietf-idr-bgpls-segment-routing-epe"?>
  </references>
   <references title='Informative References'>  

    &RFC8402;
  </references>
 </back>
</rfc>
