<?xml version="1.0" encoding="UTF-8"?>

<!DOCTYPE rfc [
  <!ENTITY nbsp    "&#160;">
  <!ENTITY zwsp   "&#8203;">
  <!ENTITY nbhy   "&#8209;">
  <!ENTITY wj     "&#8288;">
]>

<rfc xmlns:xi="http://www.w3.org/2001/XInclude" submissionType="IETF" category="std" consensus="true" docName="draft-ietf-lsr-ip-flexalgo-16" number="0000" ipr="trust200902" tocInclude="true" tocDepth="3" symRefs="true" sortRefs="true" updates="" obsoletes="" xml:lang="en" version="3">

  <front>
    <title abbrev="IP Flex-Algorithm">IGP Flexible Algorithms (Flex-Algorithm)
    In IP Networks</title>
    <seriesInfo name="RFC" value="0000"/>
    <author fullname="William Britto" initials="W." surname="Britto">
      <organization>Juniper Networks</organization>
      <address>
        <postal>
          <street>Elnath-Exora Business Park Survey</street>
          <city>Bangalore</city>
          <region>Karnataka</region>
          <code>560103</code>
          <country>India</country>
        </postal>
        <email>bwilliam@juniper.net</email>
      </address>
    </author>
    <author fullname="Shraddha Hegde" initials="S." surname="Hegde">
      <organization>Juniper Networks</organization>
      <address>
        <postal>
          <street>Elnath-Exora Business Park Survey</street>
          <city>Bangalore</city>
          <region>Karnataka</region>
          <code>560103</code>
          <country>India</country>
        </postal>
        <email>shraddha@juniper.net</email>
      </address>
    </author>
    <author fullname="Parag Kaneriya " initials="P." surname="Kaneriya">
      <organization>Juniper Networks</organization>
      <address>
        <postal>
          <street>Elnath-Exora Business Park Survey</street>
          <city>Bangalore</city>
          <region>Karnataka</region>
          <code>560103</code>
          <country>India</country>
        </postal>
        <email>pkaneria@juniper.net</email>
      </address>
    </author>
    <author fullname="Rejesh Shetty" initials="R." surname="Shetty">
      <organization>Juniper Networks</organization>
      <address>
        <postal>
          <street>Elnath-Exora Business Park Survey</street>
          <city>Bangalore</city>
          <region>Karnataka</region>
          <code>560103</code>
          <country>India</country>
        </postal>
        <email>mrajesh@juniper.net</email>
      </address>
    </author>
    <author fullname="Ron Bonica" initials="R." surname="Bonica">
      <organization>Juniper Networks</organization>
      <address>
        <postal>
          <street>2251 Corporate Park Drive</street>
          <city>Herndon</city>
          <code>20171</code>
          <region>Virginia</region>
          <country>USA</country>
        </postal>
        <email>rbonica@juniper.net</email>
      </address>
    </author>
    <author fullname="Peter Psenak" initials="P." surname="Psenak">
      <organization>Cisco Systems</organization>
      <address>
        <postal>
          <extaddr>Apollo Business Center</extaddr>
          <street>Mlynske nivy 43</street>
          <city>Bratislava</city>
          <code>82109</code>
          <country>Slovakia</country>
        </postal>
        <email>ppsenak@cisco.com</email>
      </address>
    </author>
    <date year="2023" month="July"/>
    <area>rtg</area>
    <workgroup>lsr</workgroup>
    <keyword>IS-IS</keyword>
    <abstract>
      <t>This document extends IGP Flex-Algorithm, so that it can be used with
      regular IPv4 and IPv6 forwarding.</t>
    </abstract>
  </front>
  <middle>
    <section>
      <name>Introduction</name>
      <t>An IGP Flexible Algorithm (Flex-Algorithm) allows IGPs to compute
      constraint-based paths. The base IGP Flex-Algorithm specification
      describes how it is used with Segment Routing (SR) data planes - SR MPLS and 
      SRv6.</t>
      <t>An IGP Flex-Algorithm as specified in <xref target="RFC9350"/> computes a constraint-based path to:
      </t>
      <ul spacing="normal">
        <li>All Flex-Algorithm specific Prefix Segment Identifiers (SIDs)
          <xref target="RFC8402"/>.</li>
        <li>All Flex-Algorithm specific SRv6 Locators <xref target="RFC8986"/>.</li>
      </ul>
      <t>Therefore, Flex-Algorithm cannot be deployed in the absence of
      SR or SRv6.</t>
      <t>This document extends Flex-Algorithm, allowing it to compute paths
      to IPv4 and IPv6 prefixes.</t>
    </section>
    <section anchor="ReqLang">
      <name>Requirements Language</name>
        <t> The key words "<bcp14>MUST</bcp14>", "<bcp14>MUST NOT</bcp14>",
        "<bcp14>REQUIRED</bcp14>", "<bcp14>SHALL</bcp14>", "<bcp14>SHALL
        NOT</bcp14>", "<bcp14>SHOULD</bcp14>", "<bcp14>SHOULD NOT</bcp14>",
        "<bcp14>RECOMMENDED</bcp14>", "<bcp14>NOT RECOMMENDED</bcp14>",
        "<bcp14>MAY</bcp14>", and "<bcp14>OPTIONAL</bcp14>" in this document
        are to be interpreted as described in BCP&nbsp;14 <xref
        target="RFC2119"/> <xref target="RFC8174"/> when, and only when, they
        appear in all capitals, as shown here.
        </t>
    </section>
    <section>
      <name>Use Case Example</name>
      <t>In this subsection, we illustrate one use case that motivates this
      specification: if a specific service can be identified by an IP
      address, traffic to it can use constraint-based paths computed
      according to this specification.</t>
      <t> The System Architecture for the 5G System <xref target="TS.23.501-3GPP"/>
	  describes the N3 interface between gNodeB and UPF (User Plane Function).</t>
      <t>Mobile networks are becoming more and more IP centric. Each end-user session from 
      a gNodeB can be destined to a specific UPFs (User Plane Function) based on the 
      session requirements. For example, some sessions require high bandwidth, others 
      need to be routed along the lowest latency path. Each UPF is assigned a unique 
      IP address. As a result, traffic for different sessions is destined to a different 
      destination IP address.</t>
      <t>The IP address allocated to the UPF can be associated with an algorithm. The mobile 
      user traffic is then forwarded along the path based on the algorithm-specific 
      metric and constraints. As a result, traffic can be sent over a path that is optimized
      for minimal latency or highest bandwidth. This mechanism is used to achieve SLA 
      (Service Level Agreement) appropriate for a user session.</t>
    </section>
    <section>
      <name>Advertising Flex-Algorithm Definitions (FAD)</name>
      <t>To guarantee loop-free forwarding, all routers that participate in a
      Flex-Algorithm <bcp14>MUST</bcp14> agree on the Flex-Algorithm Definition (FAD).</t>
      <t>Selected nodes within the IGP domain <bcp14>MUST</bcp14> advertise
      FADs as described in Sections <xref target="RFC9350" section="5"
      sectionFormat="bare"/>, <xref target="RFC9350" section="6"
      sectionFormat="bare"/>, and <xref target="RFC9350" section="7"
      sectionFormat="bare"/> of <xref target="RFC9350"/>.</t>
    </section>
    <section anchor="PARTICIPATION">
      <name>Advertising IP Flex-Algorithm Participation</name>
      <t>A node may use various algorithms when calculating paths to nodes and
      prefixes. Algorithm values are defined in the <xref target="IANA-ALG">IGP Algorithm Type Registry </xref>.</t>
      <t>Only a node that is participating in a Flex-Algorithm is:</t>
      <ul spacing="normal">
        <li>Able to compute a path for such Flex-Algorithm</li>
        <li>Part of the topology for such Flex-Algorithm</li>
      </ul>
      <t>Flex-Algorithm participation <bcp14>MUST</bcp14> be advertised for each
      Flex-Algorithm data-plane independently, as specified in 
      <xref target="RFC9350"/>. Using Flex-Algorithm for
      regular IPv4 and IPv6 prefixes represents an independent Flex-Algorithm
      data-plane, and as such, the Flex-Algorithm participation for the IP Flex-Algorithm
      data-plane <bcp14>MUST</bcp14> be signalled independently of any other Flex-Algorithm 
      data-plane (e.g., SR).</t>
      <t>All routers in an IGP domain participate in default algorithm 0.
	  Advertisement of participation in IP Flex-Algorithm does not impact 
      the router participation in default algorithm 0.
      </t>
      <t>Advertisement of participation in IP Flex-Algorithm does not impact 
      the router participation signaled for other data-planes. For example,
	  it is possible that a router participates in a particular flex-algo
	  for the IP data-plane but does not participate in the 
	  same flex-algo for the SR data-plane.</t>
      <t>The following sections describe how the IP Flex-Algorithm participation
      is advertised in IGP protocols.</t>
      <section anchor="IS-IS-ALG_TLV">
        <name>The IS-IS IP Algorithm Sub-TLV</name>
        <t>The IS-IS <xref target="ISO10589"/> IP Algorithm Sub-TLV is a sub-TLV of the 
        IS-IS Router Capability TLV <xref target="RFC7981"/> and has the following format:
        </t>
        <figure anchor="ISISAlg" align="center">
          <name>IS-IS IP Algorithm Sub-TLV</name>
          <artwork align="center"><![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    |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Algorithm 1   |  Algorithm 2  | Algorithm ... |  Algorithm n  |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
]]></artwork>
        </figure>
        <dl spacing="normal" newline="false">
          <dt>Type (1 octet):</dt> <dd>IP Algorithm Sub-TLV (Value 29)</dd>
          <dt>Length (1 octet):</dt> <dd>Variable</dd>
          <dt>Algorithm (1 octet):</dt> <dd>Value from 128 to 255.</dd>
        </dl>
        <t>The IP Algorithm Sub-TLV <bcp14>MUST</bcp14> be propagated
        throughout the level and <bcp14>MUST NOT</bcp14> be advertised across
        level boundaries. Therefore, the S bit in the Router Capability TLV,
        in which the IP Algorithm Sub-TLV is advertised, <bcp14>MUST
        NOT</bcp14> be set.</t>
        <t>The IP Algorithm Sub-TLV is optional. It <bcp14>MUST NOT</bcp14> be
        advertised more than once at a given level. A router receiving
        multiple IP Algorithm sub-TLVs from the same originator
        <bcp14>MUST</bcp14> select the first advertisement in the
        lowest-numbered LSP and subsequent instances of the IP Algorithm
        Sub-TLV <bcp14>MUST</bcp14> be ignored.</t>
        <t>Algorithms outside the Flex-Algorithm range (128-255) <bcp14>MUST</bcp14> be ignored 
        by the receiver. This situation <bcp14>SHOULD</bcp14> be logged as an error.</t>
        <t>The IP Flex-Algorithm participation advertised in the IS-IS IP Algorithm
        Sub-TLV is topology independent. When a router advertises
        participation in the IS-IS IP Algorithm Sub-TLV, the participation applies
        to all topologies in which the advertising node participates.</t>
      </section>
      <section anchor="OSPF-ALG_TLV">
        <name>The OSPF IP Algorithm TLV</name>
        <t>The OSPF <xref target="RFC2328"/> IP Algorithm TLV is a top-level TLV of the 
        <xref target="RFC7770"> Router Information Opaque LSA</xref> and has the
        following format: </t>
        <figure anchor="OSPFAlg" align="center">
          <name>OSPF IP Algorithm TLV</name>
          <artwork align="center"><![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            |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|   Algorithm 1 | Algorithm...  |   Algorithm n |               |
+-                                                             -+
|                                                               |
+                                                               +
]]></artwork>
        </figure>
        <dl spacing="normal" newline="false">
          <dt>Type (2 octets):</dt> <dd>IP Algorithm TLV (Value TBD1 by
          IANA)</dd>
          <dt>Length( 2 octets):</dt> <dd>Variable</dd>
          <dt>Algorithm (1 octet):</dt> <dd>Value from 128 to 255.</dd>
        </dl>
        <t>The IP Algorithm TLV is optional. It <bcp14>MUST</bcp14> only be
        advertised once in the Router Information LSA.</t>
        <t>Algorithms outside the Flex-Algorithm range (128-255)
        <bcp14>MUST</bcp14> be ignored by the receiver. This situation
        <bcp14>SHOULD</bcp14> be logged as an error.</t>
        <t>When multiple IP Algorithm TLVs are received from a given router,
        the receiver <bcp14>MUST</bcp14> use the first occurrence of the TLV
        in the Router Information LSA. If the IP Algorithm TLV appears in
        multiple Router Information LSAs that have different flooding scopes,
        the IP Algorithm TLV in the Router Information LSA with the
        area-scoped flooding scope <bcp14>MUST</bcp14> be used. If the IP
        Algorithm TLV appears in multiple Router Information LSAs that have
        the same flooding scope, the IP Algorithm TLV in the Router
        Information LSA with the numerically smallest Instance ID (Opaque ID
        for OSPFv2 or Link State ID for OSPFv3) <bcp14>MUST</bcp14> be used
        and subsequent instances of the IP Algorithm TLV <bcp14>MUST</bcp14>
        be ignored.</t>
        <t>The Router Information LSA can be advertised at any of the defined flooding
        scopes (link, area, or Autonomous System (AS)). For the purpose of IP
        Algorithm TLV advertisement, area or Autonomous System scoped flooding is <bcp14>REQUIRED</bcp14>.
        The AS flooding scope <bcp14>SHOULD NOT</bcp14> be used unless local configuration policy
        on the originating router indicates domain-wide flooding.</t>
        <t>The IP Flex-Algorithm participation advertised in the OSPF IP Algorithm
        TLV is topology independent. When a router advertises participation in
        OSPF IP Algorithm TLV, the participation applies to all topologies in
        which the advertising node participates.</t>
      </section>
    </section>
    <section anchor="ASSOCIATE">
      <name>Advertising IP Flex-Algorithm Reachability</name>
      <t>To be able to associate the prefix with the Flex-Algorithm, the
      existing prefix reachability advertisements cannot be used, because
      they advertise the prefix reachability in default algorithm 0. Instead,
      new IP Flex-Algorithm reachability advertisements are defined in IS-IS
      and OSPF.</t>
      <t>The M-flag in the FAD is not applicable to IP Algorithm Prefixes. Any IP
      Algorithm Prefix advertisement includes the Algorithm and Metric fields.
      When an IP Algorithm Prefix is advertised between areas or domains, the
      metric field in the IP Algorithm Prefix advertisement <bcp14>MUST</bcp14> be used
      irrespective of the M-flag in the FAD advertisement.</t>
      <section anchor="IS-IS-IPV4_PFX_TLV">
        <name>The IS-IS IPv4 Algorithm Prefix Reachability TLV</name>
        <t>The IPv4 Algorithm Prefix Reachability top-level TLV is defined for advertising IPv4 Flex-Algorithm
        Prefix Reachability in IS-IS.</t>
        <t>This new TLV shares the sub-TLV space defined for TLVs Advertising Prefix 
        Reachability.</t>
        <t>The IS-IS IPv4 Algorithm Prefix Reachability TLV has the following
        format: </t>
        <figure anchor="ISISipv4" align="center">
          <name>IS-IS IPv4 Algorithm Prefix Reachability TLV</name>
          <artwork align="center"><![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    |  Rsvd |    MTID               |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
]]></artwork>
        </figure>
        <dl spacing="normal" newline="false">
          <dt>Type (1 octet):</dt> <dd>IPv4 Algorithm Prefix Reachability TLV
          (Value 126).</dd>
          <dt>Length (1 octet):</dt> <dd>Variable based on number of prefix
          entries encoded</dd>
          <dt>Rsvd (4 bits):</dt> <dd>Reserved for future use. They
          <bcp14>MUST</bcp14> be set to zero on transmission and
          <bcp14>MUST</bcp14> be ignored on receipt.</dd>
          <dt>MTID (12 bits):</dt> <dd>Multitopology Identifier as defined in
          <xref target="RFC5120" format="default"/>. Note that the value 0 is
          legal.</dd>
        </dl>
        <t>Followed by one or more prefix entries of the form:</t>
        <figure anchor="ISISpfxentry" align="center">
          <name>IS-IS IPv4 Algorithm Prefix Reachability TLV</name>
          <artwork align="center"><![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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                          Metric                               |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|   Flags       |  Algorithm    |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|  Pfx Length   |  Prefix (variable)...
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|  Sub-tlv-len  |         Sub-TLVs (variable) . . .             |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
]]></artwork>
        </figure>
        <dl spacing="normal" newline="false">
          <dt>Metric (4 octets):</dt> 
          <dd>Metric information as defined in <xref target="RFC5305"/>.</dd>
          <dt>Flags (1 octet):</dt>
