<?xml version="1.0" encoding="US-ASCII"?>
<!DOCTYPE rfc SYSTEM "rfc2629.dtd">
<?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" ipr="trust200902" docName="draft-lp-lsr-fa-bandwidth-00">
<?xml-stylesheet type='text/xsl' href='rfc2629.xslt' ?>

<front>
<title abbrev="Flex-algo with Bandwidth Constrains">Flexible Algorithm with Bandwidth Constrains</title>

	<author fullname="Liu Yao" initials="Yao" surname="Liu">
      <organization>ZTE Corp.</organization>  
      <address>
          <postal>
          <street></street>
          
          <city></city>
          
          <region></region>
  
          <code></code>

          <country></country>
        </postal>

        <email>liu.yao71@zte.com.cn</email>
      </address>
    </author>
	
	<author fullname="Peng Shaofu" initials="Shaofu" surname="Peng">
      <organization>ZTE Corp.</organization>  
      <address>
        <postal>
          <street></street>
          
          <city></city>
          
          <region></region>
  
          <code></code>

          <country></country>
        </postal>

        <email>peng.shaofu@zte.com.cn</email>
      </address>
    </author>

	    <date year="2021"/>
<area>Transport</area>
<workgroup>LSR Working Group</workgroup>
<keyword>Internet-Draft</keyword>
<keyword>Flexible Algorithm</keyword>
<keyword>Bandwidth</keyword>
<keyword>IGP</keyword>
<abstract>
<t> This document proposes extensions for IGP to allow the computation based on bandwidth  constraints together with the existing metric in Flexible Algorithm.</t>
</abstract>
</front>
<middle>
<section title="Introduction">
<t><xref target="I-D.ietf-lsr-flex-algo"/> defines the Flex-Algorithm as a set of parameters consisting of calculation-type, metric-type and a set of constraints. The metric includes igp-metric, te-metric, delay-metric, and etc.
</t>
<t>While the calculation of a path based on metrics is accumulative, e.g, the path calculated based on the delay-metric is that with the smallest sum of the metrics of each link. The bandwidth of a path depends on the link with the smallest bandwidth among the links that comprise the path.
</t>
<t>It's more appropriate that the bandwidth acts as a constraint instead of a metric in the path computation.
</t>
<t>This document proposes extensions for IGP to allow the computation based on bandwidth  constraints together with the existing metric in FLex-Algo. 
</t>
</section>

<section title="Conventions used in this document">

        <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 BCP 14 <xref target="RFC2119"/> <xref target="RFC8174"/> 
   when, and only when, they appear in all capitals, as shown here.
             </t>
          </section>

</section>

<section title="ISIS bandwidth  constraint Sub-TLV of ISIS FAD Sub-TLV">

<t>This document defines the ISIS bandwidth  constraint Sub-TLV. It is a Sub-TLV of the ISIS FAD Sub-TLV <xref target="I-D.ietf-lsr-flex-algo"/> and has the following format:</t>
<t>
<figure align="center" title="Figure 1: ISIS bandwidth  constraint Sub-TLV">
          <artwork><![CDATA[
    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     |  BW-Con Type  |    Reserved   |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
]]></artwork>
        </figure>
</t>

<t>where:

<list style="symbols">
<t>Type: TBA</t>
<t>Length: 1 octets</t>
<t>BW-Con Type: 1 octets of bandwidth  constraint information.</t>

</list>

</t>
<t>The BW-Con Type has the following values:</t>
<t>	1: Choose the link with Maximum Link Bandwidth ( MLB defined in <xref target="RFC5305"/> ).</t>
<t>	2: Choose the link with maximum Unidirectional Available Bandwidth ( UAB defined in <xref target="RFC8570"/> ).</t>
<t>	3: Choose the link with the lowest bandwidth utilization rate.</t>

<t>The ISIS bandwidth  constraint Sub-TLV MUST NOT appear more than once in an ISIS FAD Sub-TLV. If it appears more than once, the ISIS FAD Sub-TLV MUST be ignored by the receiver.</t>

</section>


<section title="OSPF bandwidth  constraint Sub-TLV of ISIS FAD Sub-TLV">
<t>This document defines the OSPF bandwidth  constraint Sub-TLV. It is a Sub-TLV of the OSPF FAD Sub-TLV [I-D.ietf-lsr-flex-algo] and has the following format:</t>
<t>
<figure align="center" title="Figure 2: OSPF bandwidth  constraint Sub-TLV">
          <artwork><![CDATA[
    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            |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |  BW-Con Type  |   Reserved    |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
]]></artwork>
        </figure>
</t>

<t>where:
<list style="symbols">
<t>Type: TBA</t>
<t>Length: 1 octets</t>
<t>BW-Con Type: 1 octets of bandwidth  constraint information.</t>
</list>
</t>
<t>The BW-Con Type has the following values:</t>
<t>	1: Choose the link with Maximum Bandwidth ( MB defined in <xref target="RFC3630"/> ).</t>
<t>	2: Choose the link with maximum Unidirectional Available Bandwidth ( UAB defined in <xref target="RFC7471"/> ).</t>
<t>	3: Choose the link with the lowest bandwidth utilization rate.</t>

<t>The OSPF bandwidth  constraint Sub-TLV MUST NOT appear more than once in a OSPF FAD Sub-TLV. If it appears more than once, the OSPF FAD Sub-TLV MUST be ignored by the receiver.</t>
</section>


<section title="Calculation of Flex Algorithm Paths">

