<?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-gong-idr-inter-domain-srv6-flex-algo-00"
     ipr="trust200902">
  <front>
    <title abbrev="BGP for Inter-Domain SRv6 Flex-Algo">BGP Extensions for
    Inter-Domain Flexible Algorithm with Segment Routing over IPv6
    (SRv6)</title>

    <author fullname="Liyan Gong" initials="L." surname="Gong">
      <organization>China Mobile</organization>

      <address>
        <postal>
          <street/>

          <city/>

          <region/>

          <code/>

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

        <email>gongliyan@chinamobile.com</email>
      </address>
    </author>

    <author fullname="Jie Dong" initials="J." surname="Dong">
      <organization>Huawei Technologies</organization>

      <address>
        <postal>
          <street/>

          <city/>

          <region/>

          <code/>

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

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

    <author fullname="Changwang Lin" initials="C." surname="Lin">
      <organization>New H3C Technologies</organization>

      <address>
        <postal>
          <street/>

          <city/>

          <region/>

          <code/>

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

        <email>linchangwang.04414@h3c.com</email>
      </address>
    </author>
	
	<author fullname="Ran Chen" initials="R." surname="Chen">
      <organization>ZTE Corporation</organization>

      <address>
        <postal>
          <street/>

          <city/>

          <region/>

          <code/>

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

        <email>chen.ran@zte.com.cn</email>
      </address>
    </author>
	
    <date day="20" month="October" year="2025"/>

    <area>Routing Area</area>

    <workgroup>Interdomain Routing Working Group</workgroup>

    <abstract>
      <t>IGP Flexible Algorithm (Flex-Algo) provides a mechanism for IGP nodes
      to compute the best paths according to a set of constraints in both the
      topology and computation metrics. Segment Routing over IPv6 (SRv6) can
      be used as one of the data plane of IGP Flex-Algo.</t>

      <t>In SRv6 networks, services may be carried across multiple network
      domains which are under the same administration. For some services, it
      is expected that the an end-to-end inter-domain path can be computed
      according to the same constraints (such as low latency) defined by
      Flex-Algo.</t>

      <t>This document describes BGP extensions to advertise SRv6 locators as
      IPv6 prefixes, together with the associated algorithm across the AS
      boundary.</t>
    </abstract>
  </front>

  <middle>
    <section title="Introduction">
      <t>IGP Flexible Algorithm (Flex-Algo) <xref target="RFC9350"/> provides
      a mechanism for IGP nodes to compute the best paths according to a set
      of constraints in the topology and computation metrics. Segment Routing
      over IPv6 (SRv6) <xref target="RFC8986"/> can be used as one data plane
      of IGP Flex-Algo.</t>

      <t>In SRv6 networks, services may be carried across multiple network
      domains which are under the same administration. For some services, it
      is expected that the an end-to-end inter-domain path can be computed
      according to the same constraints (such as low latency) defined by
      Flex-Algo.</t>

      <t>This document defines the BGP extensions to advertise SRv6 locators
      as IPv6 prefixes, together with the associated algorithm across the AS
      boundary.</t>
    </section>

    <section title="The Scenario">
      <t>This section shows a typical scenario of the inter-domain
      algorithm-specific IPv6 route distribution in Figure 1. AS1 and AS2
      belong to the same network operator, the service from CE1 to CE2
      requires an inter-domain path from PE1 to PE2 based on specific
      constraints (such as low latency). In each domain, the intra-domain low
      latency path can be computed based on flexible algorithm. In both AS1
      and AS2, Flex-Algo 128 is defined to compute the best path using the
      latency metrics. In AS2, the SRv6 locator of PE2 which is associated
      with Flex-Algo 128 is advertised in IGP. To make the SRv6 locator of PE2
      reachable in AS1, the SRv6 locator of PE2 is advertised as an IPv6
      prefix by ASBR2 to ASBR1 in BGP IPv6 Unicast <xref target="RFC2545"/>.
      However, the associated algorithm is not carried in the Update message.
      When the BGP route is redestributed into IGP in AS1, the SRv6 locator of
      PE2 will be treated as a IPv6 prefix without algorithm information. As a
      result, the IGP nodes in AS1 will only compute the shortest path to the
      SRv6 locator of PE2 using the default IGP metric, then inter-domain path
      computed based on Flex-Algo 128 is not possible.</t>

      <t><figure>
          <artwork align="center"><![CDATA[                                       
       +--------------+        +--------------+   
       |              |        |              |     
       |     [P1]     |        |     [P3]     |
 CE1--[PE1]       [ASBR1]---[ASBR2]        [PE2]--CE2
       |     [P2]     |        |     [P4]     |   
       |              |        |              |
       +--------------+        +--------------+     
            AS1                     AS2             
 
Flex-Algo 128                 Flex-Algo 128
  Metric-type: latency           Metric-type: latency               

Figure 1. Inter-domain Flex-Algo specific route distribution]]></artwork>
        </figure></t>

      <t>One possible approach to achieve inter-domain algorithm-specific path
      computation is to configure route-policy on ASBR1 to apply Flex-Algo 128
      to specific prefixes received from ASBR2. This requires manual
      configuration of route-policy for each prefix which is
      algorithm-specific SRv6 locators, hus it is complex and error-prone. A
      preferable approach is to add the associated algorithm information in
      the BGP routes advertised across the AS boundary, so that when the BGP
      route is redistributed into IGP, the associated algorithm could be
      obtained automatically.</t>
    </section>

    <section title="Flex-Algo Extended Community">
      <t>A new extended community is defined to carry the algorithm
      information associated with the prefix carried in the IPv6 Unicast NLRI.
      The Flex-Algo extended community is a transitive Opaque Extended
      Community which is used to carry the Algorithm ID associated with the
      IPv6 prefixes advertised in BGP Update message. The encoding of the
      Flex-Algo Extended Community is shown as below:</t>

      <t><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 High =0x03| Type Low =TBD |      Flags    |   Algorithm   |
  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  |                            Reserved                           |
  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+]]></artwork>
        </figure></t>

      <t>The value of the extended Type field is 0x03, which indicates it is a
      transitive opaque extended community. The value of the low-order octet
      of the extended Type field is TBA.</t>

      <t>Flags: 1 octet, carries the flags related to an Algorithm. No flag is
      defined in this document.</t>

      <t>Algorithm: 1 octet, it can be the algorithm as defined in the "IGP
      Algorithm Types" registry <xref target="RFC8665"/>, or Flexible
      Algorithms as defined in <xref target="RFC9350"/>.</t>

      <t>Reserved: 4-octet reserved for future use.</t>
    </section>

    <section anchor="IANA" title="IANA Considerations">
      <t>IANA is requested to assign a code point for Flex-Algo Extended
      Community from the "Transitive Opaque Extended Community Sub-Types"
      subregistry of the "Border Gateway Protocol (BGP) Extended Communities"
      registry:</t>

      <t><figure>
          <artwork><![CDATA[     Sub-type Value     Name                            Reference
     ----------------------------------------------------------------
     TBA                Flex-Algo Extended Community    This document]]></artwork>
        </figure></t>
    </section>

    <section anchor="Security" title="Security Considerations">
      <t>This document does not introduce any additional security
      considerations than those described in <xref target="RFC4271"/> and
      <xref target="RFC4272"/>.</t>
    </section>

    <section anchor="Acknowledgements" title="Acknowledgements">
      <t>The authors would like to thank XXX for the review and valuable
      discussion.</t>
    </section>
  </middle>

  <back>
    <references title="Normative References">
      <?rfc include='reference.RFC.4271'?>

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

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

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

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

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

    <references title="Informative References"/>
  </back>
</rfc>