<!-- [JM] artwork as definition -->
          <dd>
<artwork><![CDATA[
 0 1 2 3 4 5 6 7
+-+-+-+-+-+-+-+-+
|D|  Reserved   |
+-+-+-+-+-+-+-+-+
]]></artwork>
           <dl newline="false" spacing="normal">
              <dt>D-flag:</dt>
              <dd>When the Prefix is leaked from level-2 to level-1, the D bit
              <bcp14>MUST</bcp14> be set. Otherwise, this bit
              <bcp14>MUST</bcp14> be clear.  Prefixes with the D bit set
              <bcp14>MUST NOT</bcp14> be leaked from level-1 to level-2. This
              is to prevent looping.</dd>
            </dl>
	</dd>
          <dt>Algorithm (1 octet):</dt> <dd>Associated Algorithm from 128 to
          255.</dd>
          <dt>Prefix Len (1 octet):</dt> <dd>Prefix length measured in
          bits.</dd>
          <dt>Prefix (variable length):</dt> <dd>Prefix mapped to
          Flex-Algorithm.</dd>
          <dt>Optional Sub-TLV-length (1 octet):</dt> <dd>Number of octets
          used by sub-TLVs</dd>
          <dt>Optional sub-TLVs (variable length)</dt>
	<dd></dd>
        </dl>
        <t>If the Algorithms in the IS-IS IPv4 Algorithm Prefix Reachability
        TLV is outside the Flex-Algorithm range (128-255), the IS-IS IPv4
        Algorithm Prefix Reachability TLV <bcp14>MUST</bcp14> be ignored by
        the receiver. This situation <bcp14>SHOULD</bcp14> be logged as an
        error.</t>
        <t> If a router receives multiple IPv4 Algorithm Prefix Reachability
        advertisements for the same prefix from the same originator, it
        <bcp14>MUST</bcp14> select the first advertisement in
        the lowest-numbered LSP and ignore any subsequent IPv4 Algorithm
        Prefix Reachability advertisements for the same prefix.</t>
        <t>If a router receives multiple IPv4 Algorithm Prefix Reachability
        advertisements for the same prefix, from different originators, 
        where all of them do not advertise the same algorithm, it <bcp14>MUST</bcp14> ignore all of them and
        <bcp14>MUST NOT</bcp14> install any forwarding entries based on these
        advertisements.  This situation <bcp14>SHOULD</bcp14> be logged as an error.</t>
        <t>In cases where a prefix advertisement is received in both a IPv4
        Prefix Reachability TLV (<xref target="RFC5305"/>, <xref target="RFC5120"/>)  
        and an IPv4 Algorithm Prefix Reachability TLV, the IPv4 Prefix Reachability 
        advertisement <bcp14>MUST</bcp14> be preferred when installing entries in the forwarding plane.</t>
      </section>
      <section anchor="IS-IS-IPV6_PFX_TLV">
        <name>The IS-IS IPv6 Algorithm Prefix Reachability TLV</name>
        <t>The IS-IS IPv6 Algorithm Prefix Reachability TLV is identical to the
        IS-IS IPv4 Algorithm Prefix Reachability TLV, except that it has a
        distinct type. The type is 127.</t>
        <t>If the Algorithms in the IS-IS IPv6 Algorithm Prefix Reachability TLV is outside
        the Flex-Algorithm range (128-255), the IS-IS IPv6 Algorithm Prefix Reachability 
        TLV <bcp14>MUST</bcp14> be ignored by the receiver. This situation <bcp14>SHOULD</bcp14> be logged as an error.</t>
        <t> If a router receives multiple IPv6 Algorithm Prefix Reachability
        advertisements for the same prefix from the same originator, it
        <bcp14>MUST</bcp14> select the first advertisement in
        the lowest-numbered LSP and ignore any subsequent IPv6 Algorithm
        Prefix Reachability advertisements for the same prefix.</t>
        <t>If a router receives multiple IPv6 Algorithm Prefix Reachability
        advertisements for the same prefix, from different originators, 
        where all of them do not advertise the same algorithm, it <bcp14>MUST</bcp14> ignore all of them and
        <bcp14>MUST NOT</bcp14> install any forwarding entries based on these
       advertisements.  This situation <bcp14>SHOULD</bcp14> be logged as an error.</t>
        <t>In cases where a prefix advertisement is received in both an IPv6
        Prefix Reachability TLV (<xref target="RFC5308"/>, <xref target="RFC5120"/>)
        and an IPv6 Algorithm Prefix Reachability TLV, the IPv6 Prefix Reachability 
        advertisement <bcp14>MUST</bcp14> be preferred when installing entries in the forwarding plane.</t>
        <t>In cases where a prefix advertisement is received in both an IS-IS SRv6 
        Locator TLV  <xref target="RFC9352"/> and in IS-IS IPv6 Algorithm Prefix Reachability TLV, the receiver
        <bcp14>MUST</bcp14> ignore both of them and <bcp14>MUST NOT</bcp14> install any forwarding entries based 
        on these advertisements. This situation <bcp14>SHOULD</bcp14> be logged as an error.</t>
      </section>
      <section anchor="OSPF-IPV4_PFX_TLV">
        <name>The OSPFv2 IP Algorithm Prefix Reachability Sub-TLV</name>
        <t>A new Sub-TLV of the OSPFv2 Extended Prefix TLV is defined for
        advertising IP Algorithm Prefix Reachability in OSPFv2, the OSPFv2 IP
        Algorithm Prefix Reachability Sub-TLV.</t>
        <t>The OSPFv2 IP Algorithm Prefix Reachability Sub-TLV has the
        following format:</t>

