<?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" docName="draft-ietf-lsr-igp-flex-algo-reverse-affinity-02" ipr="trust200902">
  <front>
    <title abbrev="Flex-Algorithm Reverse Affinity">IGP Flexible Algorithms Reverse Affinity Constraint</title>

    
    <author fullname="Peter Psenak" initials="P." surname="Psenak">
      <organization>Cisco Systems</organization>

      <address>
        <postal>
          <street>Apollo Business Center</street>
          <street>Mlynske nivy 43</street>

          <city>Bratislava</city>

          <code>82109</code>

          <country>Slovakia</country>
        </postal>

        <email>ppsenak@cisco.com</email>
      </address>
    </author>
    
    <author fullname="Jakub Horn" initials="J." surname="Horn">
      <organization>Cisco Systems</organization>

      <address>
        <postal>
          <street></street>

          <city>Milpitas</city>

          <code>95035</code>

          <region>CA</region>

          <country>USA</country>
        </postal>

        <email>jakuhorn@cisco.com</email>
      </address>
    </author>
    
    <author fullname="Amit Dhamija" initials="A" surname="Dhamija">
      <organization>Rakuten</organization>

      <address>
        <postal>
          <street/>
        </postal>

        <email>amit.dhamija@rakuten.com</email>
      </address>
    </author>
  

    <date/>
    
    
    <area>Routing Area</area>

    <workgroup>LSR Working Group</workgroup>

    <keyword>IGP</keyword>

    <keyword>Draft</keyword>

    <abstract>
    
      <t>An IGP Flexible Algorithm (Flex-Algorithm) allows IGPs to compute
      constraint-based paths.</t>

      <t>This document extends IGP Flex-Algorithm with additional constraints.</t>
      
    </abstract>
  </front>

  <middle>
    <section title="Introduction">
      <t>An IGP Flex-Algorithm as specified in <xref target="RFC9350"/> 
      computes a constraint-based path.</t>
      
      <t>This document extends IGP Flex-Algorithm with additional constraints.</t>

    </section>

    <section anchor="ReqLang" 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 <xref
      target="RFC2119">BCP 14</xref> <xref target="RFC8174"/> when, and only
      when, they appear in all capitals, as shown here.</t>
    </section>

    <section title="Use Case Example">
       
      <t>The Flexible Algorithm definition can specify 'colors' that are
      used by the operator to include or exclude links during the Flex-Algorithm path
      computation. These link 'colors' are checked in the forwarding direction of the 
      SPF computation - e.g. in the direction from the parent to the child.</t>
        
      <t>In some cases, it is beneficial to check the 'colors' of the link from the 
      reverse direction of the traffic flow. For example, on a point-to-point link between
      endpoints A and B and for the traffic flowing in a direction from A to B, the input 
      errors can only be detected at node B. An operator may measure the rate of such 
      input errors and set certain 'color' on a link locally on node B when the input 
      error rate crosses a certain threshold. When Flex-Algorithm calculation processes the 
      link A to B, it may look at the 'colors' of the link in the reverse direction, e.g.,
      link  B to A. This would allow the operator to exclude such link from the 
      Flex-Algorithm topology.</t>
      
    </section>

    <section anchor="ISISFLEXALGEXLTLV"
               title="IS-IS Flexible Algorithm Exclude Reverse Admin Group Sub-TLV">
        
        <t>The IS-IS Flexible Algorithm Exclude Reverse Admin Group (FAERAG) Sub-TLV 
        is used to advertise the exclude rule that is used during the 
        Flex-Algorithm path calculation as specified in <xref target="FLEXALGPATHCALC"/>.
        </t>

        <t>The IS-IS FAERAG Sub-TLV is a Sub-TLV of the IS-IS FAD Sub-TLV. It has the 
        following format: 
        <figure>
            <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     |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                      Extended Admin Group                     |
