<?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="std" docName="draft-gredler-idr-bgplu-prefix-sid-00"
     ipr="trust200902">

  <!-- ***** FRONT MATTER ***** -->

  <front>
    <title>Prefix-SID extensions for BGP-LU</title>

    <!-- add 'role="editor"' below for the editors if appropriate -->

    <author fullname="Hannes Gredler" initials="H" surname="Gredler">
      <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>


    <date day="9" month="March" year="2015"/>

    <area>Routing</area>

    <workgroup>Inter-Domain Routing</workgroup>

    <keyword>MPLS</keyword>
    <keyword>BGP</keyword>
    <keyword>Data Center</keyword>
    <keyword>Label advertisement</keyword>
    <keyword>Traffic Engineering</keyword>
    <keyword>Segment Routing</keyword>
    <keyword>Hypervisor</keyword>
    <keyword>Server</keyword>

    <abstract>
      <t>
	The MPLS source routing paradigm provides path control
	for both intra- and inter- Autonomous System (AS) traffic.
	In most MPLS deployments the ingress of a MPLS tunnel
	is an IP router. Availability of MPLS forwarding stacks for host
	operating systems is extending the MPLS perimeter
	to Hypervisors and Servers. Recent Data Center designs are using an
	IGP-less routing paradigm based on massive ECMP multi path
	using external BGP.	
	This documents outlines how Hypervisors and Servers may interact with the
	MPLS control- and data plane using extensions to the
	BGP labeled unicast protocol (BGP-LU).
      </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>
	Recent Datacenter routing designs are modeled like shown in
	Figure <xref target="DC_DESIGN"/>. Rather than using an IGP
	plus internal BGP (iBGP), an IGP-less design is favored
	for disseminating routing information. See
        <xref target="I-D.ietf-rtgwg-bgp-routing-large-dc"></xref>
	for rationale and detailed information why and how to do so.

	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.
	Because of the IGP-less routing paradigm
	topology information gets lost. Particularly
	the ability to direct traffic to a specific node
	and hence the ability to do construct explicit paths
	denominated by a set of nodes for traffic-engineering
	is of interest.

	BGP-LU today may advertise a MPLS transport path between
	Autonomous Systems. 
	This document describes extensions to the BGP-LU protocol
	such that in addition to the advertised MPLS label-switched
	paths (LSP) all potential MPLS label-switched paths of
	any given node in the Data Center are exposed to ingress nodes.
      </t>

      <t>
	The protocol extensions In this document are in full compliance with the
	MPLS Architecture documented in <xref target="RFC3031"/>.
      </t>

      <figure anchor="DC_DESIGN" title="eBGP-centric Data Center routing">
        <artwork>
             +------+  +------+
             |      |  |      |
             |      |--|      |           Tier-1 / AS 651xx
             |      |  |      |
             +------+  +------+
               |  |      |  |
     +---------+  |      |  +----------+
     | +-------+--+------+--+-------+  |
     | |       |  |      |  |       |  |
   +----+     +----+    +----+     +----+
   |    |     |    |    |    |     |    |
   |    |-----|    |    |    |-----|    | Tier-2 / AS 652xx
   |    |     |    |    |    |     |    |
   +----+     +----+    +----+     +----+
      |         |          |         |
      |         |          |         |
      | +-----+ |          | +-----+ |
      +-|     |-+          +-|     |-+    Tier-3 / AS 653xx
        +-----+              +-----+
         | | |                | | |
     &lt;- Servers -&gt;        &lt;- Servers -&gt;  Servers / AS 65534
	</artwork>
      </figure>

    </section>

    <section title="Motivation, Rationale and Applicability">
      <t>
	The specifications for Segment Routing
	( <xref target="I-D.ietf-isis-segment-routing-extensions"></xref> and
	<xref target="I-D.ietf-ospf-segment-routing-extensions"></xref> )
	provide extensions for setting up hop-by-hop shortest path
	routed MPLS LSPs. The used Protocol semantics are:</t>

	<t>
	  <list style="symbols">
	    <t>Domain-wide Index</t>
	    <t>Local Label-Base</t>
	    <t>Local Label Range</t>
	  </list>
	</t>

	<t>advertised by any router in an IGP domain. This not only
	sets up MPLS sink-trees to each egress router in a domain, but
	also allows to steer traffic using stacks of node labels.
	The chosen protocol semantics are essentially a compression
	scheme to advertise all MPLS SPT paths in a domain.
	</t>

	<t>The ability to do explicit path routing based on stacked labels,
	constructed at the Hypervisors/Servers, without running
	conventional TE-protocols like for example RSVP-TE is a lightweight
	way to scale the Data Center Fabric.
	</t>

	<t>In order to support deployments of Segment Routing across
	routing protocol boundaries it is required to keep a common
	set of semantics across all routing protocols. This document
	specifies BGP-LU extensions to be able to address Node-SIDs
	across routing-protocol boundaries.
	</t>

    </section>

    <section title="Deployment Considerations">

      <t>Depending on the Sophistication of the MPLS stack at the
      Hypervisor / Server there are various levels of considerations
      for deployment.
      </t>

      <section anchor="RESTART" title="Control plane restart">
	<t>In case a restart of the first-hop router needs to be performed
	there may be some forwarding state churn at the Hypervisor /
	Server. It would be desirable that upon control-plane restart
	the Network node uses the same label-allocations than in the
	previous incarnation. Unfortunately none of the BGP graceful
	restart extensions allows to re-aquire previous incarnations
	label-mapping state from the network. Therefore a restarting node
	will be allocating FECs to labels in temporal incoming order.
	This degrades to pseudo-random, non-predictable label allocations.
	It is desirable that a BGP-LU implementation allocates the
	labels in a deterministic way, such that temporal
	control-plane loss does not impact forwarding between the
	Hypervisor / Server and the network.
	</t>

	<t>A BGP-LU Prefix SID speaking networking node MUST therefore
	implement a MPLS label-allocation strategy which produces a
	deterministic, local allocated label-block for all of its
	Prefix SIDs.
	</t>

	<t>For example an Implementation MAY statically allocate a Label
	Base of 800000 and a block-size of 16000 labels and delegate
	that label block exclusively to BGP-LU Prefix SID allocations,
	such that the same label-base is being used across
	control-plane restarts.
	</t>
      </section>

      <section title="BGP-LU as Server Control Plane">
	<t>In this case the Hypervisor / Server has a "client-only"
	BGP-LU stack in order to interface to the network. This is the
	most distributed way of building label switched paths across
	the network. As soon as there is a reachability change then
	all of the Hypervisors / Servers get notified instantly.
	There is almost no time-lag for updating servers due to the
	inherent PUSH model of the BGP Protocol.
	</t>

	<t>Most of the implementation complexity of a BGP implementation
	comes from the BGP Update generation subsystem. For a client-only BGP
	implementation this is fortunately negligible as typically
	one or two (for redundancy reasons) BGP sessions are required.
	So the BGP Update Generation complexity stays limited.
	</t>

      </section>

      <section title="Labeled-ARP as Server Control Plane">
	<t>The Labeled ARP Protocol
        <xref target="I-D.kompella-mpls-larp"></xref>
	may be used as a lightweight alternative to the BGP-LU protocol.
	Labeled ARP is a soft-state protocol and therefore needs
	special consideration for e.g Refresh-timers, Labels in the network etc.
	needs to be taken. Yet it is a distributed variant of LSP
	state propagation and hence re-acts immediately to network
	topology changes / label to FEC changes.
	</t>
      </section>

      <section title="Static Labels and Controller as Server Control Plane">
	<t>
	  Static labels do not need a control-plane sessions between
	  Hypervisors / Servers and the network. The assumption is that
	  an external controller transfers the routing/label information
	  into the Hypervisor / Server. The main disadvantage of that
	  model is that the update process is not distributed and hence
	  a controller needs to have excellent horizontal scaling
	  abilities in order to update order of 100K routes/labels to
	  order of 100K servers.
	</t>
      </section>

    </section>

    <section title="BGP Prefix-SID Attribute">
      <t>In order to facilitate dense packing of Network nodes and
      Node labels to a deterministic label-range like described in
      <xref target="RESTART"></xref> a new Protocol extension called
      the "BGP Prefix SID Attribute" is proposed.
      </t>

      <t>
	The BGP Prefix SID is a new optional, transitive BGP path
	attribute.  The attribute type code for BGP Prefix SID attribute is
	to be assigned by IANA. 
      </t>

      <t>
	The value field of the BGP Prefix SID attribute is defined
	here to be a set of elements encoded as "Type/Length/Value"
	(i.e., a set of TLVs).
	Each such TLV is encoded as shown in Figure
	<xref target="TLV-figure"></xref>.
      </t>

      <t>
        <figure anchor="TLV-figure" title="TLV format">
          <artwork>
   0                   1                   2                   3
   0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  |       Type    |               Length          |               |
  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+               |
  ~                                                               ~
  |                         Value (variable)                      |
  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
            </artwork>
          </figure>
      </t>

      <t>
	<list style="symbols">
	  <t>Type:  A single octet encoding the TLV Type.
	  Unrecognized Types are preserved and propagated. In order to
	  compare NLRIs with unknown TLVs all TLVs MUST be ordered in ascending
	  order by TLV Type. If there are more TLVs of the same type, then the
	  TLVs MUST be ordered in ascending order of the TLV value within the
	  TLVs with the same type.  All TLVs that are not specified as mandatory
	  are considered optional.
	  </t>

	  <t>Length: Two octets encoding the length of the value portion in octets
	  (thus a TLV with no value portion would have a length of zero). The TLV
          is not padded to four-octet alignment. 
	  </t>

	  <t>Value: A field containing zero or more octets.
	  </t>

	</list>
      </t>

      <t>The following TLV types are defined in this document:</t>

          <texttable anchor="PREFIX-SID-TLVS" title="Prefix SID TLVs">
            <ttcol align="center">Type</ttcol>
            <ttcol align="left">Name</ttcol>

	    <c>1</c>
            <c>Label Index</c>
          
	    <c>2</c>
            <c>Label Base</c>
          
	    <c>3</c>
            <c>Label Range</c>
          </texttable>

      <t>Use of other TLV types is outside the scope of this document.</t>

      <section title="Label Index TLV">
	<t>
	  <list style="symbols">
	    <t>Type: 1
	    </t>

	    <t>Length: 4 
	    </t>

	    <t>Value: Label Index
	    </t>
	  </list>
	</t>

	<t>Only one Label Index TLV per Prefix SID Attribute is allowed.</t>

      </section>

      <section title="Label Base TLV">
	<t>
	  <list style="symbols">
	    <t>Type: 2
	    </t>

	    <t>Length: 3 
	    </t>

	    <t>Value: Label Base
	    </t>
	  </list>
	</t>

	<t>One or more occurences of the Label Base TLV are allowed. A
	Label Base TLV MUST be followed by a Label Range TLV.</t>

      </section>

      <section title="Label Range TLV">
	<t>
	  <list style="symbols">
	    <t>Type: 3
	    </t>

	    <t>Length: 3 
	    </t>

	    <t>Value: Label Range
	    </t>
	  </list>
	</t>

	<t>One or more occurences of the Label Range TLV are allowed. A
	Label Range TLV MUST be preceeded by a Label Range TLV.</t>

      </section>



    </section>
    
    <section anchor="Acknowledgements" title="Acknowledgements">
      <t>Many thanks to TBD
      for their detailed review and insightful comments.</t>
    </section>

    <section anchor="IANA" title="IANA Considerations">
      <t>This document requests a code point from the BGP Path Attributes
      registry named 'Prefix SID'</t>

      <t>This document requests creation of a new registry for BGP
      Prefix SID TLVs. Value 0 is reserved. The maximum value is 255.
      The registry will be initialized as
      shown in <xref target="PREFIX-SID-TLVS"/>. Allocations within the registry
      will require documentation of the proposed use of the allocated
      value (=Specification required) and
      approval by the Designated Expert assigned by the IESG (see <xref
      target="RFC5226"></xref>).</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="reference.RFC.2119.xml"?>
      <?rfc include="reference.RFC.3031.xml"?>
      <?rfc include="reference.RFC.3107.xml"?>
      <?rfc include="reference.RFC.5226.xml"?>
    </references>

    <references title="Informative References">
      <?rfc include="reference.I-D.ietf-rtgwg-bgp-routing-large-dc"?>
      <?rfc include="reference.I-D.ietf-mpls-seamless-mpls"?>
      <?rfc include="reference.I-D.ietf-isis-segment-routing-extensions"?>
      <?rfc include="reference.I-D.ietf-ospf-segment-routing-extensions"?>
      <?rfc include="reference.I-D.kompella-mpls-larp"?>
    </references>

  </back>
</rfc>