<!-- [rfced] To match the other artwork elements, should the top two lines in
Figures 5 and 6 be moved to the right by one space?

Figure 5:
Original:
    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            |
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    |       MT-ID   |  Algorithm    |     Flags     |     Reserved  |
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    |                          Metric                               |
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

Perhaps:
     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            |
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    |       MT-ID   |  Algorithm    |     Flags     |     Reserved  |
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    |                          Metric                               |
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

Figure 6:
Original:
    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            |
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    |                     Forwarding Address                        |
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

Perhaps:
     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            |
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    |                     Forwarding Address                        |
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
-->

        <figure anchor="OSPFvpfx2" align="center">
          <name>OSPFv2 IP Algorithm Prefix Reachability Sub-TLV</name>
          <artwork align="center"><![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            |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|       MT-ID   |  Algorithm    |     Flags     |     Reserved  |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                          Metric                               |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
]]></artwork>
        </figure>
        <dl spacing="normal" newline="false">
          <dt>Type (2 octets) :</dt> <dd>The value is TBD2.</dd>
          <dt>Length (2 octets):</dt> <dd>8</dd>
          <dt>MT-ID (1 octet):</dt> <dd>Multi-Topology ID as defined in <xref
          target="RFC4915"/></dd>
          <dt>Algorithm (1 octet):</dt> <dd>Associated Algorithm from 128 to
          255.</dd>
          <dt>Flags: (1 octet):</dt>
	  <dd><t>The following flags are defined:</t>
            <artwork><![CDATA[
 0 1 2 3 4 5 6 7 8 
+-+-+-+-+-+-+-+-+-+
|E|   Reserved    |
+-+-+-+-+-+-+-+-+-+
]]></artwork>
          <t>where:</t>
            <dl spacing="normal" newline="false">
              <dt>bit E:</dt> <dd>Same as bit E defined in Section A.4.5 of
              <xref target="RFC2328"/>.</dd>
              <dt>The remaining bits,</dt> <dd>are reserved for future
              use. They <bcp14>MUST</bcp14> be set to zero on transmission and
              <bcp14>MUST</bcp14> be ignored on receipt.</dd>
            </dl>
          </dd>
          <dt>Reserved: (1 octet).</dt> <dd><bcp14>SHOULD</bcp14> be set to 0
          on transmission and <bcp14>MUST</bcp14> be ignored on
          reception.</dd>
          <dt>Metric (4 octets):</dt> <dd>The algorithm-specific metric
          value. The metric value of 0XFFFFFFFF <bcp14>MUST</bcp14> be
          considered as unreachable.</dd>
        </dl>
        <t>If the Algorithms in the OSPFv2 IP Algorithm Prefix Reachability Sub-TLV is outside
        the Flex-Algorithm range (128-255), the OSPFv2 IP Algorithm Prefix Reachability 
        Sub-TLV <bcp14>MUST</bcp14> be ignored by the receiver. This situation <bcp14>SHOULD</bcp14> be logged as an error.</t>
        <t>An OSPFv2 router receiving multiple OSPFv2 IP Algorithm Prefix
        Reachability Sub-TLVs in the same OSPFv2 Extended Prefix TLV, <bcp14>MUST</bcp14>
        select the first advertisement of this Sub-TLV and <bcp14>MUST</bcp14> ignore all
        remaining occurences of this Sub-TLV in the OSPFv2 Extended Prefix
        TLV.</t>
        <t>An OSPFv2 router receiving multiple OSPFv2 IP Algorithm Prefix
        Reachability TLVs for the same prefix, from different originators,
        where all of them do not advertise the same algorithm, <bcp14>MUST</bcp14> ignore all of them and <bcp14>MUST NOT</bcp14>
        install any forwarding entries based on these advertisements.
        This situation <bcp14>SHOULD</bcp14> be logged as an error.</t>
        <t>In cases where a prefix advertisement is received in any of the
        LSAs advertising the prefix reachability for algorithm 0 and in an OSPFv2
        IP Algorithm Prefix Reachability Sub-TLV, only the prefix reachability
        advertisement for algorithm 0 <bcp14>MUST</bcp14> be used and all occurences of the
        OSPFv2 IP Algorithm Prefix Reachability Sub-TLV <bcp14>MUST</bcp14> be ignored.</t>
        <t>When computing the IP Algorithm Prefix reachability in OSPFv2, only information 
        present in the OSPFv2 Extended Prefix TLV <bcp14>MUST</bcp14> be used. There will not be any 
        information advertised for the IP Algorithm Prefix in any of the OSPFv2 
        LSAs that advertise prefix reachability for algorithm 0. For the IP Algorithm Prefix 
        the OSPFv2 Extended Prefix TLV is used to advertise the prefix reachability, unlike
        for algorithm 0 prefixes, where the OSPFv2 Extended Prefix TLV is only used to advertise
        additional attributes, but not the reachability itself.</t>
        <section anchor="OSPFV2_FA-SUBTLV">
          <name>The OSPFv2 IP Forwarding Address Sub-TLV</name>
          <t>A new Sub-TLV of the OSPFv2 Extended Prefix TLV is defined for
        advertising IP Forwarding Address, the OSPFv2 IP Forwarding Address Sub-TLV.</t>
          <t>The OSPFv2 IP Forwarding Address Sub-TLV has the
        following format:</t>
          <figure anchor="OSPFV2_FA" align="center">
            <name>OSPFv2 IP Forwarding Address Sub-TLV</name>
            <artwork align="center"><![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            |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                     Forwarding Address                        |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
]]></artwork>
          </figure>
          <dl spacing="normal" newline="false">
            <dt>Type (2 octets) :</dt> <dd>The value is TBD4.</dd>
            <dt>Length (2 octets):</dt> <dd>4</dd>
            <dt>Forwarding Address (4 octets):</dt> <dd>Same as defined in
            Section A.4.5 of <xref target="RFC2328"/>.</dd>
          </dl>
          <t>The OSPFv2 IP Forwarding Address Sub-TLV <bcp14>MUST NOT</bcp14>
          be used for computing algorithm 0 prefix reachability and
          <bcp14>MUST</bcp14> be ignored for algorithm 0 prefixes.</t>
          <t>The OSPFv2 IP Forwarding Address Sub-TLV is optional. If it is
          not present, the forwarding address for computing the IP Algorithm
          Prefix reachability is assumed to be equal to 0.0.0.0.</t>
          <t>The OSPFv2 IP Forwarding Address Sub-TLV is only applicable to Autonomous System
             (AS) External and Not-So-Stubby Area (NSSA) External route types. If the 
             OSPFv2 IP Forwarding Address Sub-TLV is advertised in the OSPFv2 Extended 
             Prefix TLV that has the Route Type field set to any other type, the OSPFv2 
             IP Forwarding Address Sub-TLV <bcp14>MUST</bcp14> be ignored.</t>
        </section>
      </section>
      <section anchor="OSPFV3_ALGTLV">
        <name>The OSPFv3 IP Algorithm Prefix Reachability Sub-TLV</name>
        <t>The OSPFv3 <xref target="RFC5340"/> IP Algorithm Prefix Reachability Sub-TLV 
        is defined for advertisement of the IP Algorithm Prefix Reachability in OSPFv3.</t>
        <t>The OSPFv3 IP Algorithm Prefix Reachability Sub-TLV is a sub-TLV of
        the following OSPFv3 TLVs defined in <xref target="RFC8362"/>: </t>
        <ul spacing="normal">
          <li>Intra-Area-Prefix TLV</li>
          <li>Inter-Area-Prefix TLV</li>
          <li>External-Prefix TLV</li>
        </ul>
        <t>The format of OSPFv3 IP Algorithm Prefix Reachability Sub-TLV is
        shown below:</t>
        <figure anchor="OSPFv3pfx" align="center">
          <name>OSPFv3 IP Algorithm Prefix Reachability Sub-TLV</name>
          <artwork align="center"><![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            |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|  Algorithm    |                 Reserved                      |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                          Metric                               |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
]]></artwork>
        </figure>
        <t>Where:</t>
        <dl spacing="normal" newline="false">
          <dt>Type (2 octets):</dt> <dd>The value is TBD3.</dd>
          <dt>Length (2 octets):</dt> <dd>8.</dd>
          <dt>Algorithm (1 octet):</dt> <dd>Associated Algorithm from 128 to
          255.</dd>
          <dt>Reserved: (3 octets).</dt> <dd><bcp14>SHOULD</bcp14> be set to 0
          on transmission and <bcp14>MUST</bcp14> be ignored on
          reception.</dd>
          <dt>Metric (4 octets):</dt> <dd>The algorithm-specific metric
          value. The metric value of 0XFFFFFFFF <bcp14>MUST</bcp14> be
          considered as unreachable.</dd>
        </dl>
        <t>If the Algorithms in the OSPFv3 IP Algorithm Prefix Reachability
        Sub-TLV is outside the Flex-Algorithm range (128-255), the OSPFv3 IP
        Algorithm Prefix Reachability Sub-TLV <bcp14>MUST</bcp14> be ignored
        by the receiver. This situation <bcp14>SHOULD</bcp14> be logged as an
        error.</t>
        <t>When the OSPFv3 IP Algorithm Prefix Reachability Sub-TLV is
        present, the NU-bit in the PrefixOptions field of the parent TLV
        <bcp14>MUST</bcp14> be set.  This is needed to prevent the OSPFv3 IP
        Algorithm Prefix Reachability advertisement from contributing to the
        base algorithm reachability. If the NU-bit in the PrefixOptions field
        of the parent TLV is not set, the OSPFv3 IP Algorithm Prefix Sub-TLV
        <bcp14>MUST</bcp14> be ignored by the receiver.</t>
        <t>The metric value in the parent TLV is <bcp14>RECOMMENDED</bcp14> to
        be set to LSInfinity <xref target="RFC2328"/>. This recommendation is
        provided as a network troubleshooting convenience; if it is not
        followed the protocol will still function correctly.</t>
        <t>An OSPFv3 router receiving multiple OSPFv3 IP Algorithm Prefix
        Reachability Sub-TLVs in the same parent TLV, <bcp14>MUST</bcp14> select the first
        advertisement of this Sub-TLV and <bcp14>MUST</bcp14> ignore all remaining occurences
        of this Sub-TLV in the parent TLV.</t>
        <t>An OSPFv3 router receiving multiple OSPFv3 IP Algorithm Prefix
        Reachability TLVs for the same prefix, from different originators,
        where all of them do not advertise the same algorithm, <bcp14>MUST</bcp14> ignore all of them and <bcp14>MUST NOT</bcp14>
        install any forwarding entries based on these advertisements.
        This situation <bcp14>SHOULD</bcp14> be logged as an error.</t>
        <t>In cases where a prefix advertisement is received in any of the
        LSAs advertising the prefix reachability for algorithm 0 and in an OSPFv3
        OSPFv3 IP Algorithm Prefix Reachability Sub-TLV, only the prefix reachability
        advertisement for algorithm 0 <bcp14>MUST</bcp14> be used and all occurences of the
        OSPFv3 IP Algorithm Prefix Reachability Sub-TLV <bcp14>MUST</bcp14> be ignored.</t>
        <t>In cases where a prefix advertisement is received in both an OSPFv3 SRv6 Locator TLV 
        and in an OSPFv3 IP Algorithm Prefix Reachability Sub-TLV, the receiver
        <bcp14>MUST</bcp14> ignore both of them and <bcp14>MUST NOT</bcp14> install any forwarding entries based 
        on these advertisements. This situation <bcp14>SHOULD</bcp14> be logged as an error.</t>
      </section>
      <section anchor="IPFAAL">
        <name>The OSPF IP Flexible Algorithm ASBR Metric Sub-TLV</name>
        <t><xref target="RFC9350"/> defines
        the OSPF Flexible Algorithm ASBR Metric Sub-TLV (FAAM) that is used by
        an OSPFv2 or an OSPFv3 ABR to advertise a Flex-Algorithm specific metric
        associated with the corresponding ASBR LSA.</t>
        <t>As described in <xref target="RFC9350"/> each data-plane signals 
        its participation independently. IP Flex-Algorithm participation is
        signaled independent of Segment Routing (SR) Flex-Algorithm
        participation. As a result, the calculated topologies for SR and IP
        Flex-Algorithm could be different. Such difference prevents the usage
        of FAAM for the purpose of the IP Flex-Algorithm.</t>
        <t>The OSPF IP Flexible Algorithm ASBR Metric (IPFAAM) Sub-TLV is
        defined for the advertisement of the IP Flex-Algorithm specific metric
        associated with an ASBR by the ABR.</t>
        <t>The IPFAAM Sub-TLV is a Sub-TLV of the: </t>
        <ul spacing="normal">
          <li>OSPFv2 Extended Inter-Area ASBR TLV as defined in <xref
          target="RFC9350"/></li>
          <li>OSPFv3 Inter-Area-Router TLV defined in <xref
          target="RFC8362"/></li>
        </ul>
        <t>The OSPF IPFAAM Sub-TLV has the following format:</t>
        <figure anchor="OSPFfaal" align="center">
          <name>OSPF IP Flexible Algorithm ASBR Metric Sub-TLV</name>
          <artwork align="center"><![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            |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|   Algorithm   |                   Reserved                    |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                            Metric                             |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
]]></artwork>
        </figure>
	<t>where:</t>
        <dl newline="false" spacing="normal">
          <dt>Type (2 octets):</dt> <dd>2 (allocated by IANA) for OSPFv2, TBD5
          for OSPFv3.</dd>
          <dt>Length (2 octets):</dt> <dd>8.</dd>
          <dt>Algorithm (1 octet):</dt> <dd>Associated Algorithm from 128 to
          255.</dd>
          <dt>Reserved: (3 octets).</dt> <dd><bcp14>SHOULD</bcp14> be set to 0
          on transmission and <bcp14>MUST</bcp14> be ignored on
          reception.</dd>
          <dt>Metric (4 octets):</dt> <dd>The algorithm-specific metric
          value.</dd>
        </dl>
        <t>If the Algorithms in the OSPF IP Flexible Algorithm ASBR Metric
        Sub-TLV is outside the Flex-Algorithm range (128-255), the OSPF IP
        Flexible Algorithm ASBR Metric Sub-TLV <bcp14>MUST</bcp14> be ignored
        by the receiver. This situation <bcp14>SHOULD</bcp14> be logged as an
        error.</t>
        <t>The usage of the IPFAAM Sub-TLV is similar to the usage of the FAAM
        Sub-TLV defined in <xref target="RFC9350"/>, but it is used to
        advertise IP Flex-Algorithm metric.</t>
        <t>An OSPF ABR <bcp14>MUST</bcp14> include the OSPF IPFAAM Sub-TLVs as part of the
        ASBR reachability advertisement between areas for every IP
        Flex-Algorithm in which it participates and the ASBR is reachable
        in.</t>
        <t>The FAAM Sub-TLV as defined in <xref target="RFC9350"/>
        <bcp14>MUST NOT</bcp14> be used during IP Flex-Algorithm path calculation, the IPFAAM
        Sub-TLV <bcp14>MUST</bcp14> be used instead.</t>
      </section>
    </section>
    <section>
      <name>Calculating of IP Flex-Algorithm Paths</name>
      <t>The IP Flex-Algorithm is considered as yet another data-plane of the
      Flex-Algorithm as described in <xref target="RFC9350"/>.</t>
      <t>Participation in the IP Flex-Algorithm is signalled as described in
      <xref target="PARTICIPATION"/> and is specific to the IP Flex-Algorithm
      data-plane.</t>
      <t>Calculation of IP Flex-Algorithm paths follows what is described in
      <xref target="RFC9350"/>. This computation uses the IP
      Flex-Algorithm data-plane participation and is independent of the Flex-Algorithm
      calculation done for any other Flex-Algorithm data-plane (e.g., SR,
      SRv6).</t>
      <t>The IP Flex-Algorithm data-plane only considers participating nodes
      during the Flex-Algorithm calculation. When computing paths for a given
      Flex-Algorithm, all nodes that do not advertise participation for the IP
      Flex-Algorithm, as described in <xref target="PARTICIPATION"/>, <bcp14>MUST</bcp14> be
      pruned from the topology.</t>
    </section>
    <section>
      <name>IP Flex-Algorithm Forwarding</name>
      <t>The IP Algorithm Prefix Reachability advertisement as described in <xref target="PARTICIPATION"/> includes the MTID value that associates the
      prefix with a specific topology. Algorithm Prefix Reachability
      advertisement also includes an Algorithm value that explicitly
      associates the prefix with a specific Flex-Algorithm. The paths to the
      prefix <bcp14>MUST</bcp14> be calculated using the specified Flex-Algorithm in the
      associated topology.</t>
      <t>Forwarding entries for the IP Flex-Algorithm prefixes advertised in
      IGPs <bcp14>MUST</bcp14> be installed in the forwarding plane of the receiving IP
      Flex-Algorithm prefix capable routers when they participate in the
      associated topology and algorithm. Forwarding entries for IP
      Flex-Algorithm prefixes associated with Flex-Algorithms in which the
      node is not participating <bcp14>MUST NOT</bcp14> be installed in the forwarding
      plane.</t>
    </section>
    <section>
      <name>Deployment Considerations</name>
      <t>IGP Flex-Algorithm can be used by many data-planes. The original
      specification was done for SR and SRv6, this specification adds IP as
      another data-plane that can use IGP Flex-Algorithm. Other data-planes
      may be defined in the future. This section provides some details about
      the coexistence of the various data-planes of an IGP Flex-Algorithm.</t>
      <t>Flex-Algorithm definition (FAD), as described in <xref target="RFC9350"/>, is data-plane independent and is
      used by all Flex-Algorithm data-planes.</t>
      <t>Participation in the Flex-Algorithm, as described in <xref target="RFC9350"/>, is data-plane specific.</t>
      <t>Calculation of the flex-algo paths is data-plane specific and uses
      data-plane specific participation advertisements.</t>
      <t>Data-plane specific participation and calculation guarantee that the
      forwarding of the traffic over the Flex-Algorithm data-plane specific
      paths is consistent between all nodes that apply the IGP Flex-Algorithm
      to the data-plane.</t>
      <t>Multiple data-planes can use the same Flex-Algorithm value at the
      same time and, and as such, share the FAD for it. For example, SR-MPLS and
      IP can both use a common Flex-Algorithm. Traffic for SR-MPLS will be
      forwarded based on Flex-algorithm specific SR SIDs. Traffic for IP
      Flex-Algorithm will be forwarded based on Flex-Algorithm specific prefix
      reachability advertisements. Note that for a particular Flex-Algorithm, for 
      a particular IP prefix, there will only be path(s) calculated and installed
      for a single data-plane.</t>
    </section>
    <section>
      <name>Protection</name>
      <t>In many networks where IGP Flexible Algorithms are deployed, IGP
      restoration will be fast and additional protection mechanisms will not
      be required. IGP restoration may be enhanced by Equal Cost Multipath
      (ECMP).</t>
      <t>In other networks, operators can deploy additional protection
      mechanisms. The following are examples:</t>
      <ul spacing="normal">
        <li>Loop Free Alternates (LFA) <xref target="RFC5286"/></li>
        <li>Remote Loop Free Alternates (R-LFA) <xref target="RFC7490"/></li>
      </ul>
      <t>LFA and R-LFA computations <bcp14>MUST</bcp14> be restricted to the
      flex-algo topology and the computed backup nexthops should be programmed
      for the IP flex-algo prefixes.</t>
    </section>
    <section anchor="IANA">
      <name>IANA Considerations</name>
      <t>This specification updates the OSPF Router Information (RI) TLVs
      Registry as follows:</t>

      <table anchor="T1">
        <thead>
          <tr>
            <th>Value</th>
            <th>TLV Name</th>
            <th>Reference</th>
          </tr>
        </thead>
        <tbody>
          <tr>
            <td>TBD1</td>
            <td>IP Algorithm</td>
            <td>This Document <xref target="OSPF-ALG_TLV"/></td>
          </tr>
        </tbody>
      </table>
      <t>This document also updates the IS-IS "IS-IS Sub-TLVs for IS-IS Router CAPABILITY TLV" registry as
      follows:</t>
      <table anchor="T2">
        <thead>
          <tr>
            <th>Value</th>
            <th>TLV Name</th>
            <th>Reference</th>
          </tr>
        </thead>
        <tbody>
          <tr>
            <td>29</td>
            <td>IP Algorithm</td>
            <td>This Document <xref target="IS-IS-ALG_TLV"/></td>
          </tr>
        </tbody>
      </table>
      <t>This document also updates the "IS-IS TLV Codepoints Registry"
      registry as follows:</t>

      <table anchor="T3">
        <thead>
          <tr>
            <th>Value</th>
            <th>TLV Name</th>
            <th>IIH</th>
            <th>LSP</th>
            <th>SNP</th>
            <th>Purge</th>
            <th>Reference</th>
          </tr>
        </thead>
        <tbody>
          <tr>
            <td>126</td>
            <td>IPv4 Algorithm Prefix Reachability</td>
            <td>N</td>
            <td>Y</td>
            <td>N</td>
            <td>N</td>
            <td>This document, <xref target="IS-IS-IPV4_PFX_TLV"/></td>
          </tr>
          <tr>
            <td>127</td>
            <td>IPv6 Algorithm Prefix Reachability</td>
            <td>N</td>
            <td>Y</td>
            <td>N</td>
            <td>N</td>
            <td>This document, <xref target="IS-IS-IPV6_PFX_TLV"/></td>
          </tr>
        </tbody>
      </table>
      <t>Since the above TLVs share the sub-TLV space managed in the "IS-IS
   Sub-TLVs for TLVs Advertising Prefix Reachability" registry, IANA is
   requested to add "IPv4 Algorithm Prefix Reachability TLV (126)" and
   "IPv6 Algorithm Prefix Reachability TLV (127)" to the list of TLVs in
   the description of that registry.</t>
      <t>In addition, columns headed '126' and '127' are added to that registry,
   as follows:</t>