+-                                                             -+
|                            ...                                |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
where:
    ]]></artwork>
          </figure> <list style="hanging">
            <t>Type: 10</t>

            <t>Length: variable, dependent on the size of the Extended Admin
            Group. MUST be a multiple of 4 octets.</t>

            <t>Extended Administrative Group: Extended Administrative Group as
            defined in <xref target="RFC7308"/>.</t>
          </list></t>

        <t>The IS-IS FAERAG Sub-TLV MUST NOT appear more than once in a single 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>The IS-IS FAERAG Sub-TLV MUST NOT appear more than once in the set of FAD 
        sub-TLVs for a given Flex-Algorithm from a given IS. If it appears more than once 
        in such set, the IS-IS FAERAG Sub-TLV in the first occurrence in the lowest numbered 
        LSP from a given IS MUST be used and any other occurrences MUST be ignored.</t>
    
      </section>
      
      
      
      <section anchor="ISISFLEXALGINCANYTLV"
               title="IS-IS Flexible Algorithm Include-Any Reverse Admin Group Sub-TLV">
       
        <t>The IS-IS Flexible Algorithm Include-Any Reverse Admin Group Sub-TLV 
        is used to advertise include-any rule that is used during the Flex-Algorithm
        path calculation as specified in <xref target="FLEXALGPATHCALC"/>.</t>

        <t>The format of the IS-IS Flexible Algorithm Include-Any Reverse Admin Group
        Sub-TLV is identical to the format of the FAERAG Sub-TLV in 
        <xref target="ISISFLEXALGEXLTLV"/>.</t>

        <t>The IS-IS Flexible Algorithm Include-Any Reverse Admin Group Sub-TLV Type is 11.</t>

        <t>The IS-IS Flexible Algorithm Include-Any Reverse Admin Group Sub-TLV MUST NOT 
        appear more than once in a single 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>The IS-IS Flexible Algorithm Include-Any Reverse Admin Group Sub-TLV MUST NOT 
        appear more than once in the set of FAD sub-TLVs for a given Flex-Algorithm from
        a given IS. If it appears more than once in such set, the IS-IS Flexible Algorithm
        Include-Any Reverse Admin Group Sub-TLV in the first occurrence in the lowest numbered 
        LSP from a given IS MUST be used and any other occurrences MUST be ignored.</t>
        
      </section>

      <section anchor="ISISFLEXALGINCALLTLV"
               title="IS-IS Flexible Algorithm Include-All Reverse Admin Group Sub-TLV">
        	
	    <t>The IS-IS Flexible Algorithm Include-All Reverse Admin Group Sub-TLV 
        is used to advertise include-any rule that is used during the Flex-Algorithm
        path calculation as specified in <xref target="FLEXALGPATHCALC"/>.</t>

        <t>The format of the IS-IS Flexible Algorithm Include-All Reverse Admin Group
        Sub-TLV is identical to the format of the FAERAG Sub-TLV in
         <xref target="ISISFLEXALGEXLTLV"/>.</t>

        <t>The IS-IS  Flexible Algorithm Include-All Reverse Admin Group Sub-TLV Type is 12.</t>

        <t>The IS-IS Flexible Algorithm Include-All Reverse Admin Group Sub-TLV MUST NOT 
        appear more than once in a single 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>The IS-IS Flexible Algorithm Include-All Reverse Admin Group Sub-TLV MUST NOT 
        appear more than once in the set of FAD sub-TLVs for a given Flex-Algorithm from 
        a given IS. If it appears more than once in such set, the IS-IS Flexible Algorithm 
        Include-All Reverse Admin Group Sub-TLV in the first occurrence in the lowest numbered 
        LSP from a given IS MUST be used and any other occurrences MUST be ignored.</t>
                
      </section>
      
      
      
      <section anchor="OSPFFLEXALGEXLTLV"
               title="OSPF Flexible Algorithm Exclude Reverse Admin Group Sub-TLV">
        
        <t>The OSPF Flexible Algorithm Exclude Reverse Admin Group (FAERAG) Sub-TLV 
        is used to advertise the exclude rule that is used during the 
        Flex-Algorithm path calculation as specified in <xref target="FLEXALGPATHCALC"/>.
        </t>
        
        <t>The OSPF FAERAG Sub-TLV is a Sub-TLV of the OSPF FAD TLV. It has the 
        following format: <figure>
            <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            |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                      Extended Admin Group                     |
