<?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-hu-lsr-igp-ca-flex-algorithm-00"
     ipr="trust200902">
  <front>
    <title abbrev="IGP Flex-Algorithm with Common Address">IGP Flexible
    Algorithm with Common Address</title>

    <author fullname="Zhibo Hu" initials="Z. " surname="Hu">
      <organization>Huawei</organization>

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

          <city>Beijing</city>

          <code>100095</code>

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

        <email>huzhibo@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="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="07" month="July" year="2022"/>

    <abstract>
      <t>An IGP Flexible Algorithm (Flex-Algorithm) allows IGPs to compute
      constraint-based paths. IGP Flex-Algorithm can be used with Segment
      Routing (SR) or IP data plane. When used with SR data plane,
      Flex-Algorithm requires to allocate algorithm specific Prefix Segment
      Identifiers (SIDs) or algorithm specific SRv6 Locators. When used with
      IP data plane, Flex-Algorithm requires to allocate algorithm specfic
      IPv4 or IPv6 prefixes. This increases the complexity and overhead of
      managing, advertising and maintaining additional SR SIDs, SRv6 Locators
      and IPv4 or IPv6 prefixes, which may not be affordable to some networks
      and network devices.</t>

      <t>This document extends IGP Flex-Algorithm to allow the use of common
      SR SIDs, SRv6 Locators and IP prefixes among multiple
      Flex-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>The IGP Flexible Algorithm (Flex-Algorithm) <xref
      target="I-D.ietf-lsr-flex-algo"/> specifies a way of computing a
      constraint-based path using IGP. IGP Flex-Algorithm can be used with
      Segment Routing (SR) or IP data plane . When used with SR data plane,
      Flex-Algorithm requires to allocate algorithm specific Prefix Segment
      Identifiers (SIDs) <xref target="RFC8402"/> or algorithm specific SRv6
      Locators <xref target="RFC8986"/>. When used with IP data plane,
      Flex-Algorithm requires to allocate algorithm specfic IPv4 or IPv6
      prefixes <xref target="I-D.ietf-lsr-ip-flexalgo"/>. The current
      Flex-Algorithm mechanism increases the complexity and overhead of
      managing, advertising and maintaining additional SR SIDs, SRv6 Locators
      and IPv4 prefixes, which may not be affordable to some networks and
      devices.</t>

      <t>For example, <xref target="I-D.ietf-lsr-isis-srv6-extensions"/> and
      <xref target="I-D.ietf-lsr-ospfv3-srv6-extensions"/> define the IGP
      Extensions to support SRv6. For each Flex-Algorithm, separate SRv6
      locators, End SIDs and End.X SIDs needs to be allocated and advertised.
      As the number of Flex-Algorithm increases, it the pressure on the IGP
      would increase accordingly.</t>

      <t>In addition, SInce the SRv6 VPN SIDs are always associated with the
      Flex-Algorithm to which the SRv6 Locator is allocated, it is impossible
      to steer different service flows of an SRv6 VPN using different
      Flex-Algorithm.</t>

      <t>To overcome the above issues and limitation with IGP Flex-Algo, this
      document defines the Common Address (CA) Flex-Algorithm extensions to
      allow the use of the same set of SR SIDs, SRv6 Locators, or IP prefixes
      among multiple Flex-Algorithms. Here the term Common Address (CA) refers
      to the common set of SR SIDs, SRv6 Locators or IP prefixes respectively
      for SR or IP data plane.</t>

      <t>Based on the CA Flex-Algo mechanism, constrainet-based path
      computation is done for each Flex-Algorithm, and the routing entries for
      each Flex-Algorithm is maintained in a separate Routing Information Base
      (RIB). For packet forwarding, some additional data plane field in packet
      header is needed to select the correct RIB for the incoming packet
      lookup to make the forwarding decision. <xref
      target="I-D.li-6man-topology-id"/> proposes the IPv6 extensions to carry
      the topology and/or Algorithm ID in the data plane. The extensions to
      other data plane are for further study. Such data plane mechanisms
      together with the control plane extensions in this document provides a
      CA Flex-Algo solution.</t>
    </section>

    <section title="Advertising Flex-Algorithm Definitions">
      <t>To guarantee loop free forwarding, all routers that participate in a
      Flex-Algorithm MUST agree on the Flex-Algorithm Definition (FAD).</t>

      <t>The advertisement of FAD for CA Flex-Algorithm is not changed.
      Selected nodes within the IGP domain MUST advertise FADs as described in
      Sections 5, 6, and 7 of <xref target="I-D.ietf-lsr-flex-algo"/>.</t>
    </section>

    <section title="Advertising CA Flex-Algorithm Participation">
      <t>When a router is configured to support a particular CA
      Flex-Algorithm, we say it is participating in that CA Flex-Algorithm.To
      guarantee the presence of the application specific forwarding state
      associated with a particular Flex-Algorithm, a router MUST advertise its
      participation for a particular Flex-Algorithm.</t>

      <t>The following sections describe how the CA Flex-Algorithm
      participation is advertised in IGP protocols.</t>

      <section title="The IS-IS CA Algorithm Sub-TLV">
        <t>The ISIS [ISO10589] CA Algorithm Sub-TLV is a sub-TLV of the IS-IS
        Router Capability TLV <xref target="RFC7981"/> and has the following
        format:</t>

        <t><figure suppress-title="false" title="IS-IS CA Algorithm Sub-TLV">
            <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></t>

        <t>Type: TBD</t>

        <t>Length: Variable</t>

        <t>Algorithm (1 octet): Value from 128 to 255.</t>

        <t>The CA Algorithm Sub-TLV MUST be propagated throughout the level
        and MUST NOT be advertised across level boundaries. Therefore, the S
        bit in the Router Capability TLV, in which the CA Algorithm Sub-TLV is
        advertised, MUST NOT be set.</t>

        <t>The CA Algorithm Sub-TLV is optional. It MUST NOT be advertised
        more than once at a given level. A router receiving multiple CA
        Algorithm sub-TLVs from the same originator MUST select the first
        advertisement in the lowest-numbered LSP and subsequent instances of
        the CA Algorithm Sub-TLV MUST be ignored.</t>

        <t>The CA Flex-Algorithm participation advertised in the IS-IS CA
        Algorithm Sub-TLV is topology independent. When a router advertises
        participation in the IS-IS CA Algorithm Sub-TLV, the participation
        applies to all topologies in which the advertising node
        participates.</t>
      </section>

      <section title="The OSPFv3 CA Algorithm Sub-TLV">
        <t>The CA Algorithm TLV is a top-level TLV of the OSPFv3 Router
        Information Opaque LSA <xref target="RFC7770"/> and has the following
        format:</t>

        <t><figure suppress-title="false" title="OSPFv3 CA Algorithm TLV">
            <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></t>

        <t>Type: TBD</t>

        <t>Length: Variable</t>

        <t>Algorithm (1 octet): Value from 128 to 255.</t>

        <t>When multiple of the CA Algorithm TLVs are received from a given
        router, the receiver MUST use the first occurrence of the TLV in the
        OSPFv3 Router Information Opaque LSA. If the CA Algorithm TLV appears
        in multiple Router Information Opaque LSAs that have different
        flooding scopes, the CA Algorithm TLV in the Router Information Opaque
        LSA with the area-scoped flooding scope MUST be used. If the CA
        Algorithm TLV appears in multiple Router Information Opaque LSAs that
        have the same flooding scope, the CA Algorithm TLV in the Router
        Information (RI) Opaque LSA with the numerically smallest Instance ID
        MUST be used and subsequent instances of the CA Algorithm TLV MUST be
        ignored.</t>

        <t>The RI LSA can be advertised at any of the defined opaque flooding
        scopes (link, area, or Autonomous System (AS)). For the purpose of CA
        Algorithm TLV advertisement, area-scoped flooding is REQUIRED.</t>
      </section>
    </section>

    <section title="SRv6 Locators for CA Flex-Algorithm">
      <t>The SRv6 locator TLV is defined in <xref
      target="I-D.ietf-lsr-isis-srv6-extensions"/> and <xref
      target="I-D.ietf-lsr-ospfv3-srv6-extensions"/>, which contains an
      algorithm and indicates that the locator only performs path calculation
      in this algorithm plane.</t>

      <t>This document defines a new flag in the SRv6 Locator TLV to indicate
      that the locator has the ability to be used for path calculations in
      multiple CA Flex-Algorithms planes. The position of this flag is BIT(1)
      in IS-IS and BIT(2) in OSPFv3.</t>

      <t>This bit is set in the Flags in the Locator TLV in which the value of
      the algorithm field is 0. When the algorithm is non-zero, the flag MUST
      NOT be set.</t>

      <t>C-Flag: CA Flex-Algorithm Flag.</t>

      <t/>

      <t>A receiver do not support machanisms defined in this document MUST
      ignore this flag.</t>
    </section>

    <section title="SRv6 Adjacency SIDs for CA Flex-Algorithm">
      <t>The SRv6 SIDs associated with Adjacencies is defined in
      [I-D.ietf-lsr-isis-srv6-extensions] and
      [I-D.ietf-lsr-ospfv3-srv6-extensions] and is explicitly allocated by the
      locator.</t>

      <t>A new Flag calle is defined to specify that the locator associated
      with the adjacent SID has the C flag.</t>

      <t>C-Flag: CA Flex-Algorithm Flag.</t>

      <t>The position of this flag is BIT(4) in IS-IS and OSPFv3.</t>

      <t>This bit is set in Flags in SRv6 END.X and LAN END.X SID TLV in which
      the value of the algorithm field is 0. When the Locator corresponding to
      the End.X SID does not have the C flag set, the C flag in the END.X and
      LAN END.X SID TLV MUST NOT be set.</t>

      <t>A receiver do not support machanisms defined in this document MUST
      ignore this flag.</t>
    </section>

    <section title="Calculating paths with CA Flex-Algorithm">
      <t>The CA Flex-Algorthm can considered as yet another data-plane of the
      Flex-Algorithm as described <xref target="I-D.ietf-lsr-flex-algo"/>.</t>

      <t>Participation for the CA Flex-Algorithm is signalled as described in
      Section 3 and is specific to the CA Flex-Algorithm data-plane.</t>

      <t>The calculation of CA Flex-Algorithm paths follows what is described
      in <xref target="I-D.ietf-lsr-flex-algo"/>. This computation uses the CA
      Flex- Algorithm data-plane participation and is independent of the
      Flex-Algorithm calculation done for native SR or IP data plane.</t>

      <t>The CA Flex-Algorithm data-plane only considers the participating
      nodes during the Flex-Algorithm calculation. When computing paths for a
      given CA Flex-Algorithm, all nodes that do not advertise participation
      for the CA Flex-Algorithm, as described in Section 3, MUST be pruned
      from the topology.</t>
    </section>

    <section anchor="IANA" title="IANA Considerations">
      <t>This document updates the ISIS "Sub-TLVs for TLV 242" registry as
      follows:</t>

      <t><figure align="center" title="ISIS CA Algorithm Sub-TLV">
          <artwork><![CDATA[
       +-------+--------------------------------+---------------------------+
       | Value |      TLV Name                  | Reference                 |
       +-------+--------------------------------+---------------------------+
       | TBD   |       CA Algorithm Sub-TLV     | This Document Section 3.1 |
       +-------+----------------------+-------------------------------------+
]]></artwork>
        </figure></t>

      <t>This document updates the OSPFv3 Router Information (RI) TLVs
      registry as follows:</t>

      <t><figure align="center" title="OSPFv3 CA Algorithm TLV">
          <artwork><![CDATA[
       +-------+--------------------------------+---------------------------+
       | Value |      TLV Name                  | Reference                 |
       +-------+--------------------------------+---------------------------+
       | TBD   |      CA Algorithm Sub-TLV      | This Document Section 3.2 |
       +-------+--------------------------------+---------------------------+
]]></artwork>
        </figure></t>

      <t>This document updates the ISIS Locator Flags registry as follows:</t>

      <t><figure align="center" title="CA Flex-Algorithm Flag">
          <artwork><![CDATA[
           Bit                #   Name
           ------------------   ------------------------------
           TBD(suggest bit 1)     CA Flex-Algorithm Flag (C-flag)
]]></artwork>
        </figure></t>

      <t>This document updates the OSPFv3 Locator Flags registry as
      follows:</t>

      <t><figure align="center" title="CA Flex-Algorithm Flag">
          <artwork><![CDATA[
           Bit                #   Name
           ------------------   ------------------------------
           TBD(suggest bit 2)     CA Flex-Algorithm Flag (C-flag)
]]></artwork>
        </figure></t>

      <t>This document also updates the ISIS and OSPFv3 SRv6 END.X and LAN
      END.X SID TLV Flags registry as follows:</t>

      <t><figure align="center" title="END.X CA Flex-Algorithm Flag">
          <artwork><![CDATA[
           Bit                #   Name
           ------------------   ------------------------------
           TBD(suggest bit 4)     CA Flex-Algorithm Flag (C-flag)
]]></artwork>
        </figure></t>
    </section>
  </middle>

  <back>
    <references title="Normative References">
      <?rfc include="reference.I-D.ietf-lsr-isis-srv6-extensions"?>

      <?rfc include="reference.I-D.ietf-lsr-ospfv3-srv6-extensions"?>

      <?rfc include="reference.I-D.ietf-lsr-flex-algo"?>

      <?rfc include="reference.I-D.ietf-6man-enhanced-vpn-vtn-id"?>

      <?rfc include="reference.I-D.li-6man-topology-id"?>

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

      <?rfc include='reference.RFC.7770'?>
    </references>

    <references title="Informative References">
      <?rfc include='reference.I-D.ietf-lsr-ip-flexalgo'?>

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

      <?rfc include='reference.RFC.8986'?>
    </references>
  </back>
</rfc>
