<?xml version="1.0" encoding="US-ASCII"?>
<!DOCTYPE rfc SYSTEM "rfc2629.dtd" [
<!ENTITY RFC2119 PUBLIC "" "http://xml.resource.org/public/rfc/bibxml/reference.RFC.2119.xml">
<!ENTITY RFC8174 PUBLIC "" "http://xml.resource.org/public/rfc/bibxml/reference.RFC.8174.xml">
<!ENTITY RFC7684 PUBLIC "" "http://xml.resource.org/public/rfc/bibxml/reference.RFC.7684.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 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 RFC5305 PUBLIC "" "http://xml.resource.org/public/rfc/bibxml/reference.RFC.5305.xml">
<!ENTITY RFC9350 PUBLIC "" "http://xml.resource.org/public/rfc/bibxml/reference.RFC.9350.xml">
<!ENTITY RFC5357 PUBLIC "" "http://xml.resource.org/public/rfc/bibxml/reference.RFC.5357.xml">
<!ENTITY RFC8762 PUBLIC "" "http://xml.resource.org/public/rfc/bibxml/reference.RFC.8762.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-wang-lsr-flex-algo-link-loss-01"
     ipr="trust200902">
  <front>
    <title abbrev="IGP Flex-Algorithm with Link Loss">IGP Flexible Algorithm with Link Loss</title>
	
	<author fullname="Yifan Wang" initials="Y." surname="Wang">
      <organization>Huawei</organization>

      <address>
        <postal>
          <street>Huawei Bld., No. 156 Beiqing Rd.</street>

          <city>Beijing</city>

          <code>100095</code>

          <country>China</country>
        </postal>

        <email>wangyifan82@huawei.com</email>
      </address>
    </author>

    <author fullname="Guoqi Xu" initials="G." surname="Xu">
      <organization>Huawei</organization>

      <address>
        <postal>
          <street>Huawei Bld., No.156 Beiqing Rd.</street>

          <city>Beijing</city>

          <code>100095</code>

          <country>China</country>
        </postal>

        <email>xuguoqi@huawei.com</email>
      </address>
    </author>
	
	<author fullname="Xuesong Geng" initials="X." surname="Geng">
      <organization>Huawei</organization>

      <address>
        <postal>
          <street>Huawei Bld., No. 156 Beiqing Rd.</street>

          <city>Beijing</city>

          <code>100095</code>

          <country>China</country>
        </postal>

        <email>gengxuesong@huawei.com</email>
      </address>
    </author>
	
	<author fullname="Jie Dong" initials="J." surname="Dong">
      <organization>Huawei</organization>

      <address>
        <postal>
          <street>Huawei Bld., No. 156 Beiqing Rd.</street>

          <city>Beijing</city>

          <code>100095</code>

          <country>China</country>
        </postal>

        <email>jie.dong@huawei.com</email>
      </address>
    </author>

    <date day="20" month="February" year="2024"/>

    <abstract>
      <t>IGP Flexible Algorithms allow IGPs to compute constraint-based paths. 
   Since link packet loss rate plays an important role in network evaluation, 
   links with high packet loss rate should be bypassed during forwarding.
   This draft proposes a path computation method based on a maximum link loss constraint to prune unsatisfied links in Flexible Algorithms.</t>
    </abstract>

    <note title="Requirements Language">
      <t>The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
      "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this
      document are to be interpreted as described in BCP 14 [RFC2119]
      [RFC8174] when, and only when, they appear in all capitals, as shown
      here.</t>
    </note>
  </front>

  <middle>
    <section title="Introduction">
      <t>Link packet loss rate (link loss) is a measure of the percentage of data packets that are lost during transmission over a network. 
   It is an important performance metric that directly impacts the quality of service, network congestion, security, and overall network efficiency.
   Ensuring a low packet loss rate is essential for maintaining efficient and secure network operations. 
   Consequently, It is necessary to avoid passing through links with a high packet loss rate during forwarding.</t>

      <t>The link loss is advertised by the Unidirectional Link Loss Sub-TLV defined in <xref target ='RFC8570'/> by IS-IS and <xref target ='RFC7471'/> by OSPF, 
	  which describes the loss (as a packet percentage) between two directly connected IS-IS neighbors.
   This Sub-TLV is carried in the Application-Specific Link Attributes Sub-TLV advertised by IS-IS <xref target ='RFC9479'/> or OSPF <xref target ='RFC9492'/>. 
   The link packet loss rate can be measured by methods such as TWAMP <xref target ='RFC5357'/> and STAMP <xref target ='RFC8762'/>, which is beyond the scope of this draft.</t>

      <t>IGP Flexible Algorithms allow IGPs to compute constraint-based paths <xref target ='RFC9350'/>. 
   Current path computation methods are based on calculating the minimum cost of the path from the source to the destination.
   Flex-Algorithm has already supported path computation with the IGP cost, the minimum link delay and the traffic-engineering metric. 
   <xref target ='I-D.ietf-lsr-flex-algo-bw-con'/> defines a family of generic metrics (e.g. bandwidth based metric type) and bandwidth related constraints to support path computation based on bandwidth.
   However, current calculation types and metric types cannot support path computation based on link loss, 
   since the cost of the path should be defined as the maximum/minimum value among all passing links.</t>
	
	  <t>To overcome the above issue, there are two solutions.  First, new
   operators like maximum value operator can be defined, which works as
   a step function.  When the link loss exceeds a threshold, the cost of
   the link is set to the maximum.  Second, new Flexible Algorithm
   Definition (FAD) constraints can be defined to exclude links that do
   not meet the link loss requirements during path calculation.  The
   second method is specifically demonstrated in this draft.  The
   general ideas are as below.</t>
   
   <t>
	<list>
	<t> 1. The link loss is used as a link constraint for path computation. That is, the link whose loss rate is greater than the specified value is excluded.</t>
	<t> 2. Metric-type remains unchanged: igp, te, and delay. </t>
	</list>
	</t>

      <t>With a new FAD constraint Sub-TLV advertised by IGP, links with low packet loss rate will be selected for path computation.
   The new Exclude Maximum Link Loss Sub-TLVs are defined in Section 2. The Flex-Algorithm calculation method based on link loss is presented in Section 3.</t>
    </section>

    <section title="Exclude Maximum Link Loss Sub-TLV">
      <t>A new Exclude Maximum Link Loss Sub-TLV is defined as a sub-TLV of the FAD TLV. To guarantee loop free forwarding, all routers that participate in a Flex-Algorithm MUST agree on the FAD.
   Selected nodes within the IGP domain MUST advertise FADs as described in Sections 5, 6, and 7 of <xref target ='RFC9350'/>.</t>

      <t>The Exclude Maximum Link Loss Sub-TLV is proposed to specify the upper limit of the link loss. 
   When this Sub-TLV is carried in a FAD TLV, all links with packet loss rate larger than the defined maximum link loss value will be excluded from the Flex-Algorithm topology.</t>

      <section title="IS-IS Exclude Maximum Link Loss Sub-TLV">
        <t>IS-IS Flex-Algorithm Exclude Maximum Link Loss Sub-TLV (FAEML) is a
   sub-TLV of the IS-IS FAD sub-TLV.  It has the following format:

<figure suppress-title="false"
            title="IS-IS FAEML 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 Loss                  |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

      Type: 252(TBA)
	  
      Length: 3 octets

      Max Link Loss:  This 24-bit field carries link packet loss as a
    percentage of the total traffic sent over a configurable interval.
    The basic unit is 0.000003%, where (2^24 - 2) is 50.331642%. This
    value is the highest packet-loss percentage that can be expressed.  
    Therefore, measured values that are larger than the field maximum 
    SHOULD be encoded as the maximum value.
</artwork>
</figure></t>
		
		<t>The FAEML 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 maximum link loss advertised in FAEML Sub-TLV MUST be compared
   with the link loss advertised in Sub-Sub-TLV 36 <xref target ='RFC8570'/> of ASLA Sub-
   TLV <xref target ='RFC9479'/>. If L-Flag is set in the ASLA sub-TLV, the maximum link loss
   advertised in FAEML sub-TLV MUST be compared with the link loss 
   advertised by the sub-TLV 36 of the TLV
   22/222/23/223/141 <xref target ='RFC5305'/> as defined in <xref target ='RFC9479'/> Section 4.2.</t>
   
		<t>If the link loss is larger than the maximum link loss advertised in FAEML sub-TLV, 
   the link MUST be excluded from the Flex-Algorithm topology. If a link does not have the link loss
   advertised but the FAD contains the FAEML sub-TLV, then
   it MUST NOT be excluded from the Flex-Algorithm topology.</t>

      </section>

      <section title="OSPF Exclude Maximum Link Loss Sub-TLV">
        <t>OSPF Flex-Algorithm Exclude Maximum Link Loss Sub-TLV (FAEML) is a
   sub-TLV of the OSPF FAD sub-TLV.  It has the following format:

<figure suppress-title="false"
            title="OSPF FAEML 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 Loss                  |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
	   
      Type: 252(TBA)
		  
      Length: 3 octets
		  
      Max Link Loss:  This 24-bit field carries link packet loss as a
    percentage of the total traffic sent over a configurable interval.
    The basic unit is 0.000003%, where (2^24 - 2) is 50.331642%. This
    value is the highest packet-loss percentage that can be expressed.  
    Therefore, measured values that are larger than the field maximum 
    SHOULD be encoded as the maximum value.
		</artwork>
          </figure></t>
		
		<t>The FAEML 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 maximum link loss advertised in FAEML Sub-TLV MUST be compared
   with the link loss advertised in Sub-Sub-TLV 30 <xref target ='RFC7471'/> of ASLA Sub-
   TLV <xref target ='RFC9492'/>. The ASLA Sub-TLV is advertised in Extended Link Opaque LSAs <xref target ='RFC7684'/> for OSPFv2
   and E-Router-LSAs <xref target ='RFC8362'/> for OSPFv3.</t>
   
		<t>If the link loss is larger than the maximum link loss advertised in FAEML sub-TLV, 
   the link MUST be excluded from the Flex-Algorithm topology. If a link does not have the link loss
   advertised but the FAD contains the FAEML sub-TLV, then
   it MUST NOT be excluded from the Flex-Algorithm topology.</t>

      </section>
    </section>

    <section title="Calculation of Flexible Algorithm Paths">
      <t>A new rule is added to the rules used to prune links
   from the topology during the Flex-Algorithm computation in Section 13 of <xref target ='RFC9350'/>.</t>

	<t>
	<list>
	<t>1. Check if any exclude FAEML rule is part of the Flex-Algorithm
      definition. If such exclude rule exists and the link has link 
	  loss advertised, check if the link satisfies the FAEML rule. 
	  If not, the link MUST be pruned from the computation.</t>
	</list>
	</t>

    </section>

    <section anchor="IANA" title="IANA Considerations">
	  <section title="IS-IS Sub-Sub-TLVs for Flexible Algorithm Definition Sub-TLV">
		<t>Type: 252(TBA)</t>
		
		<t>Description: IS-IS Exclude Maximum Link Loss Sub-TLV</t>
		
		<t>Reference: This document Section 2.1</t>
	  
	  </section>
	  
	  <section title="OSPF Sub-Sub-TLVs for Flexible Algorithm Definition Sub-TLV">
		<t>Type: 252(TBA)</t>
		
		<t>Description: OSPF Exclude Maximum Link Loss Sub-TLV</t>
		
		<t>Reference: This document Section 2.2</t>
	  
	  </section>

    </section>
  </middle>

  <back>
    <references title="Normative References">
      &RFC2119;
	  &RFC8174;
      &RFC7684;
      &RFC9479;
      &RFC9492;
      &RFC8362;
	  &RFC5305;
	  &RFC9350;
	  
    </references>

    <references title="Informative References">
      &RFC8570;
	  &RFC7471;
	  &RFC5357;
	  &RFC8762;
      
	  <?rfc include="reference.I-D.ietf-lsr-flex-algo-bw-con"?>
	  
    </references>
  </back>
</rfc>
