<?xml version="1.0" encoding="US-ASCII"?>
<!-- This template is for creating an Internet Draft using xml2rfc,
    which is available here: http://xml.resource.org. -->
<!DOCTYPE rfc SYSTEM "rfc2629.dtd" [
<!-- One method to get references from the online citation libraries.
    There has to be one entity for each item to be referenced. 
    An alternate method (rfc include) is described in the references. -->
<!ENTITY RFC2119 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.2119.xml">
<!ENTITY RFC2629 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.2629.xml">
<!ENTITY RFC3552 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.3552.xml">
<!ENTITY I-D.narten-iana-considerations-rfc2434bis SYSTEM "http://xml.resource.org/public/rfc/bibxml3/reference.I-D.narten-iana-considerations-rfc2434bis.xml">
]>
<?xml-stylesheet type='text/xsl' href='rfc2629.xslt' ?>
<!-- used by XSLT processors -->
<!-- For a complete list and description of processing instructions (PIs), 
    please see http://xml.resource.org/authoring/README.html. -->
<!-- Below are generally applicable Processing Instructions (PIs) that most I-Ds might want to use.
    (Here they are set differently than their defaults in xml2rfc v1.32) -->
<?rfc strict="yes" ?>
<!-- give errors regarding ID-nits and DTD validation -->
<!-- control the table of contents (ToC) -->
<?rfc toc="yes"?>
<!-- generate a ToC -->
<?rfc tocdepth="4"?>
<!-- the number of levels of subsections in ToC. default: 3 -->
<!-- control references -->
<?rfc symrefs="yes"?>
<!-- use symbolic references tags, i.e, [RFC2119] instead of [1] -->
<?rfc sortrefs="yes" ?>
<!-- sort the reference entries alphabetically -->
<!-- control vertical white space 
    (using these PIs as follows is recommended by the RFC Editor) -->