<table anchor="attribute126-127" align="center">
  <name></name>
  <thead>
    <tr>
      <th>Type</th>
      <th>Description</th>
      <th>126</th>
      <th>127</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td>1</td>
      <td>32-bit Administrative Tag Sub-TLV</td>
      <td>y</td>
      <td>y</td>
    </tr>
    <tr>
      <td>2</td>
      <td>64-bit Administrative Tag Sub-TLV</td>
      <td>y</td>
      <td>y</td>
    </tr>
    <tr>
      <td>3</td>
      <td>Prefix Segment Identifier</td>
      <td>n</td>
      <td>n</td>
    </tr>
    <tr>
      <td>4</td>
      <td>Prefix Attribute Flags</td>
      <td>y</td>
      <td>y</td>
    </tr>
    <tr>
      <td>5</td>
      <td>SRv6 End SID</td>
      <td>n</td>
      <td>n</td>
    </tr>
    <tr>
      <td>6</td>
      <td>Flex-Algorithm Prefix Metric</td>
      <td>n</td>
      <td>n</td>
      </tr>
      <tr>
	<td>11</td>
	<td>IPv4 Source Router ID</td>
        <td>y</td>
	<td>y</td>
      </tr>
      <tr>
	<td>12</td>
	<td>IPv6 Source Router ID</td>
        <td>y</td>
	<td>y</td>
      </tr>
      <tr>
	<td>32</td>
	<td>BIER Info</td>
        <td>n</td>
	<td>n</td>
      </tr>
  </tbody>
