<?xml version="1.0"?>
<!DOCTYPE rfc SYSTEM "rfc2629.dtd" [
<!ENTITY RFC2119 PUBLIC "" "http://xml.resource.org/public/rfc/bibxml/reference.RFC.2119.xml">
<!ENTITY RFC5305 PUBLIC "" "http://xml.resource.org/public/rfc/bibxml/reference.RFC.5305.xml">
<!ENTITY RFC7684 PUBLIC "" "http://xml.resource.org/public/rfc/bibxml/reference.RFC.7684.xml">
<!ENTITY RFC5311 PUBLIC "" "http://xml.resource.org/public/rfc/bibxml/reference.RFC.5311.xml">
<!ENTITY RFC9346 PUBLIC "" "http://xml.resource.org/public/rfc/bibxml/reference.RFC.9346.xml">
<!ENTITY RFC5120 PUBLIC "" "http://xml.resource.org/public/rfc/bibxml/reference.RFC.5120.xml">
<!ENTITY RFC8570 PUBLIC "" "http://xml.resource.org/public/rfc/bibxml/reference.RFC.8570.xml">
<!ENTITY RFC7471 PUBLIC "" "http://xml.resource.org/public/rfc/bibxml/reference.RFC.7471.xml">
<!ENTITY RFC3630 PUBLIC "" "http://xml.resource.org/public/rfc/bibxml/reference.RFC.3630.xml">
<!ENTITY RFC9479 PUBLIC "" "http://xml.resource.org/public/rfc/bibxml/reference.RFC.9479.xml">
<!ENTITY RFC9492 PUBLIC "" "http://xml.resource.org/public/rfc/bibxml/reference.RFC.9492.xml">
<!ENTITY RFC8362 PUBLIC "" "http://xml.resource.org/public/rfc/bibxml/reference.RFC.8362.xml">
<!ENTITY RFC9350 PUBLIC "" "http://xml.resource.org/public/rfc/bibxml/reference.RFC.9350.xml">
<!ENTITY RFC5715 PUBLIC "" "http://xml.resource.org/public/rfc/bibxml/reference.RFC.5715.xml">
<!ENTITY RFC9356 PUBLIC "" "http://xml.resource.org/public/rfc/bibxml/reference.RFC.9356.xml">	
<!ENTITY RFC5392 PUBLIC "" "http://xml.resource.org/public/rfc/bibxml/reference.RFC.5392.xml">
<!ENTITY RFC5329 PUBLIC "" "http://xml.resource.org/public/rfc/bibxml/reference.RFC.5329.xml">		
<!ENTITY RFC8668 PUBLIC "" "http://xml.resource.org/public/rfc/bibxml/reference.RFC.8668.xml">	
<!ENTITY RFC8174 PUBLIC "" "http://xml.resource.org/public/rfc/bibxml/reference.RFC.8174.xml">	
<!ENTITY RFC4655 PUBLIC "" "http://xml.resource.org/public/rfc/bibxml/reference.RFC.4655.xml">	
<!ENTITY RFC1195 PUBLIC "" "http://xml.resource.org/public/rfc/bibxml/reference.RFC.1195.xml">
<!ENTITY RFC2328 PUBLIC "" "http://xml.resource.org/public/rfc/bibxml/reference.RFC.2328.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-ietf-lsr-flex-algo-bw-con-19" ipr="trust200902">
<front>
  <title abbrev="Flex-Algorithm: Bandwidth, Delay, Metric">
  Flexible Algorithms: Bandwidth, Delay, Metrics and Constraints</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="W." surname="Britto" fullname="William Britto A J">
    <organization>Juniper Networks Inc.</organization>
    <address>
      <postal>
        <street></street>
        <city></city>
        <region></region>
        <code></code>
        <country></country>
      </postal>
      <email>bwilliam@juniper.net</email>
    </address>
  </author>

      <author initials="R." surname="Shetty" fullname="Rajesh Shetty">
    <organization>Juniper Networks Inc.</organization>
    <address>
      <postal>
        <street></street>
        <city></city>
        <region></region>
        <code></code>
        <country></country>
      </postal>
      <email>mrajesh@juniper.net</email>
    </address>
  </author>

      <author initials="B." surname="Decraene" fullname="Bruno Decraene">
    <organization>Orange</organization>
    <address>
      <postal>
        <street></street>
        <city></city>
        <region></region>
        <code></code>
        <country></country>
      </postal>
      <email>bruno.decraene@orange.com</email>
    </address>
  </author>

      <author initials="P." surname="Psenak" fullname="Peter Psenak">
    <organization>Cisco Systems</organization>
    <address>
      <postal>
        <street></street>
        <city></city>
        <region></region>
        <code></code>
        <country></country>
      </postal>
      <email>ppsenak@cisco.com</email>
    </address>
  </author>

      <author initials="T." surname="Li" fullname="Tony Li">
    <organization>Juniper Networks Inc.</organization>
    <address>
      <postal>
        <street></street>
        <city></city>
        <region></region>
        <code></code>
        <country></country>
      </postal>
      <email>tony.li@tony.li</email>
    </address>
  </author>

  <date year="2025"/>
  <area>Routing</area>
  <workgroup>LSR</workgroup>
  <keyword>AS</keyword>
  <keyword>IGP</keyword>

  <abstract>
 <t>
    Many networks configure the link metric relative to the link capacity.
    High bandwidth traffic gets routed as per the link capacity. Flexible
    algorithms provide mechanisms to create constraint based paths in an IGP.
    This draft documents a generic metric type and
    set of bandwidth related constraints to be used in Flexible Algorithms.
</t>

  </abstract>

  <note 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>
  </note>

</front>

<middle>
<section title="Introduction" anchor='sec_introduction'>
<t>  High bandwidth traffic such as residential Internet traffic and
   machine-to-machine elephant flows benefit from using high capacity
   links.  Accordingly, many network operators define a link's metric
   relative to its capacity to help direct traffic to higher bandwidth
   links, but this is no guarantee that lower bandwidth links will be
   avoided, especially in failure scenarios.  To ensure that elephant
   flows are only placed on high capacity links, it would be useful to
   explicitly exclude the high throughput traffic from utilizing links
   below a certain capacity. Flex-Algorithm <xref target ='RFC9350'/>
   provides a mechanism to create constrained paths by defining 
   a set of parameters consisting of
   calculation-type, metric-type, and a set of constraints.  In
   this document, we define further extensions to Flex-Algorithm Definition (FAD) that
   will allow operators additional control over their traffic flows,
   especially with respect to bandwidth constraints. </t>

    <t>Historically, IGPs have done path computation by minimizing the
   sum of the link metrics along the path from source to
   destination. While the metric has been administratively defined,
   implementations have defaulted to a metric that is inversely
   proportional to link bandwidth. This has driven traffic to higher
   bandwidth links and has required manual metric manipulation to
   achieve the desired loading of the network.</t>

   <t>Over time, with the addition of different traffic types, the need
   for alternate types of metrics has evolved. Flex-Algorithm
   already supports using the minimum link delay and the
   administratively assigned traffic-engineering metrics in path
   computation. However, it is clear that additional metrics may be of
   interest in different situations. A network operator may seek to
   minimize their operational costs and thus may want a metric that
   reflects the actual fiscal costs of using a link.  Other traffic
   may require low jitter, leading to an entirely different set of
   metrics. With Flex-Algorithm, all of these different metrics, and
   more, could be used concurrently on the same network.</t>

   <t>In some circumstances, path computation constraints, such as
   administrative groups, can be used to ensure that traffic avoids
   particular portions of the network. These strict constraints are
   appropriate when there is an absolute requirement to avoid parts of
   the topology, even in failure conditions. If, however, the
   requirement is less strict, then using a high metric in a portion
   of the topology may be more appropriate. </t>


   <t>This document defines a family of generic metrics that can advertise
   various types of administratively assigned metrics. This document proposes
   standard metric-types which have specific semantics and require 
   to be standardized.
   This document also specifies user defined metric-types where specifics are
   not defined, so that administrators are free to assign semantics as
   they see fit.</t>
   <t>In <xref target ='sec_bw_metric'/>, this document specifies a
   new bandwidth based metric
   type to be used with Flex-Algorithm and other applications.
    <xref target ='sec_fad_con'/> defines additional 
	Flexible Algorithm Definition (FAD) <xref target ='RFC9350'/> 
   constraints that allow the network
   administrator to preclude the use of low bandwidth links or high
   delay links.</t>
   <t> <xref target ='sec_auto_metric'/>
   defines mechanisms to automatically calculate link metrics based on
   the parameters defined in the FAD and the advertised Maximum Link Bandwidth
   of each link. This is advantageous because administrators can change their
   criteria for metric assignment centrally, without individual
   modification of each link metric throughout the network. The procedures
   described in this document are intended to assign a metric to a link based on
   the total link capacity and they are not intended to update the metric based
   on actual traffic flow. Thus, the procedures described in this document are not a
   replacement to the capability of a PCE  <xref target ='RFC4655'/> which has a dynamic view of
   the network and provides real-time bandwidth management or a distributed bandwidth
   management protocol.</t>


</section>

<section title="Generic Metric Advertisement" 
         anchor='sec_generic_metric'>
<t> IS-IS <xref target ='RFC1195'/>and OSPF <xref target ='RFC2328'/> advertise 
a metric for each link in their respective
 link state advertisements. Multiple metric types are  already supported.
 Administratively assigned metrics are described in the original OSPF
 and IS-IS specifications. The Traffic Engineering Default Metric
is defined in <xref target ='RFC5305'/>  and  <xref target ='RFC3630'/>
and the Min Unidirectional delay metric is defined in
<xref target ='RFC8570'/>  and <xref target ='RFC7471'/>.
Other metrics, such as jitter, reliability, and fiscal cost may be
   helpful, depending on the traffic class. Rather than attempt to
   enumerate all possible metrics of interest, this document specifies
   a generic mechanism for advertising metrics. </t>
<t>
Each generic metric advertisement is on a per-link and per-metric
   type basis.  The metric advertisement consists of a metric type
   field and a value for the metric.  The metric type field is
   assigned by the "IGP metric type" IANA registry.  Metric types
   0-127 are standard metric types as assigned by IANA.  This document
   further specifies a user-defined metric type space of metric types
   128-255.  These are user defined and can be assigned by an operator
   for local use.
</t>
<t>Implementations MUST support sending and receiving generic metric
 sub-TLV in Application Specific Link Attributes (ASLA)encodings as 
 well as in the TLV 22/extended link LSA/TE-LSAs.
 The usage of a generic metric by an individual application is subject to the same
 rules that apply to other link attributes as defined in <xref target ='RFC3630'/>,
 <xref target ='RFC5305'/>, <xref target ='RFC9479'/>,  
 <xref target ='RFC9492'/> and <xref target ='RFC9350'/>.</t>

<section title="IS-IS Generic Metric Sub-TLV" 
         anchor='sec_isis_gen_metric'>
<t>The IS-IS Generic Metric sub-TLV specifies the link metric for a given
   metric type.  Typically, this metric is assigned by a
   network administrator.
   The Generic Metric sub-TLV is advertised in the TLVs/sub-TLVs below:</t>

   <t><list>
      <t>a. TLV-22 (Extended IS reachability) <xref target ='RFC5305'/></t>

      <t>b. TLV-222 (MT-ISN) <xref target ='RFC5120'/></t>

      <t>c. TLV-23 (IS Neighbor Attribute) <xref target ='RFC5311'/></t>

      <t>d. TLV-223 (MT IS Neighbor Attribute) <xref target ='RFC5311'/> </t>

      <t>e. TLV-141 (inter-AS reachability information) <xref target ='RFC9346'/></t>

      <t>f. sub-TLV 16 (Application-Specific Link Attributes (ASLA)) of
      TLV 22/222/23/223/141 <xref target ='RFC9479'/></t>
	  
	  <t>g. TLV 25 (L2 Bundle Member Attributes) <xref target ='RFC8668'/> 
	        Marked as "y(s)" (shareable among bundle members)</t>


    </list></t>
	<t>The Generic Metric sub-TLV, type TBD1 (IANA), and is six
   octets in length.
   <figure anchor="isis_gen_metric_sub_tlv" 
           title="IS-IS Generic Metric Sub-TLV">
      <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    |  metric-type  |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                         Value                 |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

      Type (1 octet):
      An 8-bit field assigned by IANA (To Be Determined as TBD1).
      This value uniquely identifies the Generic Metric TLV.
      
      Length (1 octet):
      An 8-bit field indicating the total length, in octets, 
      of the subsequent fields. For this TLV, the Length is set to 4.
      
      Metric-Type (1 octet):
      An 8-bit field specifying the type of metric. 
      The value is taken from the "IGP metric-type" 
      registry maintained by IANA.
      
      Value (3 octets):
      A 24-bit unsigned integer representing the metric value. 
      The valid range is from 0 to 16,777,215 (0xFFFFFF).

    </artwork>
    </figure>
	</t>
   <t>
    The Generic Metric sub-TLV MAY be advertised multiple times.
    For a particular metric type,
    the Generic Metric sub-TLV MUST be advertised only once for a link
    when advertised in TLV 22, 222, 23, 223 and 141.
    When Generic metric sub-TLV is advertised in ASLA,
    each metric type MUST be advertised only once per-application for a link.
    If there are multiple Generic Metric sub-TLVs advertised for a link
    for the same metric type  (and same application in case of ASLA)
    in one or more received LSPDUs, advertisement in the lowest numbered fragment
    MUST be used and the subsequent instances MUST be ignored.
	</t>
    <t>For a link, if the metric type corresponds to a metric type for
	which legacy advertisement mechanisms exist (e.g., the IGP metric, 
	the Minimum Unidirectional Link Delay, or the 
    Traffic Engineering Default Metric), the legacy metric types MUST 
	be utilized from the existing TLV or sub-TLVs. If a Generic Metric 
	advertises a legacy metric, it MUST be ignored.
. 
   </t>
   <t>A metric value of
   0xFFFFFF is considered as maximum link metric and a link having 
   this metric value MUST be used during Flex-algorithm calculations
   as a last resort link as described in sec 15.3 of <xref target ='RFC9350'/>. 
   A link can be made unusable by Flex-algorithm by leaving out Generic metric
   advertisement of the particular metric-type that the Flex-algorithm 
   uses as described in <xref target ='RFC9350'/>.
	</t>
	
	<t> During the router maintenance activity, the Generic Metric for 
   all the links on the node MAY be set to a maximum value of 
   16,777,215 (0xFFFFFF), as it is the maximum usable link metric for the 
   Flex-algorithm calculations.</t>
</section>

<section title="OSPF Generic Metric Sub-TLV" 
         anchor='sec_ospf_gen_metric'>
<t>
   The OSPF Generic Metric sub-TLV specifies the link metric for a given
   metric type. Typically, this metric is assigned by a
   network administrator.
   The Generic Metric sub-TLV is advertised in the TLVs below:</t>

   <t><list>
   <t>a.	sub-TLV of TE Link TLV (2) of OSPF TE LSA <xref target ='RFC3630'/>.</t>
   <t>b.	sub-TLV of TE Link TLV (2) of OSPFv2 Inter-AS-TE-v2 LSA <xref target ='RFC5392'/>.</t>
   <t>c.	sub-TLV of TE Link TLV (2) of OSPFv3 Intra-Area-TE-LSA <xref target ='RFC5329'/>.</t> 
   <t>d.	sub-TLV of TE Link TLV (2) of OSPFv3 Inter-AS-TE-v3 LSA <xref target ='RFC5392'/>.</t>
   <t>e.	sub-TLV of Application-Specific Link Attributes (ASLA) sub-TLV <xref target ='RFC9492'/> 
            of the OSPFv2 Extended Link TLV <xref target ='RFC7684'/>.</t>
   <t>f.	sub-TLV of Application-Specific Link Attributes (ASLA) sub-TLV <xref target ='RFC9492'/>
            of the OSPFv3 Router-Link TLV <xref target ='RFC8362'/>.</t>
   <t>g.    sub-TLV of the OSPFv2 L2 Bundle Member Attributes sub-TLV <xref target ='RFC9356'/>.</t>
   <t>h.    sub-sub-TLV of the OSPFv3 L2 Bundle Member Attributes sub-TLV <xref target ='RFC9356'/>.</t>

</list></t>


   <t>The Generic Metric sub-TLV, type TBD21/TBD22/TB23 (IANA), and is eight
   octets in length.


<figure anchor="ospf_gen_metric_sub_tlv" 
        title="OSPF Generic Metric Sub-TLV ">
      <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            |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      | metric-type   |         Reserved                              |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |                            Value                              |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
     
      Type (2 octets):
      A 16-bit field assigned by IANA (To Be Determined as TBD21/TBD22/TBD23).
      This value uniquely identifies the Generic Metric TLV.
      
      Length (2 octets):
      A 16-bit field indicating the total length, in octets, 
      of the subsequent fields. For this TLV, the Length is set to 8.
      
      Metric-Type (1 octet):
      An 8-bit field specifying the type of metric. 
      The value is taken from the "IGP metric-type" 
      registry maintained by IANA.
      
      Value (4 octets):
      A 32-bit unsigned integer representing the metric value. 
      The valid range is from 0 to 4,294,967,295(0xFFFFFFFF).
      

    </artwork>
    </figure>
    <t>The Generic Metric sub-TLV MAY be advertised multiple times.
   For a particular metric type, the Generic Metric sub-TLV MUST be
   advertised only once for a link when advertised as (a) through (d) above.
    When Generic Metric sub-TLV  is advertised as sub-sub-TLV of
    ASLA, it MUST be advertised only once per-application for a link.
    If there are multiple Generic Metric sub-TLVs advertised for 
	a link for the same metric type (and same application in case of ASLA)
	in one or more received LSAs, advertisement in the lowest numbered 
	LSA MUST be used and the subsequent instances MUST be ignored.</t>
	<t>For a link, if the metric type corresponds to a metric type for 
	which legacy advertisement mechanisms exist (e.g., the IGP metric, 
	the Minimum Unidirectional Link Delay, or the Traffic Engineering 
	Default Metric), the legacy metric types MUST be utilized from 
	the existing TLV or sub-TLVs. If a Generic Metric advertises a
	legacy metric, it MUST be ignored.
</t>
   <t>A metric value of
   0xFFFFFFFF is considered as maximum link metric and a link having 
   this metric value MUST be used during Flex-algorithm calculations
   as a last resort link as described in sec 15.3 of <xref target ='RFC9350'/>.</t>
    </t>
	<t>A link can be made unusable by Flex-algorithm by leaving out Generic metric
   advertisement of the particular metric-type that the Flex-algorithm 
   uses as described in <xref target ='RFC9350'/>.</t>
   <t> During the router maintenance activity, the Generic Metric for 
   all the links on the node MAY be set to a maximum value of 
   4,294,967,295 ((0xFFFFFFFF), as it is the maximum usable link metric for the 
   Flex-algorithm calculations.</t>
 
   

</section>

<section
title="Generic Metric applicability to Flexible Algorithms Multi-domain/Multi-area networks "
anchor='sec_multi_area'>
<t>Generic Metric can be used by Flex-Algorithms 
 by specifying the metric type in the
Flexible Algorithm Definitions. When Flex-Algorithms is used in a multi-area network,
<xref target ='RFC9350'/> defines the Flexible Algorithm Prefix Metric (FAPM)
 sub-TLV that carries
the Flexible-Algorithm-specific metric. Metrics carried in FAPM will be equal
to the metric to reach the prefix for that Flex-Algorithm in its
source area or domain (source area from the ABR perspective). When Flex-Algorithm uses
Generic metric, the same procedures as described in section 13 of
<xref target ='RFC9350'/>
are used to send and process FAPM sub-TLV.</t>
</section>
</section>


<section title=" FAD constraint Sub-TLVs" anchor='sec_fad_con'>

<t>

   In networks that carry elephant flows, directing an elephant flow
   down a low-bandwidth link might congest the link and cause other 
   critical application traffic flowing on the link to drop. Thus, in the
   context of Flex-Algorithm, it would be useful to be able to
   constrain the topology to only those links capable of supporting a
   minimum amount of bandwidth.</t>

   <t>If the capacity of a link is constant, this can already be achieved
   through the use of administrative groups. However, when a layer-3
   link is actually a collection of layer-2 links (LAG/layer-2
   Bundle), the link bandwidth will vary based on the set of active
   constituent links. This could be automated by having an
   implementation vary the advertised administrative groups based on
   bandwidth, but this seems unnecessarily complex and expressing this
   requirement as a direct constraint on the topology seems
   simpler. This is also advantageous if the minimum required
   bandwidth changes, as this constraint would provide a single
   centralized, coordinated point of control.</t>

   <t>To satisfy this requirement, this document defines an
   Exclude Minimum Bandwidth
   constraint.  When this constraint is advertised in a FAD,
   a link will be pruned from the Flex-Algorithm topology if the
   link's advertised Maximum Link Bandwidth is below the advertised
   Minimum Bandwidth value.</t>


    <t>Similarly, this document defines an Exclude Maximum Link Delay
   constraint.Applications, such as High-Frequency Trading are sensitive 
   to link delays and may perform poorly in networks prone to delay
   variability, such as those with transparent Layer 2 link 
   recovery mechanisms or satellite links.".
   Mechanisms already exist to measure the link delay dynamically and
   advertise it in the IGP.  Networks that employ dynamic link-delay
   measurement, may want to exclude links that have a delay over a
   given threshold.</t>


<section title="IS-IS FAD constraint Sub-TLVs" anchor='sec_isis'>
<section title="IS-IS Exclude Minimum Bandwidth sub-TLV" anchor='sec_isis_bw_exclusion'>
<t>

IS-IS Flex-Algorithm Exclude Minimum Bandwidth sub-TLV  (FAEMB) is a
sub-TLV of the IS-IS FAD sub-TLV. It has the following format:

<figure anchor="isis_faemb_sub_tlv" title="IS-IS FAEMB Sub-TLV">
      <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     |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                     Min Bandwidth                             |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   where:

      Type (1 octet):
      An 8-bit field assigned by IANA (To Be Determined as TBD3).
      This value uniquely identifies the FAEMB sub-TLV.
      
      Length (1 octet):
      An 8-bit field indicating the total length, in octets, 
      of the subsequent fields. For this sub-TLV, the Length is set to 4.
      
      Min Bandwidth (4 octets):
      A 32-bit field specifying the link bandwidth encoded in IEEE
      floating point format (32 bits). The units are bytes-per-second.   
      
     
      </artwork>
    </figure>
    </t>
    <t>The FAEMB sub-TLV MUST appear at most once in the FAD sub-TLV.
    If it appears more than once, the IS-IS FAD sub-TLV MUST be
   ignored by the receiver. </t>


   <t>The Minimum bandwidth advertised in FAEMB sub-TLV MUST be compared with
   Maximum Link Bandwidth advertised in sub-sub-TLV 9 of ASLA sub-TLV <xref target ='RFC9479'/>.
   If L-Flag is set in the ASLA sub-TLV, the Minimum bandwidth advertised in FAEMB
   sub-TLV MUST be compared with Maximum Link Bandwidth as
   advertised in the sub-TLV 9 of the TLV
   22/222/23/223/141 <xref target ='RFC5305'/> as defined in <xref target ='RFC9479'/>
   Section 4.2. </t>

   <t>If the Maximum Link Bandwidth is lower than the Minimum
   link bandwidth advertised in FAEMB sub-TLV,
   the link MUST be excluded from the Flex-Algorithm topology.

  If a link does not have the Maximum Link Bandwidth advertised but the
  FAD contains this sub-TLV, then that link
   MUST NOT be excluded from the topology based on the Minimum
   Bandwidth constraint.
    </t>
</section>
<section title="IS-IS Exclude Maximum Delay Sub-TLV" 
         anchor='sec_isis_delay_exclusion'>
<t>

IS-IS Flex-Algorithm Exclude Maximum Delay sub-TLV  (FAEMD) is a
sub-TLV of the IS-IS FAD sub-TLV. It has the following format.

<figure anchor="isis_faemd_sub_tlv" title="IS-IS FAEMD Sub-TLV">
      <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     |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                     Max Link Delay          |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   where:

      Type (1 octet):
      An 8-bit field assigned by IANA (To Be Determined as TBD4).
      This value uniquely identifies the FAEMD sub-TLV.
      
      Length (1 octet):
      An 8-bit field indicating the total length, in octets, 
      of the subsequent fields. For this sub-TLV, the Length is set to 3.
      
      Max link delay (3 octets):
      A 24-bit field specifying the Maximum link delay in microseconds.
	  
     
      </artwork>
    </figure>
    </t>
    <t>The FAEMD sub-TLV MUST appear only once in the FAD sub-TLV.
    If it appears more than once, the IS-IS FAD sub-TLV MUST be
   ignored by the receiver.</t>

    <t>The Maximum link delay advertised in FAEMD sub-TLV MUST be compared with
   Min Unidirectional Link Delay advertised in sub-sub-TLV 34 of ASLA sub-TLV <xref target ='RFC9479'/>.
   If the L-Flag is set in the ASLA sub-TLV, the Maximum link delay advertised in FAEMD
   sub-TLV MUST be compared with Min Unidirectional Link Delay as
   advertised by the sub-TLV 34 of the TLV
   22/222/23/223/141 <xref target ='RFC8570'/> as defined in <xref target ='RFC9479'/>
   Section 4.2. </t>


   <t>If the  Min Unidirectional Link Delay value is higher than the
   Maximum link delay advertised in FAEMD sub-TLV, the link MUST be
   excluded from the Flex-Algorithm topology.

If a link does not have the Min Unidirectional Link Delay advertised but
the FAD contains this sub-TLV, then that link MUST NOT be
   excluded from the topology based on the Maximum Delay constraint.
    </t>
</section>
</section>

<section title="OSPF FAD constraint Sub-TLVs" anchor='sec_ospf'>

<section title="OSPF Exclude Minimum Bandwidth Sub-TLV" 
         anchor='sec_ospf_bw_exclusion'>
<t>

OSPF Flex-Algorithm Exclude Minimum Bandwidth sub-TLV  (FAEMB) is a
sub-TLV of the OSPF FAD TLV. It has the following format:

<figure anchor="ospf_faemb_sub_tlv" title="OSPF FAEMB Sub-TLV">
      <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                     |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                     Min Bandwidth                             |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   where:

      Type (2 octets):
      A 16-bit field assigned by IANA (To Be Determined as TBD5).
      This value uniquely identifies the OSPF FAEMB sub-TLV.
      
      Length (2 octets):
      A 16-bit field indicating the total length, in octets, 
      of the subsequent fields. For this sub-TLV, the Length is set to 4.
      
      Min Bandwidth (4 octets):
      A 32-bit field specifying the link bandwidth encoded in IEEE
      floating point format (32 bits). The units are bytes-per-second.
	       
      </artwork>
    </figure>
	</t>
    <t>The FAEMB sub-TLV MUST only appear once in the FAD sub-TLV.
    If it appears more than once, the OSPF FAD TLV MUST be
    ignored by the receiver.</t>


    <t>The Maximum Link Bandwidth as advertised in the Extended Link TLV
   in the Extended Link Opaque LSA in OSPFv2 <xref target ='RFC7684'/>
   or as a sub-TLV
   of the Router-Link TLV of the E-Router-LSA Router-Link TLV in 
   OSPFv3 <xref target ='RFC8362'/> MUST be  compared against
   the Minimum bandwidth advertised in FAEMB sub-TLV.
   If the link bandwidth is lower than the Minimum bandwidth 
   advertised in FAEMB sub-TLV, the link MUST be excluded 
   from the Flex-Algorithm topology.
   </t>
   <t>If a link does not have the Maximum Link Bandwidth advertised
   but the FAD contains this sub-TLV, then that link MUST be included in the
   topology and proceed to apply further pruning rules for the link.
    </t>
</section>
<section title="OSPF Exclude Maximum Delay Sub-TLV" 
         anchor='sec_ospf_delay_exclusion'>
<t>

The OSPF Flex-Algorithm Exclude Maximum Delay sub-TLV  (FAEMD) is a
sub-TLV of the OSPF FAD TLV. It has the following format.

<figure anchor="ospf_faemd_sub_tlv" title="OSPF FAEMD Sub-TLV">
      <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                     |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |  RESERVED     |                     Max link Delay            |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   where:

      Type (2 octets):
      A 16-bit field assigned by IANA (To Be Determined as TBD6).
      This value uniquely identifies the OSPF FAEMD sub-TLV.
      
      Length (2 octets):
      A 16-bit field indicating the total length, in octets, 
      of the subsequent fields. For this sub-TLV, the Length is set to 4.
      
      Max link delay (4 octets):
      A 24-bit field specifying the Maximum link delay in microseconds.  
     
      </artwork>
    </figure>
	</t>
   <t> The FAEMD sub-TLV MUST only appear once in the OSPF FAD TLV.
    If it appears more than once, the OSPF FAD TLV MUST be
   ignored by the receiver.
    </t>
    <t>The Min Delay value advertised via the Min/Max Unidirectional Link Delay 
    of ASLA sub-TLV <xref target ='RFC9492'/>, MUST be compared against the Maximum delay
    advertised in the FAEMD sub-TLV. If the Min Unidirectional Link Delay is higher
    than the Maximum delay advertised in the FAEMD sub-TLV, the link MUST be
    excluded from the Flex-Algorithm topology. If the
    Min/Max Unidirectional Link Delay is not advertised for a link but 
	the FAD contains this sub-TLV,then then that link MUST NOT be
   excluded from the topology based on the Maximum Delay constraint.
    </t>
</section>
</section>
</section>
<section title="Bandwidth Metric Advertisement" 
         anchor='sec_bw_metric'>

<t>
   Historically, IGP implementations have made default metric
   assignments based on link bandwidth. This has proven to be useful,
   but has suffered from having different defaults across
   implementations and from the rapid growth of link bandwidths. With
   Flex-Algorithm, the network administrator can define a function
   that will produce a metric for each link and have each node
   automatically compute each link's metric based its bandwidth.</t>

   <t>This document defines a standard metric type for this purpose
   called the "Bandwidth Metric".  The Bandwidth Metric MAY be
   advertised in the Generic Metric sub-TLV with the metric type set
   to "Bandwidth Metric".  IS-IS and OSPF will advertise this type
   of metric in their link advertisements. Bandwidth metric is a link
   attribute and for the advertisement and processing of this attribute for
   Flex-algorithm, MUST follow the section 12 of 
   <xref target ='RFC9350'/></t>

  <t> Flex-Algorithm uses this
   metric type by specifying the bandwidth metric as the metric type
   in a FAD TLV. A FAD TLV may also specify an automatic computation
   of the bandwidth metric based on a link's advertised bandwidth. An
   explicit advertisement of a link's bandwidth metric using the
   Generic Metric sub-TLV overrides this automatic computation.
   The automatic bandwidth metric calculation sub-TLVs are advertised
   in the FAD TLV and these parameters are applicable to applications
   such as Flex-algorithm that make use of the FAD TLV.
</t>


<section title="Automatic Metric Calculation" anchor='sec_auto_metric'>

  <t> Networks which are designed to be highly regular and follow uniform
   metric assignment may want to simplify their operations by
   automatically calculating the bandwidth metric. When
   a FAD advertises the metric type as Bandwidth Metric and the link does
   not have the Bandwidth Metric advertised, automatic metric derivation
   can be used with additional FAD constraint advertisement as
   described in this section.  </t>

  <t> If a link's bandwidth changes, then the delay in learning about the
   change may create the possibility of micro-loops in the
   topology. This is no different from the IGP's susceptibility to
   micro-loops during a metric change.  The micro-loop avoidance
   procedures described in <xref target ='I-D.bashandy-rtgwg-segment-routing-uloop'/>
   or any other mechanism as described in the framework <xref target ='RFC5715'/>
   can be used to avoid micro-loops when the automatic metric
   calculation is deployed.</t>

  <t> Computing the metric between adjacent systems based on bandwidth
   becomes more complex in the case of parallel adjacencies. If there
   are parallel adjacencies between systems, then the bandwidth
   between the systems is the sum of the bandwidth of the parallel
   links. This is somewhat more complex to deal with, so there is an
   optional mode for computing the aggregate bandwidth.</t>



<section title="Automatic Metric Calculation Modes" 
         anchor='sec_auto_metric_mode'>

<section title="Simple Mode" anchor='sec_simple'>
<t> In simple mode, the Maximum Link Bandwidth of a single layer-3 link
   is used to derive the metric.  This mode is suitable for
   deployments that do not use parallel layer-3 links. In this case,
   the computation of the metric is straightforward.

   If a layer-3 link is composed of a layer-2 bundle, then the link
   bandwidth is the sum of the bandwidths of the working components
   and may vary with layer-2 link failures. </t>

</section>


<section title="Interface Group Mode" anchor='sec_intf_grp'>
<t> The simple mode of metric calculation may not work well when there
   are multiple parallel layer-3 interfaces between two nodes.
   Ideally, the metric between two systems should be the same given
   the same bandwidth, whether the bandwidth is provided by parallel
   layer-2 links or parallel layer-3 links. To address this, in
   Interface Group Mode, nodes MUST compute the aggregate bandwidth of
   all parallel adjacencies, MUST derive the metric based on the
   aggregate bandwidth, and MUST apply the resulting metric to each of
   the parallel adjacencies. Note that a single elephant flow is normally
   pinned to a single layer-3 interface. If the single layer-3 link
   bandwidth is not sufficient for any single elephant flow, the mechanisms
   to solve this issue are outside the scope of this document.
<figure anchor="interface_grp" title="Parallel interfaces">
      <artwork>
        A------B====C====F====D
               |              |
                ------E-------
      </artwork>
    </figure>
   For example, in the above diagram, there are two parallel links
   between B->C, C->F, F->D.  Let us assume the link bandwidth is
   uniform 10Gbps on all links. When bandwidth is used to derive the metric 
   for the links, the metric for each link will be
   the same. Traffic from B to D will be forwarded B->E->D as
   the metric will be lower.  Since the
   bandwidth is higher on the B->C->F->D path, the metric for that
   path should be lower than the B->E->D path to attract the traffic on
   B->C->F->D path.  Interface
   Group Mode should be preferred in cases where there are parallel layer-3
   links.
    </t>
    <t>
    In the interface group mode, every node  MUST
    identify the set of parallel links between a pair
    of nodes based on IGP link advertisements
    and MUST consider cumulative bandwidth of the
    parallel links while arriving at the metric of each link. </t>
	<t>The parallel layer-3 links between two nodes may not have the 
	   same bandwidth. In such cases the method described in interface group mode will
	   result in same metric being used for all the parallel links which may cause
	   undesired load-balancing on the links. In such cases, a device may locally
	   apply load-balancing factor relative to the link bandwidth on the ECMP nexthops.
	   The load-balancing mechanisms are outside the scope of this document.</t>
</section>
</section>

<section title="Automatic Metric Calculation Methods" 
         anchor='sec_auto_metric_methods'>
<t>
In automatic metric calculation for simple and interface group mode,
Maximum Link Bandwidth of the links is used to derive the metric. 
There are two types of automatic metric derivation methods.</t>
<t>
<list>
<t> 1. Reference bandwidth method</t>
<t> 2. Bandwidth thresholds method </t>
</list>
</t>

<section title="Reference Bandwidth method" anchor='sec_ref_bw_method'>

   <t>In many networks, the metric is inversely proportional to the link
   bandwidth.  The administrator or implementation selects a reference
   bandwidth and the metric is derived by dividing the reference
   bandwidth by the advertised Maximum Link Bandwidth.  Advertising
   the reference bandwidth in the FAD constraints allows the metric
   computation to be done on every node for each link.
   The metric is computed using reference bandwidth and the advertised link bandwidth.
   Centralized control of this
   reference bandwidth simplifies management in the case that the
   reference bandwidth changes. In order to ensure that small
   bandwidth changes do not change the link metric, it is useful to
   define the granularity of the bandwidth that is of interest.  The
   link bandwidth will be truncated to this granularity before
   deriving the metric.  </t>

<t>
For example,</t>
<t><list>
 <t>reference bandwidth = 1000G  </t>
 <t>Granularity = 20G </t>
 <t>The derived metric is 10 for link bandwidth in the range 100G to 119G </t>
 </list></t>

 </section>
 
 <section title="Bandwidth Thresholds method" 
          anchor='sec_bw_threshold_method'>
<t> The reference bandwidth approach described above provides a uniform
   metric value for a range of link bandwidths.  In certain cases
   there may be a need to define non-proportional metric values for
   the varying ranges of link bandwidth.  For example, bandwidths from
   10G to 30G are assigned metric value 100, bandwidth from 30G to 70G
   get a metric value of 50, and bandwidths greater than 70G have a
   metric of 10.  In order to support this, a staircase mapping based
   on bandwidth thresholds is supported in the FAD.  This
   advertisement contains a set of threshold values and associated
   metrics. </t>
</section>

</section>


<section title="IS-IS FAD constraint Sub-TLVs for automatic metric calculation"
 anchor='sec_auto_isis'>
<section title="Reference Bandwidth Sub-TLV" anchor='sec_isis_auto_ref_bw'>
<t>
This section provides FAD constraint advertisement details for the
reference bandwidth method of metric calculation as described in
 <xref target ='sec_ref_bw_method'/>.

The Flexible Algorithm Definition Reference Bandwidth sub-TLV (FADRB sub-TLV) is
a sub-TLV of the IS-IS FAD sub-TLV. It has the following format:


<figure anchor="isis_fadrb_sub_tlv" title="IS-IS FADRB Sub-TLV">
      <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     |     Flags     |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                      Reference Bandwidth                      |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                      Granularity Bandwidth                    |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+


   where:
   
      Type (1 octet):
      An 8-bit field assigned by IANA (To Be Determined as TBD7).
      This value uniquely identifies the IS-IS FADRB sub-TLV.
      
      Length (1 octet):
      An 8-bit field indicating the total length, in octets, 
      of the subsequent fields. For this sub-TLV, the Length is set to 9.
      
      Flags (1 octet):
      An 8-bit field containing flags.

                 0 1 2 3 4 5 6 7
                +-+-+-+-+-+-+-+-+
                |G|             |
                +-+-+-+-+-+-+-+-+

         G-flag: When set, Interface Group Mode MUST be used to
                 derive total link bandwidth.

      Reference Bandwidth (4 octets):
      A 32-bit field with Bandwidth encoded in IEEE floating point
      format. The units are bytes-per-second.
      
      Granularity Bandwidth (4 octets): 
      A 32-bit field with Bandwidth encoded in IEEE floating point
      format.The units are bytes-per-second.
                           
                           
                      
    When granularity_bw is less than or equal to Total_link_bandwidth

        Metric calculation: (Reference_bandwidth) /
                              (Total_link_bandwidth -
                               (Modulus of(Total_link_bandwidth,
                                           granularity_bw)))
                                            
    When granularity_bw is greater than Total_link_bandwidth                                   
            Metric calculation: Reference_bandwidth / 
                                       Total_link_bandwidth
                                       
    The division used here is integer division.

       </artwork>
    </figure>
    </t>
    <t>   The Granularity Bandwidth value ensures that the metric
         does not change when there is a small
         change in the link bandwidth.
   The IS-IS FADRB sub-TLV MUST NOT appear more than once in an IS-IS FAD
   sub-TLV.  If it appears more than once, the IS-IS FAD sub-TLV MUST be ignored
   by the receiver. The value advertised in the Reference Bandwidth field MUST be non-zero.
   If a zero value is advertised in the Reference Bandwidth Field in the IS-IS FADRB sub-TLV,
   the sub-TLV MUST be ignored.</t>
   <t>If a Generic Metric sub-TLV with Bandwidth metric
   type is advertised for a link,
   the Flex-Algorithm calculation MUST use the advertised Bandwidth Metric,
   and MUST NOT use the automatically derived metric for that link.
   In case of Interface Group Mode, if all the parallel links have been 
   advertised with the Bandwidth Metric, The individual link Bandwidth Metric
   MUST be used. If only some links among the parallel links have the Bandwidth 
   Metric advertisement, the Bandwidth Metric for such links MUST be ignored and
   automatic Metric calculation MUST be used to derive link metric.
   </t>
   <t>If the calculated metric evaluates to zero, a metric of 1 MUST be used.</t>
   <t> If the calculated metric evaluates to a number greater than 0xFFFFFF, 
   it is set to 0xFFFFFF.</t>
</section>


<section title="Bandwidth Thresholds Sub-TLV" anchor='sec_isis_threshold_metric'>
<t>
This section provides FAD constraint advertisement details for the
Bandwidth Thresholds method of metric calculation as
described in <xref target ='sec_bw_threshold_method'/>.
The Flexible Algorithm Definition Bandwidth Threshold sub-TLV (FADBT sub-TLV) is
a sub-TLV of the IS-IS FAD sub-TLV. It has the following format:

<figure anchor="isis_fadbt_sub_tlv" title="IS-IS FADBT Sub-TLV">
      <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     |       Flags   |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                     Bandwidth Threshold 1                     |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                     Threshold Metric 1        |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                     Bandwidth Threshold 2                     |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                     Threshold Metric 2        |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                     Bandwidth Threshold 3                     |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
                                  .....
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                     Threshold Metric N-1      |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                     Bandwidth Threshold N                     |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                     Threshold Metric N        |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

      where:
      
      
      Type (1 octet):
      An 8-bit field assigned by IANA (To Be Determined as TBD8).
      This value uniquely identifies the IS-IS FADBT sub-TLV.
      
      Length (1 octet):
      An 8-bit field indicating the total length, in octets, 
      of the subsequent fields. For this sub-TLV, 
      the Length is calculated as (1+n*7). Here n is equal 
      to number of Threshold Metrics specified. 
      n MUST be greater than or equal to 1
      
      Flags (1 octet):

                 0 1 2 3 4 5 6 7
                +-+-+-+-+-+-+-+-+
                |G| | |         |
                +-+-+-+-+-+-+-+-+

        G-flag: when set, interface group Mode MUST be used to derive
                 total link bandwidth.
                 
        Staircase bandwidth threshold and associated metric values.
        
        Bandwidth Threshold 1 (4 octets): 
        Minimum Link Bandwidth is encoded in in IEEE floating 
        point format (32 bits).The units are bytes-per-second.
        
        Threshold Metric 1 (3 octets): 
        Metric value range (1 - 4,261,412,864)
        
        Bandwidth Threshold n (4 octets):
        Maximum Link Bandwidth is encoded in IEEE floating
        point format (32 bits).The units are bytes-per-second.
        
        Threshold Metric n (3 octest) : 
        Metric value range (1 - 4,261,412,864)      

       </artwork>
    </figure>
</t>

   <t>When G-flag is set, the cumulative bandwidth of the
   parallel links is computed
   as described in <xref target ='sec_intf_grp'/>. If G-flag is
   not set, the advertised Maximum Link
   Bandwidth is used.</t>
   <t>Assignment of Bandwidth Metric Based on Computed Link Bandwidth:</t>

    <t>The Bandwidth Metric for a link during the Flex-Algorithm Shortest 
	Path First (SPF) calculation MUST be assigned according to 
	the following rules:</t>
    <t>
	<list>
	<t>1. When the computed link bandwidth is less than Bandwidth Threshold 1:
	<ul>
       <li> The Bandwidth Metric MUST be set to the maximum metric value of 4,261,412,864.</li>
    </ul>
	</t>
    <t>2. When the computed link bandwidth is greater than or equal to
   	      Bandwidth Threshold 1 and less than Bandwidth Threshold 2:
		<ul>
          <li> The Bandwidth Metric MUST be set to Threshold Metric 1.</li>
		</ul>
		</t>

    <t>3. When the computed link bandwidth is greater than or equal
    	to Bandwidth Threshold 2 and less than Bandwidth Threshold 3:
		<ul>
        <li> The Bandwidth Metric MUST be set to Threshold Metric 2.</li>
		</ul>
		</t>

    <t>4. In general, for all integer values of X such that 1 ≤ X &lt; N:
	    <ul>
        <li> When the computed link bandwidth is greater than or equal to
          Bandwidth Threshold X and less than Bandwidth Threshold X+1:</li>
        <li> The Bandwidth Metric MUST be set to Threshold Metric X.</li>
		</ul>
	</t>

    <t>5. When the computed link bandwidth is greater than or equal to Bandwidth Threshold N:
        <ul>
		  <li> The Bandwidth Metric MUST be set to Threshold Metric N.</li>
		</ul>
	</t>
    </list>
	</t>
<t>Notes:
<list>
    <t>The term Bandwidth Threshold X refers to a predefined threshold 
       value corresponding to the index X.</t>
    <t>The term Threshold Metric X refers to the metric value 
        associated with Bandwidth Threshold X.</t>
    <t>N represents the total number of bandwidth thresholds 
	     defined in the system.</t>
</list>
</t>
<t>Implementations MUST ensure that these rules are consistently applied to 
maintain interoperability and optimal path computation 
within the network.</t>
       
   <t>The IS-IS FADBT sub-TLV MUST NOT appear more than once in an IS-IS FAD
   sub-TLV.  If it appears more than once, the IS-IS FAD sub-TLV MUST
   be ignored by the receiver.</t>

   <t>A FAD MUST NOT contain both the FADBT sub-TLV and the FADRB sub-TLV.  If both
   these sub-TLVs are advertised in the same FAD for a Flexible
   Algorithm, the FAD MUST be ignored by the receiver.</t>

   <t>If a Generic Metric sub-TLV with Bandwidth metric type is advertised
   for a link, the Flex-Algorithm calculation MUST use the Bandwidth
   Metric advertised on the link, and MUST NOT use the automatically
   derived metric for that link.</t>
   
   <t>In case of Interface Group Mode, if all the parallel links 
   have been advertised with the Bandwidth Metric, The individual 
   link Bandwidth Metric MUST be used. If only some links among 
   the parallel links have the Bandwidth Metric advertisement, 
   the Bandwidth Metric for such links MUST be ignored and 
   automatic Metric calculation MUST be used to derive link metric.</t>

</section>
</section>

<section title="OSPF FAD constraint Sub-TLVs for automatic metric calculation"
 anchor='sec_auto_ospf'>
<section title="Reference Bandwidth Sub-TLV" anchor='sec_ospf_auto_ref_bw'>
<t>
The Flexible Algorithm Definition Reference Bandwidth sub-TLV (FADRB sub-TLV) is
a sub-TLV of the OSPF FAD TLV. It has the following format:


<figure anchor="ospf_fadrb_sub_tlv" title="OSPF FADRB Sub-TLV">
      <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                     |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |    Flags   |     Reserved                                     |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                      Reference Bandwidth                      |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                      Granularity Bandwidth                    |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+


   where:

     
      Type (2 octets):
      A 16-bit field assigned by IANA (To Be Determined as TBD9).
      This value uniquely identifies the OSPF FADRB sub-TLV.
      
      Length (2 octets):
      A 16-bit field indicating the total length, in octets, 
      of the subsequent fields. For this sub-TLV, Length is set to 14.
      
      Flags (1 octet):

                 0 1 2 3 4 5 6 7
                +-+-+-+-+-+-+-+-+
                |G| | |         |
                +-+-+-+-+-+-+-+-+

         G-flag: When set, Interface Group Mode MUST be used
                 to derive total link bandwidth.
                 
      Reference Bandwidth (4 octets): 
      Bandwidth encoded in 32 bits in IEEE floating point format.
      The units are in bytes per second.
      Granularity Bandwidth (4 octets): 
      Bandwidth encoded in 32 bits in IEEE floating point format.
      The units are in bytes per second.
      
      
    When granularity_bw is less than or equal to Total_link_bandwidth

        Metric calculation: (Reference_bandwidth) /
                                (Total_link_bandwidth -
                                (Modulus of(Total_link_bandwidth,
                                            granularity_bw)))
        
    When granularity_bw is greater than Total_link_bandwidth                                   
            
        Metric calculation: Reference_bandwidth/
                    Total_link_bandwidth

    The division used here is integer division.
       </artwork>
    </figure>

   The Granularity Bandwidth value is used to ensure that the
   metric does not change when there is a small
   change in the link bandwidth.
   The OSPF FADRB sub-TLV MUST NOT appear more than once in an OSPF FAD
   TLV.  If it appears more than once, the OSPF FAD TLV MUST be ignored
   by the receiver.The value advertised in the Reference Bandwidth field MUST be non-zero.
   If a zero value is advertised in the Reference Bandwidth Field in the OSPF FADRB sub-TLV,
   the sub-TLV MUST be ignored.
   If a Generic Metric sub-TLV with Bandwidth metric type is
   advertised for a link, the Flex-Algorithm calculation MUST use
   the advertised Bandwidth Metric
   on the link, and MUST NOT use the automatically derived
   metric for that link.
   In the case of Interface Group Mode, the following procedures apply:
   <list>
     <t> When all parallel links have advertised the Bandwidth Metric:
 	     The individual link Bandwidth Metric MUST be used for each link.</t>
     <t> When only a subset of the parallel links have advertised 
	     the Bandwidth Metric: The Bandwidth Metric advertisements for 
		 those links MUST be ignored. In this scenario, automatic
		 metric calculation MUST be used to derive the link metrics 
		 for all parallel links.</t>
	</list>
   
   </t>
 <t>If the calculated metric evaluates to zero, a metric of 1 MUST be used.</t>
 <t> If the calculated metric evaluates to a number greater than 0xFFFFFFFF, 
     it is set to 0xFFFFFFFF.</t>
</section>


<section title="Bandwidth Threshold Sub-TLV" anchor='sec_ospf_threshold_metric'>
<t>
The Flexible Algorithm Definition Bandwidth Thresholds sub-TLV
(FADBT sub-TLV) is
a sub-TLV of the OSPF FAD TLV. It has the following format:

<figure anchor="ospf_fadbt_sub_tlv" title="OSPF FADBT Sub-TLV">
      <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                     |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |    Flags   | Reserved                                         |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                     Bandwidth Threshold 1                     |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                     Threshold Metric 1                        |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                     Bandwidth Threshold 2                     |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                     Threshold Metric 2                        |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                     Bandwidth Threshold 3                     |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
                                  .....
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                     Threshold Metric N-1                      |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                     Bandwidth Threshold N                     |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                     Threshold Metric N                        |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+


   where:
    Type (2 octets):
    A 16-bit field assigned by IANA (To Be Determined as TBD10).
    This value uniquely identifies the OSPF FADBT sub-TLV.
      
    Length (2 octets):
    A 16-bit field indicating the total length, in octets, 
    of the subsequent fields. For this sub-TLV, Length is set
	2 + N*8 octets. Here N is equal to number of
    Threshold Metrics specified. N MUST be greater than or equal to 1.
   
     Flags (1 octet):

                 0 1 2 3 4 5 6 7
                +-+-+-+-+-+-+-+-+
                |G|             |
                +-+-+-+-+-+-+-+-+

         G-flag: when set, interface group Mode MUST be used to
                 derive total link bandwidth.
				 
	Staircase bandwidth threshold and associated metric values.
	
    Bandwidth Threshold 1 (4 octets): 
	Minimum Link Bandwidth is encoded 
    in IEEE floating point format (32 bits)[IEEE754-2019].
    The units are bytes per second.
	
    Threshold Metric 1 (4 octets):
	Metric value range (1 - 4,294,967,296)
	
    Bandwidth Threshold N (4 octets): 
	Maximum Link Bandwidth is encoded
    in IEEE floating point format (32 bits).
    The units are bytes per second.
	
    Threshold Metric N (4 octets): 
	Metric value range (1 - 4,294,967,296)			 
    
       </artwork>
   </figure>
   </t>

   <t>When G-flag is set, the cumulative bandwidth of the parallel links is
   computed as described in <xref target ='sec_intf_grp'/>.
   If G-flag is not set, the advertised Maximum Link
   Bandwidth is used.</t>
   
   <t>Assignment of Bandwidth Metric Based on Computed Link Bandwidth:</t>

    <t>The Bandwidth Metric for a link during the Flex-Algorithm
	Shortest Path First (SPF) calculation MUST be assigned according 
	to the following rules:</t>
<t>
<list>
 <t>1. When the computed link bandwidth is less than Bandwidth Threshold 1:
  <ul>
  <li>The Bandwidth Metric MUST be set to the maximum metric 
      value of 4,294,967,296.</li>
  </ul>
  </t>
  <t>2. When the computed link bandwidth is greater than or equal 
    to Bandwidth Threshold 1 and less than Bandwidth Threshold 2:
	<ul>
  <li>The Bandwidth Metric MUST be set to Threshold Metric 1.</li>
  </ul>
    </t>
   <t>3. When the computed link bandwidth is greater than or equal
         to Bandwidth Threshold 2 and less than Bandwidth Threshold 3:
		 <ul>
    <li> The Bandwidth Metric MUST be set to Threshold Metric 2.</li>
	   </ul>
    </t>
    <t>4. In general, for all integer values of X where 1 ≤X &lt; N:
	<ul>
    <li>When the computed link bandwidth is greater than or equal to 
	Bandwidth Threshold X and less than Bandwidth Threshold X+1:</li>
    <li>The Bandwidth Metric MUST be set to Threshold Metric X.</li>
	</ul>
     </t>
    <t>5. When the computed link bandwidth is greater than or equal
    	to Bandwidth Threshold N:
	<ul>
    <li>The Bandwidth Metric MUST be set to Threshold Metric N.</li>
	</ul>
	</t>
</list>
</t>
<t>Notes:
<list>
 <t>Bandwidth Threshold X refers to the predefined bandwidth 
     threshold corresponding to index X.</t>
 <t>Threshold Metric X is the metric value associated with
     Bandwidth Threshold X.</t>
  <t>N represents the total number of bandwidth thresholds 
      defined in the system.</t>
   
</list>
</t>
<t>Implementations MUST consistently apply these rules to ensure accurate
 path computations and maintain interoperability within the network.</t>


   <t>The OSPF FADBT sub-TLV MUST NOT appear more than once in an OSPF FAD
   sub-TLV.  If it appears more than once, the OSPF FAD MUST 
   be ignored by the receiver.</t>

   <t>A FAD MUST NOT contain both the FADBT sub-TLV and the FADRB sub-TLV.  If both
   these sub-TLVs are advertised in the same FAD for a Flexible
   Algorithm, the FAD MUST be ignored by the receiver.</t>

   <t>If a Generic Metric sub-TLV with Bandwidth metric type is advertised
   for a link, the Flex-Algorithm calculation MUST use the Bandwidth
   Metric advertised on the link, and MUST NOT use the automatically
   derived metric for that link.</t>
  
  <t> Metric Assignment in Interface Group Mode:</t>
   <t>When a link does not have a configured Bandwidth Metric, 
   the automatically derived metric MUST be used for that link.</t>

<t>In the context of Interface Group Mode, the following rules apply to parallel links:</t>
<t>
<list>
 <t> If all parallel links have advertised the Bandwidth Metric:
    <ul>
	<li>The individual link Bandwidth Metrics MUST be used for each link during path computation.</li>
	</ul>
  </t>
  <t>If only some of the parallel links have advertised the Bandwidth Metric:
    <ul>
	<li>The Bandwidth Metric advertisements for those links MUST be ignored.</li> 
    <li>Automatic metric calculation MUST be used to derive the link metrics for all parallel links.</li>
   </ul>
  </t>
</list>
</t>
<t>This approach ensures consistent metric calculation and avoids discrepancies 
caused by partial Bandwidth Metric advertisements among parallel links.</t>


</section>

</section>
</section>
</section>

  <section title='Bandwidth metric considerations' anchor='sec-metric'>
    <t>


    This section specifies the rules of deriving the Bandwidth Metric if
    and only if the winning FAD for the Flex-Algorithm specifies the
    metric-type as "Bandwidth Metric".
    <list>
    <t>1. If the Generic Metric sub-TLV with Bandwidth metric type
    is advertised for the link as
    described in <xref target ='sec_bw_metric'/>,
    it MUST be used during the Flex-Algorithm
    calculation.</t>

    <t>2. If the  Generic Metric sub-TLV with Bandwidth metric type
    is not advertised for the link
    and the winning FAD for the Flex-Algorithm does not specify
    the automatic bandwidth metric calculation (as defined in
    <xref target ='sec_auto_metric'/> ),
    the the link is treated as if the Bandwidth Metric is not 
	available for the link.</t>

    <t>3. If the  Generic Metric sub-TLV with Bandwidth metric type
    is not advertised for the link
    and the winning FAD for the Flex-Algorithm specifies
    the automatic bandwidth metric calculation (as defined in
    <xref target ='sec_auto_metric'/>),
    the Bandwidth Metric metric MUST be automatically calculated as per
    the procedures defined in <xref target ='sec_auto_metric'/>.	
	If the Link Bandwidth is not advertised for a link, the link MUST be
	pruned for the Flex-Algorithm calculations.</t>
	
	<t>4.In ISIS the Link Bandwidth for Flex-Algorithm purposes is advertised as a 
    sub-sub-TLV 9 of the Flex-algorithm specific ASLA sub-TLV.  It is also possible
    to advertise the  link bandwidth or Flex-Algorithm, in sub-TLV 9 of 
   TLV 22/222/23/223/141 [RFC5305], together with the L-Flag set
   in the Flex-Algorithm specific ASLA advertisement. In the absence of both 
   of these advertisements, the bandwidth of  the link is not available
   for Flex-Algorithm purposes.</t>

    </list>

    </t>
  </section>

    <section title='Calculation of Flex-Algorithm paths' anchor='sec-calc'>
     <t> Two new additional rules are added to the existing rules in the
     Flex-Algorithm calculations specified in sec 13 of
     <xref target ='RFC9350'/>.</t>

    <t>
       <list>

       <t>6.  Check if any exclude FAEMB rule is part of the Flex-Algorithm
      definition.  If such exclude rule exists and the link has Maximum Link
      Bandwidth advertised, check if the link bandwidth satisfies the
      FAEMB rule. If the link does not satisfy the FAEMB rule,
      the link MUST be pruned from the Flex-Algorithm computation.</t>
      <t>7.  Check if any exclude FAEMD rule is part of the Flex-Algorithm
      definition.  If such exclude rule exists and the link has
      Min Unidirectional link delay advertised, check if the link delay
      satisfies the FAEMD rule. If the link does not satisfy the FAEMD rule,
      the link MUST be pruned from the Flex-Algorithm computation.</t>
       </list>
    </t>


  </section>
<section anchor='backward_compatibility' title='Backward Compatibility'>
         <t> This extension brings no new backward-compatibility issues.
		 This document defines new FAD constraints in
		 <xref target ='sec_fad_con'/> <xref target ='sec_auto_isis'/> and
		 <xref target ='sec_auto_ospf'/>. As described in  <xref target ='RFC9350'/>,
		 any node that does not understand sub-TLVs in a FAD TLV, stops participation in the 
		 corresponding Flex-Algorithm. The new extensions can be deployed among the nodes that are
		 upgraded to understand the new extensions without affecting the nodes that are not upgraded.
		 This document also defines a new metric advertisement as described in 
		 <xref target ='sec_generic_metric'/>. As per Sec 13 of <xref target ='RFC9350'/>,
		 the links that do not advertise the metric-type specified by the selected FAD, 
		 the link is pruned from Flex-Algorithm calculations. The new metric-types and the 
         Flex-Algorithms using new metric-types can be deployed in the network without affecting	
         existing deployment.	 </t>

</section>
  <section title='Security Considerations' anchor='sec-con'>
    <t>This document inherits security considerations from <xref target ='RFC9350'/>.</t>
  </section>
  
  <section title='Operational Considerations' anchor='sec-ops'>
    <t>Operational consideration defined in <xref target ='RFC9350'/> generally apply to
	the extensions defined in this document as well. This document defines metric-type
	range for user defined metrics. When user-defined metrics are used in an inter-area or
	inter-level network, all the domains should assign same meaning to the particular
	metric-type.</t>
	<t>Before the router goes into maintenance activity, the traffic needs to be diverted away
	   from the router. This is achieved by setting the overload bit or setting link metrics on the
	   router to a high value. In case of Generic Metric, the link metrics can be set to Maximum
	   usable metric for OSPF and ISIS. The traffic will be diverted away from the router to a shorter
	   available path. If there are no alternate paths available, traffic will stay on the router as
	   the links are not removed from Flex-algorithm calculation when they are set to maximum metric as per 
	   <xref target ='RFC9350'/>
	</t>
  </section>
  <section anchor="IANA" title="IANA Considerations">

  <section anchor='igp_metric_type' title='IGP Metric-Type Registry'>
    
	 
	 <t>IGP Metric-type Registry is updated to include another column specifying
	 whether the particular metric-type is allowed in the generic-metric sub-TLV or not.
	 
	 </t>
	 <t>
	 <figure anchor="iana_metric_type" title="IANA IGP Metric-Type Registry">
      <artwork>
     Type Description                 Reference       Allowed in
                                                      generic-metric
     ----------------------------------------------------------------
      0    IGP Metric                  [RFC9350]        No
                                      Section 5.1
      1    Min Unidirectional          [RFC9350]        No
           Link Delay as defined      Section 5.1
           in [RFC8570, 
           Section 4.2],and
           [RFC7471, Section 4.2]                                       
              
      2    Traffic Engineering Default [RFC9350]        No
           Metric as defined in       Section 5.1 
          [RFC5305,Section 3.7], 
          and [RFC3630, Section 2.5.5]                  
      3(TBA) Bandwidth Metric         this document     yes   
     
    128-255(TBA) User defined metric this document     yes      
	    </artwork>
    </figure>
   </t>							

  </section>
    <section anchor='isis_fad' 
	title='IS-IS Sub-Sub-TLVs for Flexible Algorithm Definition Sub-TLV'>
  <t> Type: 6(TBD3)</t>

     <t> Description: IS-IS Exclude Minimum Bandwidth Sub-TLV </t>

     <t>Reference: This document <xref target ='sec_isis_bw_exclusion'/></t>

     <t> Type: 7 (TBD4)</t>

     <t> Description: IS-IS Exclude Maximum Delay Sub-TLV </t>

     <t>Reference: This document <xref target ='sec_isis_delay_exclusion'/></t>

     <t> Type: 8 (TBD7)</t>

     <t> Description: IS-IS Reference Bandwidth Sub-TLV </t>

     <t>Reference: This document <xref target ='sec_isis_auto_ref_bw'/></t>

     <t> Type: 9(TBD8)</t>

     <t> Description: IS-IS Threshold Metric Sub-TLV </t>

     <t>Reference: This document <xref target ='sec_isis_threshold_metric'/></t>

  </section>

      <section anchor='ospf_fad' 
	  title='OSPF Sub-TLVs for Flexible Algorithm Definition Sub-TLV'>
  <t> Type:6  (TBD5)</t>

     <t> Description: OSPF Exclude Minimum Bandwidth Sub-TLV </t>

     <t>Reference: This document <xref target ='sec_ospf_bw_exclusion'/></t>

     <t> Type: 7(TBD6)</t>

     <t> Description: OSPF Exclude Maximum Delay Sub-TLV </t>

     <t>Reference: This document <xref target ='sec_ospf_delay_exclusion'/></t>

     <t> Type:  8(TBD9)</t>

     <t> Description: OSPF Reference Bandwidth Sub-TLV </t>

     <t>Reference: This document <xref target ='sec_ospf_auto_ref_bw'/></t>

     <t> Type: 9 (TBD10)</t>

     <t> Description: OSPF Threshold Metric Sub-TLV </t>

     <t>Reference: This document <xref target ='sec_ospf_threshold_metric'/></t>

  </section>
  <section anchor='isis_gen_metric' 
  title='IS-IS Sub-TLVs for TLVs Advertising Neighbor Information'>
     <t> Type:17 (TBD1)</t>

     <t> Description: Generic metric </t>

     <t>Reference: This document <xref target ='sec_isis_gen_metric'/></t>
	 
	 <t> TLV 22,23,25, 141, 222 and 223 set to Y</t>
</section>
 <section anchor='isis_gen_metric_te_app' 
 title='Sub-sub-TLV Codepoints for Application-Specific Link Attributes'>
   <t> Type: 17 (TBD1)</t>

     <t> Description: Generic metric </t>

     <t>Reference: This document <xref target ='sec_isis_gen_metric'/></t>

</section>

 <section anchor='ospf_gen_metric' title='OSPFv2 Extended Link TLV Sub-TLVs'>
     <t> Type: 25(TBD21)</t>

     <t> Description: Generic metric </t>

     <t>Reference: This document <xref target ='sec_ospf_gen_metric'/></t>
	 
	 <t> L2BM set to Y</t>
</section>

 <section anchor='ospf_gen_metric_te_lsa' 
 title='Types for Sub-TLVs of TE Link TLV (Value 2)'>
     <t> Type: 36 (TBD22)</t>

     <t> Description: Generic metric </t>

     <t> Reference: This document <xref target ='sec_ospf_gen_metric'/></t>
	 
	 

</section>

 <section anchor='ospfv3_gen_metric_te_lsa' title='OSPFv3 Extended-LSA Sub-TLVs'>
     <t> Type: 34 (TBD23)</t>

     <t> Description: Generic metric </t>

     <t> Reference: This document <xref target ='sec_ospf_gen_metric'/></t>
	 
	 <t> L2BM set to Y</t>

</section>

  </section>
   <section title='Acknowledgements' anchor='ack'>
    <t>Many thanks to  Chris Bowers, Krzysztof Szarcowitz, Julian Lucek,
    Ram Santhanakrishnan, Ketan Talaulikar and Acee Lindem
	for discussions and inputs.</t>
  </section>
     <section title='Contributors'>

    <t>1. Salih K A</t>
    <t>Juniper Networks</t>
    <t>salih@juniper.net</t>


  </section>
  
  <section title='APPENDIX' anchor='app'>
  <section title='Updated list of rules for pruning links in Flex-algorithm topology ' anchor='rules'>
  <t>This section lists the entire set of rules to prune links from 
  Flex-Algorithm topology during Flexible-algorithm calculation.
  It includes the original rules defined in Section 13 of <xref target ='RFC9350'/>
  as well as new additions proposed in this document.
  <list>
  <t>For all links in the topology:</t>
	<t>1. Check if any exclude Administrative Group rule is part of the Flex-Algorithm Definition.
    	If such exclude rule exists, check if any color that is part of the exclude rule is also set on the link. 
		If such a color is set, the link MUST be pruned from the computation.</t>
    <t>2. Check if any exclude SRLG rule is part of the Flex-Algorithm Definition. 
	If such exclude rule exists, check if the link is part of any SRLG that is a
	lso part of the SRLG exclude rule. If the link is part of such SRLG,
	the link MUST be pruned from the computation.</t>
	<t>3. Check if any include-any Administrative Group rule is part 
	of the Flex-Algorithm Definition. If such include-any rule exists, 
	check if any color that is part of the include-any rule is also set on the link.
	If no such color is set, the link MUST be pruned from the computation.</t>
	<t>4. Check if any include-all Administrative Group rule is part of the
	Flex-Algorithm Definition. If such include-all rule exists, check if all 
	colors that are part of the include-all rule are also set on the link. 
	If all such colors are not set on the link, the link MUST be pruned from the 
	computation.</t>
	<t>5. If the Flex-Algorithm Definition uses something other than the 
	IGP metric (Section 5 of <xref target ='RFC9350'/>), 
	and such metric is not advertised for the particular 
	link in a topology for which the computation is done, such link MUST be pruned 
	from the computation. A metric of value 0 MUST NOT be assumed in such a case.</t>
	 <t>6.  Check if any exclude FAEMB rule is part of the Flex-Algorithm
      definition.  If such exclude rule exists and the link has Maximum Link
      Bandwidth advertised, check if the link bandwidth satisfies the
      FAEMB rule. If the link does not satisfy the FAEMB rule,
      the link MUST be pruned from the Flex-Algorithm computation.</t>
      <t>7.  Check if any exclude FAEMD rule is part of the Flex-Algorithm
      definition.  If such exclude rule exists and the link has
      Min Unidirectional link delay advertised, check if the link delay
      satisfies the FAEMD rule. If the link does not satisfy the FAEMD rule,
      the link MUST be pruned from the Flex-Algorithm computation.</t>
	  
  </list>
  </t>
  </section>
  </section>
</middle>

<back>
  <references title='Normative References'>


    &RFC2119;
	&RFC8174;
    &RFC5305;
    &RFC3630;
    &RFC7684;
    &RFC9479;
    &RFC9492;
    &RFC8362;
	&RFC9350;
    &RFC9356;
	&RFC5392;
    &RFC5329;
    &RFC8668;
	&RFC1195;
	&RFC2328;
	
	<reference anchor="IEEE754-2019">

   <front>

       <title>IEEE Standard for Floating-Point Arithmetic</title>

       <author>

            <organization>Institute of Electrical and Electronics Engineers</organization>

       </author>

       <date day="22" month="July" year="2019"/>

   </front>

   <seriesInfo name="IEEE" value="754-2019"/>

   <seriesInfo name="DOI" value="10.1109/ieeestd.2019.8766229"/>

   <format type="HTML" target="https://urldefense.com/v3/__https://ieeexplore.ieee.org/document/8766220*22/__;JQ!!NEt6yMaO-gk!AZS2BF83ZQzVu3eQXaoTSVC-43vBgowix_7l2XHbu26asCJ42ZuEv3HqcIgmKHSBL8opFlGvkpFUoXQ0cU_PFdqnfFY$" />

  </reference>

  </references>

   <references title='Informative References'>
    &RFC8570;
    &RFC7471;
    &RFC5311;
    &RFC9346;
    &RFC5120;
	&RFC5715;
	&RFC4655;


   <?rfc include="reference.I-D.bashandy-rtgwg-segment-routing-uloop"?>

  </references>
 </back>
</rfc>