+-                                                             -+
|                            ...                                |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
where:
    ]]></artwork>
          </figure> <list style="hanging">
            <t>Type: 10</t>

            <t>Length: variable, dependent on the size of the Extended Admin
            Group. MUST be a multiple of 4 octets.</t>

            <t>Extended Administrative Group: Extended Administrative Group as
            defined in <xref target="RFC7308"/>.</t>
          </list></t>

        <t>The OSPF FAERAG 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.</t>
      </section>

      <section anchor="OSPFFLEXALGINCANYTLV"
               title="OSPF Flexible Algorithm Include-Any Reverse Admin Group Sub-TLV">
        <t>The usage of this Sub-TLVs is described in <xref
        target="ISISFLEXALGINCANYTLV"/>.</t>

        <t>The format of the OSPF Flexible Algorithm Include-Any Reverse Admin Group
        Sub-TLV is identical to the format of the OSPF FAERAG Sub-TLV in <xref
        target="OSPFFLEXALGEXLTLV"/>.</t>

        <t>The OSPF Flexible Algorithm Include-Any Reverse Admin Group Sub-TLV Type is
        11.</t>

        <t>The OSPF Flexible Algorithm Include-Any Reverse Admin Group 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.</t>
      </section>

      <section anchor="OSPFFLEXALGINCALLTLV"
               title="OSPF Flexible Algorithm Include-All Reverse Admin Group Sub-TLV">
        <t>The usage of this Sub-TLVs is described in <xref
        target="ISISFLEXALGINCALLTLV"/>.</t>

        <t>The format of the OSPF Flexible Algorithm Include-All Reverse Admin Group
        Sub-TLV is identical to the format of the OSPF FAERAG Sub-TLV in <xref
        target="OSPFFLEXALGEXLTLV"/>.</t>

        <t>The OSPF Flexible Algorithm Include-All Reverse Admin Group Sub-TLV Type is
        12.</t>

        <t>The OSPF Flexible Algorithm Include-All Reverse Admin Group 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.</t>
      </section>
      
      
      
      <section anchor="FLEXALGPATHCALC"
             title="Calculation of Flexible Algorithm Paths">
             
       <t>Three new rules are added to the existing rules specified in sec 13 
        of <xref target="RFC9350"/>.
       
       <list style="hanging">
       
          <t>6. Check if any exclude reverse AG 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 from the reverse direction. 
          If such a color is set on the link from the reverse direction, the link MUST 
          be pruned from the computation.</t>

          <t>7. Check if any include-any reverse AG 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 from the reverse 
          direction. If no such color is set on the link from the reverse direction, 
          the link MUST be pruned from the computation.</t>

          <t>8. Check if any include-all reverse AG 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 from the reverse
          direction. If all such colors are not set on the link from the reverse direction,
          the link MUST be pruned from the computation.</t>
          
          </list></t>
          
        </section>  
      

    <section anchor="IANA" title="IANA Considerations">
      
      <section anchor="SUBTLVREGISTRY"
                 title="Sub-Sub-TLVs for Flexible Algorithm Definition Sub-TLV">
          
          <t>This document defines the following Sub-Sub-TLVs in the
          "ISIS Sub-Sub-TLVs for Flexible Algorithm Definition Sub-TLV" registry:
            <list style="hanging">
              <t>Type: 10</t>

              <t>Description: Flexible Algorithm Exclude Reverse Admin Group</t>

              <t>Reference: This document (<xref
              target="ISISFLEXALGEXLTLV"/>).</t>
            </list> 
            <list style="hanging">
              <t>Type: 11</t>

              <t>Description: Flexible Algorithm Include-Any Reverse Admin Group</t>

              <t>Reference: This document (<xref
              target="ISISFLEXALGINCANYTLV"/>).</t>
            </list> 
            <list style="hanging">
              <t>Type: 12</t>

              <t>Description: Flexible Algorithm Include-All Reverse Admin Group</t>

              <t>Reference: This document (<xref
              target="ISISFLEXALGINCALLTLV"/>).</t>
            </list></t>
            
        </section>
        
       <section title="OSPF Flexible Algorithm Definition TLV Sub-TLV Registry">
        <t>This document registers following Sub-TLVs in the "OSPF TLVs for
          Flexible Algorithm Definition TLV" registry: <list style="hanging">
              <t>Type: 10</t>

              <t>Description: Flexible Algorithm Exclude Reverse Admin Group</t>

              <t>Reference: This document (<xref
              target="OSPFFLEXALGEXLTLV"/>).</t>
            </list> <list style="hanging">
              <t>Type: 11</t>

              <t>Description: Flexible Algorithm Include-Any Reverse Admin Group</t>

              <t>Reference: This document (<xref
              target="OSPFFLEXALGINCANYTLV"/>).</t>
            </list> <list style="hanging">
              <t>Type: 12</t>	

              <t>Description: Flexible Algorithm Include-All ReverseAdmin Group</t>

              <t>Reference: This document (<xref
              target="OSPFFLEXALGINCALLTLV"/>).</t>
            </list></t>
            
          </section>    
   
    </section>

    <section anchor="Security" title="Security Considerations">
      <t>This document inherits security considerations from <xref
      target="RFC9350"/>.</t>
    </section>

    <section anchor="Acknowledgements" title="Acknowledgements">
      <t>TBD</t>
    </section>
  </middle>

  <back>
    <references title="Normative References">
      

      <?rfc include='reference.RFC.2119'?>

      <?rfc include='reference.RFC.8174'?>
      
      <?rfc include='reference.RFC.7308'?>
      
      <?rfc include='reference.RFC.9350'?>
      
      <?rfc include='reference.I-D.ietf-lsr-flex-algo-bw-con'?>

    </references>
  </back>
</rfc>