</table>

      <t>This document updates the "OSPFv2 Extended Prefix TLV Sub-TLVs"
      registry as follows:</t>

      <table anchor="T4">
        <thead>
          <tr>
            <th>Value</th>
            <th>TLV Name</th>
            <th>Reference</th>
          </tr>
        </thead>
        <tbody>
          <tr>
            <td>TBD2</td>
            <td>OSPFv2 IP Algorithm Prefix Reachability</td>
            <td>This Document, <xref target="OSPF-IPV4_PFX_TLV"/></td>
          </tr>
          <tr>
            <td>TBD4</td>
            <td>OSPFv2 IP Forwarding Address</td>
            <td>This Document, <xref target="OSPFV2_FA-SUBTLV"/></td>
          </tr>
        </tbody>
      </table>
      <t>This document creates a new registry under "Open Shortest Path First
      v2 (OSPFv2) Parameters" registry, called "IP Algorithm Prefix
      Reachability Sub-TLV Flags". The new registry defines the bits in the
      8-bit Flags field in the OSPFv2 IP Algorithm Prefix Reachability Sub-TLV
      (<xref target="OSPF-IPV4_PFX_TLV"/>). New bits can be allocated via IETF
      Review or IESG Approval <xref target="RFC8126"/></t>
      <table anchor="T5">
        <thead>
          <tr>
            <th>Bit #</th>
            <th>Name</th>
            <th>Reference</th>
          </tr>
        </thead>
        <tbody>
          <tr>
            <td>0</td>
            <td>bit E</td>
            <td>This Document, <xref target="OSPF-IPV4_PFX_TLV"/></td>
          </tr>
          <tr>
            <td>1-7</td>
            <td>Reserved</td>
            <td>This Document, <xref target="OSPF-IPV4_PFX_TLV"/></td>
          </tr>
        </tbody>
      </table>
      <t>This document updates the "OSPFv3 Extended-LSA Sub-TLVs" registry as
      follows:</t>
      <table anchor="T6">
        <thead>
          <tr>
            <th>Value</th>
            <th>TLV Name</th>
            <th>Reference</th>
          </tr>
        </thead>
        <tbody>
          <tr>
            <td>TBD3</td>
            <td>OSPFv3 IP Algorithm Prefix Reachability</td>
            <td>This Document, <xref target="OSPFV3_ALGTLV"/></td>
          </tr>
          <tr>
            <td>TBD5</td>
            <td>OSPFv3 IP Flexible Algorithm ASBR Metric</td>
            <td>This Document, <xref target="IPFAAL"/></td>
          </tr>
        </tbody>
      </table>
      <t>This document updates the "OSPFv2 Extended Inter-Area ASBR Sub-TLVs"
      registry as follows:</t>

      <table anchor="T7">
        <thead>
          <tr>
            <th>Value</th>
            <th>TLV Name</th>
            <th>Reference</th>
          </tr>
        </thead>
        <tbody>
          <tr>
            <td>2</td>
            <td>OSPF IP Flexible Algorithm ASBR Metric</td>
            <td>This Document, <xref target="IPFAAL"/></td>
          </tr>
        </tbody>
      </table>
    </section>
    <section anchor="Security">
      <name>Security Considerations</name>
      <t>This document inherits security considerations from <xref
      target="RFC9350"/>.</t>
      <t>This document adds one new way to disrupt IGP networks that are using
      Flex-Algorithm: an attacker can suppress reachability for a given prefix
      whose reachability is advertised by a legitimate node for a particular
      IP Flex-Algorithm X, by advertising the same prefix in Flex-Algorithm Y
      from another, malicious node. (To see why this is, consider, for
      example, the rule given in the second-last paragraph of <xref
      target="IS-IS-IPV4_PFX_TLV"/>).</t>
      <t>This attack can be addressed by the existing security extensions, as
      described in <xref target="RFC5304"/> and <xref target="RFC5310"/> for
      IS-IS, in <xref target="RFC2328"/> and <xref target="RFC7474"/>for
      OSPFv2, and in <xref target="RFC4552"/> and <xref target="RFC5340"/> for
      OSPFv3.</t>
      <t>If a node that is authenticated is taken over by an attacker, such a
      rogue node can perform the attack described above.  Such an attack is
      not preventable through authentication, and it is not different from
      advertising any other incorrect information through IS-IS or OSPF.</t>
    </section>
    <section anchor="Acknowledgements">
      <name>Acknowledgements</name>
      <t>Thanks to <contact fullname="Bruno Decraene"/> for his contributions
      to this document.  Special thanks to <contact fullname="Petr Bonbon
      Adamec"/> of Cesnet for supporting interoperability testing.</t>
    </section>
  </middle>
  <back>
    <references>
      <name>References</name>
      <references>
        <name>Normative References</name>
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.2119.xml"/>
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.2328.xml"/>
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.4552.xml"/>
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.5120.xml"/>
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.5304.xml"/>
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.5308.xml"/>
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.5310.xml"/>
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.5340.xml"/>
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.8174.xml"/>
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.4915.xml"/>
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.7770.xml"/>
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.7474.xml"/>
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.7981.xml"/>
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.9350.xml"/>
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.9352.xml"/>
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.8362.xml"/>
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.5305.xml"/>