<?rfc compact="yes" ?>
<!-- do not start each main section on a new page -->
<?rfc subcompact="no" ?>
<!-- keep one blank line between list items -->
<!-- end of list of popular I-D processing instructions -->
<rfc category="std" docName="draft-ietf-ospf-segment-routing-msd-07"
	ipr="trust200902">  

  <front>
    <title abbrev="">Signaling  MSD (Maximum SID Depth) using OSPF</title>

      <author fullname="Jeff Tantsura" initials="J.T." surname="Tantsura">
      <organization>Individual</organization>
      <address>
	<email>jefftant.ietf@gmail.com</email>
      </address>
    </author>

    <author fullname="Uma Chunduri" initials="U.C." surname="Chunduri">
      <organization>Huawei Technologies</organization>
      <address>
      <email>uma.chunduri@huawei.com</email>
      </address>
    </author>

   <author fullname="Sam Aldrin" initials="S.A." surname="Aldrin">
      <organization>Google, Inc</organization>
      <address>
	<email>aldrin.ietf@gmail.com</email>
      </address>
    </author>

    <author fullname="Peter Psenak" initials="P.P." surname="Psenak">
      <organization>Cisco Systems</organization>
      <address>
	<email>ppsenak@cisco.com</email>
      </address>
    </author>

    <date day="14" month="December" year="2017" />

    <area>Routing</area>

    <workgroup>OSPF Working Group</workgroup>

    <keyword>Internet-Draft</keyword>

    <keyword>BGP-LS</keyword>
    
    <keyword>SID</keyword>
   
    <keyword>MSD </keyword>

    <keyword>OSPF</keyword>




   <abstract>
	    <t>This document proposes a way to signal Maximum SID Depth (MSD) supported by a node at node and/or link granularity
	    by an OSPF Router. In a Segment Routing (SR) enabled network a centralized controller that programs SR tunnels
	    needs to know the MSD supported by the head-end at node and/or link granularity to impose the SID stack of an appropriate depth.
	    MSD is relevant to the head-end of a SR tunnel or Binding-SID anchor node where Binding-SID expansions might result in creation of a new SID stack.
	    Here the term OSPF means both OSPFv2 and  OSPFv3.</t>
 
    </abstract>
  </front>

  <middle>
	  <section title="Introduction">
			 
 		  <t>When Segment Routing tunnels are computed by a centralized controller, it is critical that the controller learns
		  the MSD "Maximum SID Depth" of the node or link SR tunnel exits over, so the SID stack depth of a path computed 
		  doesn't exceed the number of SIDs the node is capable of imposing. This document describes how
                  to use OSPF to signal the MSD of a node or link to a centralized controller.</t>

	           <t>PCEP SR extensions draft <xref target="I-D.ietf-pce-segment-routing"/> signals MSD 
		      in SR PCE Capability TLV and METRIC Object. However, if PCEP is not supported/configured 
		      on the head-end of a SR tunnel or a Binding-SID anchor node and controller does not participate in IGP routing, 
		      it has no way to learn the MSD of nodes and links which has been configured. BGP-LS <xref target="RFC7752"/> defines a  
		      way to expose topology and associated attributes and capabilities of the nodes in that topology to a centralized
		      controller. MSD signaling by BGP-LS has been defined in <xref target="I-D.ietf-idr-bgp-ls-segment-routing-msd"/>. 
		      Typically, BGP-LS is configured on a small number of nodes, that do not necessarily act as head-ends.    
		      In order, for BGP-LS to signal MSD for the all nodes and links in the network MSD is relevant, MSD capabilites SHOULD be distributed to every OSPF router in the network.</t>

		  
	      <t><xref target="I-D.ietf-ospf-mpls-elc"/> defines Readable Label Depth Capability (RLDC) that is used by a head-end to insert Entropy Label (EL)
		      at appropriate depth, so it could be read by transit nodes. MSD in contrary signals ability to impose SID's stack of a particular depth.</t>

	      <t>MSD of type 1 (IANA Registry), called Base MSD is used to signal the total number of SIDs a node is capable of imposing, to be used by a path computation 
		      element/controller. In case, there are additional SIDs (e.g. service) that are to be imposed to the stack - this would be signaled with an another MSD type (TBD), 
		      no adjustment to the Base MSD should be made. In the future, new MSD types could be defined to signal additional capabilities:
		      entropy labels, SIDs that can be imposed thru recirculation, or another dataplane e.g IPv6.</t>
		  
	     <section title="Conventions used in this document">
   <section title="Terminology">

    <t>BGP-LS: Distribution of Link-State and TE
	    Information using Border Gateway Protocol </t>

    <t>OSPF: Open Shortest Path First</t>
	    
    <t>MSD: Maximum SID Depth </t>

   <t> PCC:  Path Computation Client </t>

   <t> PCE:  Path Computation Element </t>

   <t> PCEP:  Path Computation Element Protocol </t>

   <t> SID:  Segment Identifier </t>

   <t> SR:  Segment routing </t>
   
   </section>
	     </section>
	     
      <section 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>
      </section>
    </section>

    <section anchor="Abbreviations_Terminology" title="Terminology">
      <t>This memo makes use of the terms defined in <xref
      target="RFC4970"/>.</t>
    </section>

    <section anchor="NODE_LEVEL" title="Node MSD TLV">
      <t>A new TLV within the body of the OSPF RI Opaque LSA, called
      Node MSD TLV is defined to carry the provisioned SID depth 
      of the router originating the RI LSA. Node MSD is the lowest MSD supported 
      by the node.
      </t>
      <figure align="center" anchor="Node_MSD_TLV"
	      title="Node MSD TLV">
          <preamble></preamble>

	  <artwork align="left">
       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                |   
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |         Sub-Type and Value ...
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ ...

          </artwork>

          <postamble></postamble>
  </figure>
      <t>The Type (2 bytes) of this TLV has value of 12.</t>
      <t>    Length is variable (minimum of 2, multiple of 2 octets) and represents the total length of value field. </t>
      <t>    Value field consists of  a 1 octet sub-type (IANA Registry) and 1 octet value. </t>
      <t>     Sub-Type 1 (IANA Section),  MSD and 
	      the Value field contains maximum MSD of the router originating the RI LSA. Node Maximum MSD 
	      is a number in the range of 0-254. 0 represents lack of the ability to impose MSD stack 
	      of any depth; any other value represents that of the node. This value SHOULD 
	      represent the lowest value supported by node.</t>
      <t> Other Sub-types other than defined above are reserved for future extensions. </t>
      <t>This TLV is applicable to OSPFv2 and to 
      OSPFv3  <xref target="RFC5838"/> and is optional. The scope of the advertisement is specific to the deployment. 
      </t>
    </section>

    <section anchor="LINK_LEVEL" title="Link MSD sub-TLV">
      <t>A new sub-TLV  called Link MSD sub-TLV is defined to carry the provisioned SID depth 
	      of the interface associated with the link. </t>