<t>Routes that don't support the bandwidth  constraint Sub-TLV MUST NOT participate in the corresponding Flex-Algo plane.</t>
<t>Existing rules for calculation of Flex-Algorithm paths specified in <xref target="I-D.ietf-lsr-flex-algo"/> are still applicable.</t>
<t>As for the new bandwidth  constraint, first, select the optimal path(s) only according to the bandwidth constraint. If there are multiple candidate paths satisfying the bandwidth constraint, then select the best path based on the metric computation from these candidate paths. </t>

<section title="Calculation">

<t>The result of IGP flex algo shortest path calculation based on bandwidth constraints is that each participating node in flex algo plane constructs a SPT (with itself as the root) per algorithm, which contains all other participating nodes as destination nodes. </t>
<t>Step1: Assume S is the root, and other nodes are D1, D2, D3,... Dn.</t>
<t>Step2: Find all paths from source node S to destination node D1. Suppose there is one or more paths, and it is recorded as path-1, path-2,..., path-m, where m > =1.</t>
<t>Step3: Initializes the current root node (cur-root) to S. Take two paths (such as path-1 and path-2) to compare to see who is more qualified for the constraint. Note that as mentioned above, the constraint conditions here refer to the combination of bandwidth constraint and metric, and compare based on bandwidth constraints firstly and then metric secondly. This can be compared in segments, that is, from the current root node to the destination node, finding a first crossed node which appears in two paths at the same time and is recorded as the current branch (cur-branch) node.</t>
<t>Step4: Compare the path segment from the current root node to the current branch node in the two paths to see who is more qualified for the path.
If one of the two path segments is optimal and the other is suboptimal, it means that one of the two paths is optimal than the other. Add the optimal path to the "winning group". Note that if the path of the suboptimal is originally in the "winning group", the "winning group" should be cleared  firstly and then new optimal path is added. The optimal path continues to compare with other paths, jump to Step3.</t>
<t>Otherwise, if the two path fragments are both optimal, the current root node (cur root) is updated as the current branch node. If the current root node reaches the destination node, the comparison is finished, and the two paths join the "winning group" to form ECMP (equal cost multi path equivalent multipath); otherwise, continue to find the next crossed node in the two paths as the new current branch node, and jump to Step4.</t>
<t>Step5: The above result will get the shortest paths from S to D1. Similarly, repeating Step2 for destination D2, D3,..., Dn respectively will get the shortest path from S to D2, D3,..., Dn respectively. Thus the shortest path tree with S as the root node in the flex algo plane is constructed.</t>
<t></t>
<t></t>
<t></t>
</section>


<section title="Illustration">
<t>
<figure align="center" title="Figure 3: Reference Topology">
          <artwork><![CDATA[
                                     		  
                            +----D----+
                            |         |
                     A------B         C
                            |         |
                            +----E----+
							
]]></artwork>
        </figure>
</t>


<t>As shown in Figure 3, there're 5 nodes in the given FA plane, whose metric type is delay metric and the bandwidth  constrain is to choose the link with the maximum total bandwidth. </t>
<t>The bandwidth  and metric for each link is shown in Table 1.</t>

    <texttable  title="Table 1: Bandwidth and Metric">
    <ttcol align="left">Link</ttcol>
    <ttcol align="left">Bandwidth</ttcol>
    <ttcol align="left">Metric</ttcol>
    <c>&nbsp;A-B</c>
    <c>&nbsp;100</c>
    <c>&nbsp;10</c>
    <c>&nbsp;B-D</c>
    <c>&nbsp;5</c>
    <c>&nbsp;2</c>
    <c>&nbsp;D-C</c>
    <c>&nbsp;10</c>
    <c>&nbsp;2</c>
    <c>&nbsp;B-E</c>
    <c>&nbsp;10</c>
    <c>&nbsp;1</c>
    <c>&nbsp;E-C</c>
    <c>&nbsp;5</c>
    <c>&nbsp;1</c>		
     </texttable>

<t>It is required to calculate the optimal path from A to C in this FA plane.</t>
<t>First, select the path who has the maximum bandwidth . Since the bandwidth of a path depends on the link with the smallest bandwidth, the maximum bandwidth s of path A-B-D-C and A-B-E-C are both 5. These two paths are chosen as candidate paths.</t>
<t>Second, compare the metric values of the candidate paths. The metric of path A-B-E-C is smaller, so it is chosen as the best path.	 </t>
</section>


</section>




<section title="Security Considerations">
<t>TBD</t>
</section>
	   
<section title="IANA Considerations">

<section title="ISIS Sub-Sub-TLVs for Flexible Algorithm Definition Sub-TLV">
<t>Type: TBA</t>
<t>Description: bandwidth  constraint Sub-TLV</t>
<t>Reference: This document. </t>
</section>



<section title="OSPF Sub-Sub-TLVs for Flexible Algorithm Definition Sub-TLV">
<t>Type: TBA</t>
<t>Description: bandwidth  constraint Sub-TLV</t>
<t>Reference: This document. </t>
</section>

</section>
</middle>
<back>
<references title="Normative References">

  <?rfc include="reference.RFC.2119"?>
  <?rfc include="reference.RFC.8174"?>
  <?rfc include="reference.I-D.ietf-lsr-flex-algo"?>    

</references>
<references title="Informative References">
  <?rfc include="reference.RFC.3630"?>
  <?rfc include="reference.RFC.7471"?> 
  <?rfc include="reference.RFC.5305"?>
  <?rfc include="reference.RFC.8570"?>  

</references>
</back>
</rfc>