<!-- [ISO10589] Please review - Found URL https://www.iso.org/standard/30932.html but has title "ISO/IEC 10589:2002
Information technology — Telecommunications and information exchange between systems — Intermediate System to Intermediate System intra-domain routeing information exchange protocol for use in conjunction with the protocol for providing the connectionless-mode network service (ISO 8473)" -->

        <reference anchor="ISO10589" target="ISO/IEC 10589:2002">
          <front>
            <title>Intermediate system to Intermediate system routing
          information exchange protocol for use in conjunction with the
          Protocol for providing the Connectionless-mode Network Service (ISO
          8473)</title>
            <author>
              <organization abbrev="ISO">International Organization for
            Standardization</organization>
            </author>
            <date month="Nov" year="2002"/>
          </front>
        </reference>
      </references>
      <references>
        <name>Informative References</name>

<!-- [TS.23.501-3GPP] Please review - Found URL https://portal.3gpp.org/desktopmodules/Specifications/SpecificationDetails.aspx?specificationId=3144 but has title "System architecture for the 5G System (5GS)" -->

        <reference anchor="TS.23.501-3GPP">
          <front>
            <title>System Architecture for 5G System; Stage 2, 3GPP TS 23.501 v16.4.0</title>
            <author>
              <organization>
        3rd Generation Partnership Project (3GPP)
              </organization>
            </author>
            <date month="March" year="2020"/>
          </front>
        </reference>

<!-- [IANA-ALG] URL https://www.iana.org/assignments/isis-tlv-codepoints/isis-tlv-codepoints.xhtml#isis-tlv-codepoints-242 -->

        <reference anchor="IANA-ALG" target="https://www.iana.org/assignments/igp-parameters/igp-parameters.xhtml#igp-algorithm-types">
          <front>
            <title>IS-IS Sub-TLVs for IS-IS Router CAPABILITY TLV</title>
            <author fullname="" initials="" surname="">
              <organization>IANA</organization>
            </author>
            <date month="August" year="1987"/>
          </front>
        </reference>
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.8402.xml"/>
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.8126.xml"/>
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.5286.xml"/>
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.7490.xml"/>
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.8986.xml"/>
      </references>
    </references>
  </back>
</rfc>