<figure align="center" anchor="Link_MSD_sub_TLV"
	      title="Link MSD Sub-TLV">
          <preamble></preamble>

	  <artwork align="left">
       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                |   
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |         Sub-Type and Value ...
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ ...

          </artwork>

          <postamble></postamble>
  </figure>

  <t> The Type (2 bytes) of this TLV:</t>
	    <t>For OSPFv2, the Link level MSD value is advertised as an optional Sub-TLV  
		    of OSPFv2 Extended Link TLV as defined in <xref target="RFC7684"/>, and has value of 6.</t> 
	    <t>For OSPFv3, the Link level MSD value is advertised as an optional Sub-TLV of the Router-Link TLV as
		    defined in <xref target="I-D.ietf-ospf-ospfv3-lsa-extend"/>, and has value of 3 (Suggested value - to be assigned by IANA).
	    </t>
      <t> Length is variable and similar to what is defined in <xref target="NODE_LEVEL"> </xref>.</t>
      <t> Value field consists of  a 1 octet sub-type (IANA Registry) and 1 octet value. </t>
      <t>    Sub-Type 1 (IANA Section),  MSD and
	      the Value field contains Link MSD of the router originating the corresponding LSA as specified for OSPFv2 and OSPFv3. 
	      Link MSD is a number in the range of 0-254. 0 represents lack of the ability to impose MSD stack 
	      of any depth; any other value represents that of the particular link MSD value. </t>
      <t>Other Sub-types other than defined above are reserved for future extensions. </t>

	     </section>
    
    <section anchor="Confict_resolution" title="Node MSD vs Link MSD conflict resolution">
      <t>When both Node MSD and Link MSD are present, the value in the
      Link MSD MUST be used.
      </t>
      <!---->
    </section>

    
      <!---->
    <section anchor="IANA" title="IANA Considerations">
      <t>This document includes a request to IANA to allocate TLV type
	      codes for the new TLV proposed in  <xref target="NODE_LEVEL"> </xref> 
	       of this document from OSPF Router 
	       Information (RI) TLVs Registry as defined by <xref target="RFC4970"/>.
	       For THE link MSD,  we request IANA to allocate new sub-TLV codes  as proposed
	       in <xref target="LINK_LEVEL"> </xref> from OSPFv2 Extended Link TLV Sub-TLVs registry and 
	       from Router-Link TLV defined in OSPFv3 Extend-LSA Sub-TLV registry.
       </t>
              <t>
	       This document also requests IANA to create a new Sub-type registry as proposed in  <xref target="NODE_LEVEL"> </xref>,  <xref target="LINK_LEVEL"> </xref>.
	      <figure align="center" anchor="sub_type_registry"
	      title="MSD Sub-type Codepoints Registry">
          <preamble></preamble>

	  <artwork align="left">
      
   Value     Name                             Reference
   -----     ---------------------            -------------
   0         Reserved          	              This document
   1         Base MSD                         This document
   2-250     Unassigned                       This document
   251-254   Experimental                     This document
   255       Reserved                         This document
         </artwork>

          <postamble></postamble>
  </figure> 
       </t>

      <!---->
    </section>
     
<section anchor="Security" title="Security Considerations">
	    <t>This document describes a mechanism to signal Segment Routing MSD supported at node and/or link granularity 
	     through  OSPF LSA's and does not introduce any new security issues.
     </t>

      <!---->
    </section>

    
        <section anchor="Contributors" title="Contributors">

	     <t>The following people contributed to this document:</t>
	     <t>Les Ginsberg</t>
	     <t>Email: ginsberg@cisco.com</t>
    </section>


     <section anchor="Acknowledgements" title="Acknowledgements">
	    <t>The authors would like to thank Stephane Litkowski and Bruno Decraene for their reviews and valuable comments.  </t>
    <!---->
    </section>

  </middle>

  <back>
    <references title="Normative References">
      &RFC2119;

      <?rfc include="reference.RFC.4970"?>

      <!---->
    </references>

    <references title="Informative References">
      <?rfc include="reference.I-D.ietf-pce-segment-routing"?>
      <?rfc include="reference.I-D.ietf-idr-bgp-ls-segment-routing-msd"?>
      <?rfc include="reference.I-D.ietf-ospf-mpls-elc"?>
      <?rfc include="reference.I-D.ietf-ospf-ospfv3-lsa-extend"?>
      <?rfc include="reference.RFC.7752"?>
      <?rfc include="reference.RFC.5838"?>
      <?rfc include="reference.RFC.7684"?>
      <!---->
    </references>
  </back>
</rfc>
