<?xml version="1.0" encoding="US-ASCII"?>
<!-- This template is for creating an Internet Draft using xml2rfc,
     which is available here: http://xml.resource.org. -->
<!DOCTYPE rfc SYSTEM "rfc2629.dtd" [
<!-- One method to get references from the online citation libraries.
     There has to be one entity for each item to be referenced.
     An alternate method (rfc include) is described in the references. -->
<!ENTITY RFC2119 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.2119.xml">
<!ENTITY RFC6241 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.6241.xml">
<!ENTITY RFC7950 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.7950.xml">
<!ENTITY RFC7149 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.7149.xml">
<!ENTITY RFC7426 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.7426.xml">
<!ENTITY RFC8299 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.8299.xml">
<!ENTITY RFC8309 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.8309.xml">
<!ENTITY RFC8340 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.8340.xml">
<!ENTITY RFC8453 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.8453.xml">
<!ENTITY RFC8174 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.8174.xml">
<!ENTITY RFC8345 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.8345.xml">
]>
<?xml-stylesheet type='text/xsl' href='rfc2629.xslt' ?>
<!-- used by XSLT processors -->
<!-- For a complete list and description of processing instructions (PIs),
     please see http://xml.resource.org/authoring/README.html. -->
<!-- Below are generally applicable Processing Instructions (PIs) that most I-Ds might want to use.
     (Here they are set differently than their defaults in xml2rfc v1.32) -->
<?rfc strict="yes" ?>
<!-- give errors regarding ID-nits and DTD validation -->
<!-- control the table of contents (ToC) -->
<?rfc toc="yes"?>
<!-- generate a ToC -->
<?rfc tocdepth="4"?>
<!-- the number of levels of subsections in ToC. default: 3 -->
<!-- control references -->
<?rfc symrefs="yes"?>
<!-- use symbolic references tags, i.e, [RFC2119] instead of [1] -->
<?rfc sortrefs="yes" ?>
<!-- sort the reference entries alphabetically -->
<!-- control vertical white space
     (using these PIs as follows is recommended by the RFC Editor) -->
<?rfc compact="yes" ?>
<!-- do not start each main section on a new page -->
<?rfc subcompact="no" ?>
<!-- keep one blank line between list items -->
<!-- end of list of popular I-D processing instructions -->
<rfc category="std" docName="draft-he-idr-bgp-ec-sr-pm-00"
     ipr="trust200902">
  <front>
    <title>BGP Extended Communities for SR Policy Performance Metrics</title>

    <author fullname="Xiaoming He" initials="X." surname="He">
      <organization>China Telecom</organization>

      <address>
        <email>hexm4@chinatelecom.cn</email>
      </address>
    </author>
    
    <author fullname="Xiaoying Huang" initials="X." surname="Huang">
      <organization>China Telecom</organization>

      <address>
        <email>huangxy48@chinatelecom.cn</email>
      </address>
    </author>

    <date year="2026"/>

    <area>IPPM</area>

    <workgroup>IDR Working Group</workgroup>

    <keyword>SR Policy Performance Metric</keyword>

    <abstract>
      <t>Traffic scheduling and optimization have become routine network operation and maintenance tasks for operators.  
      The operators need to select a path that can meet the Qality of Service (QoS) reqiurements of the traffic to be scheduled.</t>
      
      <t>This document defines four BGP extended communities for Segment Routing (SR) candidate path performance metric: the Available Bandwidth
   Extended Community, the Unidirectional Delay
   Extended Community, the Unidirectional Delay Variation Extended Community and the Unidirectional Loss
   Extended Community, which carry SR Policy candidate path performance parameters for the operators to select a preferred path for traffic scheduling and optimization. It also specifies the
   format and processing rules for these extended community types.</t>
    </abstract>
  </front>

  <middle>
    <section anchor="Introduction" title="Introduction">
      <t>Traffic scheduling and optimization have become routine network operation and maintenance tasks for operators.  
      The operators need to select a path that can meet the Qality of Service (QoS) reqiurements of the traffic to be scheduled.</t>

      <t>RFC9256 specifies Segment Routing (SR) Policy architecture. An SR Policy consists of one or more Candidate Paths (CPs) of which at a given time
   only one may be active (i.e., installed in forwarding and
   usable for the steering of traffic). Each candidate path may
   comprise one or more segment lists.  BGP [RFC9830] can be used to advertise
   SR Policies to the SR Policy headend nodes in the network.  After
   an active SR Policy CP is installed on the headend node, packets can be
   steered into the SR Policy.</t>

	<t>RFC9857 describes a mechanism used to collect SR Policy configuration and state information that is locally available in an SR Policy headend node and
   advertise it into BGP - Link State (BGP-LS) updates.  Such
   information can be used by external components (e.g., the controllers) for path computation,
   reoptimization, service placement, network visualization, etc. [I-D.he-idr-bgpls-sr-policy-pm] defines several TLVs to advertise the performance metrics
   for SR Policy using BGP-LS. It complements RFC9857 for the advertisement of SR Policy performance metrics.</t>


     <t>In scenarios across Autonomous System (AS) domains, such as Cloud Data Center (DC) or Metropolitan Area Network (MAN), 
      which needs to choose a better one from multiple backbone networks that can meet the QoS reqiurements for traffic scheduling and optimization. 
      Therefore, it needs to collect SR Policy CP performance parameters from different backbone networks, which can be compared to determine the preferred path. 
      How SR Policy CP performance parameters is computed or measured is out of scope of this document. Refer to [I-D.he-idr-bgpls-sr-policy-pm], which outlines several measurement methods.
      The comparison factors for the path selection can be the available bandwidth of the path, path delay, path loss, or a combination thereof. The specific comparison methods are out of the scope of this document.</t>

    <t>This document defines four BGP extended communities for SR Policy CP performance metric: the Available Bandwidth
   Extended Community, the Unidirectional Delay
   Extended Community, the Unidirectional Delay Variation Extended Community and the Unidirectional Loss
   Extended Community, which carry SR Policy CP performance parameters for the operators to select a preferred path for traffic scheduling and optimization. It also specifies the
   format and processing rules for these extended community types.</t>
   
    </section>

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

	<section title="Terminology">
      <t>Abbreviations used in this document:</t>
      <t>AS:     	Autonomous System</t>
      <t>BGP:     	Border Gateway Protocol</t>
      <t>BGP-LS:    Border Gateway Protocol-Link State</t>
      <t>CP:     	Candidate Path</t>
      <t>DC: 		Data Center</t>
	 <t>MAN:     	Metropolitan Area Network</t>
      <t>MPLS:     	Multi-Protocol Label Switching</t>      
      <t>QoS:     	Quality of Service</t>
      <t>P:     	Provider</t>
      <t>PE:     	Provider Edge</t>
      <t>RIB:		Routing Information Base</t>
      <t>SR-MPLS:   Segment Routing over Multi-Protocol Label Switching</t>
     </section>
    </section>
    
    <section title="Use Case of the Extended Communities ">        
      <t>With the rapid growth in demand for computing and storage resources
   in AI big models and distributed storage, cloud computing
   centers are interconnected through backbone networks to
   provide multi-Data Centers (DCs) collaboration to compensate for the limitations of
   insufficient computing and storage resources in a single DC, and
   improve resource utilization. At the same time, one MAN also needs to connect another MAN or DC through backbone networks to provide virtual private line services or public internet access.</t>

	 <t>In multiple network domain scenario as depicted in Figure 1, the cloud DC or MAN Gateways are connected to multiple backbone networks to schedule traffic for the purpose of load balancing and path optimization.
	 <figure title="Traffic Scheduling and Optimization among Multiple Backbone Networks">
          <artwork>
BGP Update Carrying +---------------------------------------------------+        
Extended Communities|   +----------+     +--------+      +----------+   |BGP Update
      +-------------|---|Ingress PE|-----|P1...Pn |------|Egress PE |&lt;--|---------+
      |             |   +----------+     +--------+      +----------+   |         |
      |             |             IP Internet backbone network          |         |
      |             +---------------------------------------------------+         |
      |             +---------------------------------------------------+         |
 +----v--------+    |   +----------+     +--------+      +-----------+  |   +-----+-------+
 | Cloud DC    |&lt;---|---|Ingress PE|-----|P1...Pn |------|Egress PE  |&lt;-----| Cloud DC    |
 |    OR       |    |   +----------+     +--------+      +-----------+  |   |    OR       |              
 | MAN Gateway |    |                                                   |   | MAN Gateway |
 +----^--------+    |                 Cloud backbone network            |   +-----+-------+
      |             +---------------------------------------------------+         |                        
      |             +---------------------------------------------------+         |
      |             |   +----------+     +--------+      +----------+   |         |
      +-------------|---|Ingress PE|-----|P1...Pn |------|Egress PE |&lt;--|---------+
BGP Update Carrying |   +----------+     +--------+      +----------+   | BGP Update       
Extended Communities|              SR-MPLS backbone network             |        
                    +---------------------------------------------------+
               </artwork>
        </figure></t>

	  <t>Since these networks belong to different administrative domain with differnet AS number, 
	  it is reqiured to provide a mechanism for the cloud DCs or MANs to obtain SR Policy CP performance metric information from backbone networks, 
	  In Figure 1, three backbone networks all support SR Policy, and are capable to deploy SR tunnels. When they propagate BGP routes from the destination cloud DCs or MANs to
	  the source cloud DCs or MANs, if these BGP Updates can carry the Extended Communities with SR Policy CP performance parameters, 
	  then the source cloud DCs or MANs can compare multiple routes for the same destination prefixs and choose the best one that is installed in Routing Information Base (RIB). 
	  Consequently, the traffic is forwarded to the specified backbone network, where the headend node (Ingress PE) can steer the traffic based on the destination address into the SR Policy tunnel.</t>

	  <t>For example, in Figure 1, the Cloud backbone network is getting congested 
	  and partial traffic needs to be scheduled to other backbone networks. The operators of the source cloud DC pick out a 2 Gb/s traffic with a destination prefix of 2001: db8: b: 1::/64 for the destination cloud DC,
	  and prioritize selecting the shortest delay path while ensuring bandwidth.
	  The headend node (Ingress PE) of IP Internet backbone network has installed a SR Policy 1 for the destination prefix 2001:db8:b:1::/64, with 3 Gb/s available bandwidth and 3 ms path delay. 
	  The headend node (Ingress PE) of SR-MPLS backbone network has installed a SR Policy 2 for the destination prefix 2001:db8:b:1::/64, with 2.5 Gb/s available bandwidth and 2 ms path delay. 
	  When the source cloud DC receives two BGP routes from IP Internet backbone network and SR-MPLS backbone network respectively: one carrying the Available Bandwidth Extended Community with the value of 3 Gb/s 
	  and the Unidirectional Delay Extended Community with the value of 3 ms; another carrying the Available Bandwidth Extended Community with the value of 2.5 Gb/s 
	  and the Unidirectional Delay Extended Community with the value of 2 ms, the source cloud DC then compares the two BGP routes and selects the second to install into the local RIB.</t>  
	</section>
	
    <section title="Extended Communities for SR Policy CP Performance Metrics">
	 <t>This section defines four Extended Communities for SR Policy CP Performance Metric that can be attached to a BGP Update. They are the Available Bandwidth
   Extended Community, the Unidirectional Delay
   Extended Community, the Unidirectional Delay Variation Extended Community and the Unidirectional Loss
   Extended Community, which carry SR Policy CP performance parameters. These Extended Communities are used to inform other networks about SR Policy CP performance parameters in local network. 
   Consequently, the networks receiving these BGP routes can determine the optimal path selection.</t>
   
 	<t>These Extended Communities can be transitive. Therefore, for each Extended Community, the value of the high-order octet of the
   extended Type field can be 0x00, and the value of
   the low-order octet of the extended Type field needs to be allocated by IANA.</t> 

      <section title="Available Bandwidth Extended Community">
      <t>The Available Bandwidth Extended Community uses the following Extended
   Community encoding:
	<figure title="Available Bandwidth Extended Community">
        <artwork>
    0                   1                   2                   3
    0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |   Type=0x00   |  SubType=TBA  |      Global Administrator     |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |          Local Administrator (Available Bandwidth)            |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
        </artwork>
        </figure></t>

      <t>Type:  A 1-octet field that MUST be set to 0x00 to indicate transitive.</t>

      <t>SubType:  A 1-octet field (TBA) that indicates "Available Bandwidth".</t>

	 <t>Global Administrator sub-field:  the 2-octet id, which can be assigned from
   a 2-octet AS number. When a 4-octet AS number is locally present,
   the 2 least significant octets of such an AS number can be used.</t>

      <t>Local Administrator sub-field:  the 4-octet field. This field carries the available bandwidth (in unit of bytes per second)
      of a SR Policy CP over a configurable interval, encoded in IEEE floating-point format of [IEEE.754-2019].</t>     
	 </section>

      <section title="Unidirectional Delay Extended Community">
      <t>The Unidirectional Delay Extended Community uses the following Extended
   Community encoding:
	<figure title="Unidirectional Delay Extended Community">
        <artwork>
    0                   1                   2                   3
    0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |   Type=0x00   |  SubType=TBA  |      Global Administrator     |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |          Local Administrator (Unidirectional Delay)           |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
        </artwork>
        </figure></t>

      <t>Type:  A 1-octet field that MUST be set to 0x00 to indicate transitive.</t>

      <t>SubType:  A 1-octet field (TBA) that indicates "Unidirectional Delay".</t>

	 <t>Global Administrator sub-field:  the 2-octet id, which can be assigned from
   a 2-octet AS number. When a 4-octet AS number is locally present,
   the 2 least significant octets of such an AS number can be used.</t>

      <t>Local Administrator sub-field:  4-octet unsigned integer field that carries the average unidirectional delay (in unit of
      microseconds) of a SR Policy CP over a configurable interval.</t>     
	 </section>

      <section title="Unidirectional Delay Variation Extended Community">
      <t>The Unidirectional Delay Extended Variation Community uses the following Extended
   Community encoding:
	<figure title="Unidirectional Delay Variation Extended Community">
        <artwork>
    0                   1                   2                   3
    0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |   Type=0x00   |  SubType=TBA  |      Global Administrator     |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |     Local Administrator (Unidirectional Delay Variation)      |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
        </artwork>
        </figure></t>

      <t>Type:  A 1-octet field that MUST be set to 0x00 to indicate transitive.</t>

      <t>SubType:  A 1-octet field (TBA) that indicates "Unidirectional Delay Variation".</t>

	 <t>Global Administrator sub-field:  the 2-octet id, which can be assigned from
   a 2-octet AS number. When a 4-octet AS number is locally present,
   the 2 least significant octets of such an AS number can be used.</t>

      <t>Local Administrator sub-field:  4-octet unsigned integer field that carries the average unidirectional delay Variation (in unit of
      microseconds) of a SR Policy CP over a configurable interval.</t>     
	 </section>

      <section title="Unidirectional Loss Extended Community">
      <t>The Unidirectional Loss Extended Community uses the following Extended
   Community encoding:
	<figure title="Unidirectional Loss Extended Community">
        <artwork>
    0                   1                   2                   3
    0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |   Type=0x00   |  SubType=TBA  |      Global Administrator     |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |          Local Administrator (Unidirectional Loss)            |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
        </artwork>
        </figure></t>

      <t>Type:  A 1-octet field that MUST be set to 0x00 to indicate transitive.</t>

      <t>SubType:  A 1-octet field (TBA) that indicates "Unidirectional Loss".</t>

	 <t>Global Administrator sub-field:  the 2-octet id, which can be assigned from
   a 2-octet AS number. When a 4-octet AS number is locally present,
   the 2 least significant octets of such an AS number can be used.</t>

      <t>Local Administrator sub-field:  4-octet unsigned integer field that carries the average unidirectional loss as a
      percentage of the total traffic sent over a configurable interval. This field is restricted to
   [0x00000000,0xffffffff], with value 0x00000000 indicating a packet loss of
   0%, and value 0xffffffff indicating a packet loss of 100%. The resolution is 0.00023ppm.</t>     
	 </section>
	</section>

	<section title="Protocol Procedures and Error Handling">
	<t>Implementations SHOULD provide
   the configuration to set the transitivity type of these 
   Extended Communities, as well as the values in the Global Administrator and the Local Administrator sub-field, by using local policy.</t> 
	
	<t>One or more Extended Communities MAY be attached or updated for a
   BGP route upon receipt during Adj-RIB-In processing.  Similarly, one or more
    Extended Communities MAY be attached or updated for a BGP
   route's Adj-RIB-Out entry while being advertised to a neighboring BGP speaker. </t>

   	<t>When a BGP speaker receives multiple same BGP routes carrying different Extended Communities,  
   	it SHOULD NOT use these Extended Communities as BGP best path selection factors to determine a preferred route. 
   	But it MAY influence BGP best path selection results by modifying path selection factors, 
   	such as LOCAL_PREF value or AS_PATH length, based on comparison of these Extended Communities.</t> 

   	<t>If a BGP speaker receives a route with more than one Available Bandwidth
   Extended Community, it SHOULD use the extended community with the lowest
   bandwidth value (including zero). Implementations MAY provide configuration to change the above
   preference.</t>

    <t>If a BGP speaker receives an Available Bandwidth Extended Community that contains a
   negative bandwidth value, this Available Bandwidth Extended Community SHALL be ignored.</t>

    <t>Available Bandwidth Extended Communities with a zero value SHOULD NOT be considered malformed.</t>

    <t>If a BGP speaker receives a route with more than one Unidirectional Delay/Delay Variation/Loss 
   Extended Community, it SHOULD use all these extended communities. Since a SR policy CP may have multiple Segment Lists, 
   each containing Delay/Delay Variation/Loss value measured.</t>
    </section>
   
    <section anchor="IANA" title="IANA Considerations">
        <t>IANA has defined a "Transitive Two-Octet AS-Specific Extended Community Sub-Types
      [IANA-BGP-EC-TRANS-TWO-OCTET-AS]" Registry.</t>  

        <t>IANA is requested to allocate the following Sub-Type from the
        "Transitive Two-Octet AS-Specific Extended Community Sub-Types
      [IANA-BGP-EC-TRANS-TWO-OCTET-AS]" registry:
     <artwork>
   +================+===================================+===============+
   | Sub-Type       | Name                              | Reference     |
   +================+===================================+===============+
   | TBA            | Available Bandwidth               | This document |
   +----------------+-----------------------------------+---------------+
   | TBA            | Unidirectional  Delay             | This document |
   +----------------+---------------------------------------------------+
   | TBA            | Unidirectional  Delay Variation   | This document |
   +----------------+---------------------------------------------------+
   | TBA            | Unidirectional  Loss              | This document |
   +----------------+-----------------------------------+---------------+    
     </artwork></t>
      </section>

    <section anchor="scecurity" title="Security Considerations">
      <t>The security considerations of BGP Extended Communities are discussed in
      [RFC4360], and the BGP Extended Communities for SR Policy Performance Metric defined in this document have similar security implications as RFC4360.</t>

      <t>The BGP Extended Communities for SR Policy Performance Metric convey SR Policy CP Performance
   information that may be sensitive.  Exporting this communities outside
   of an administrative domain can expose private network resource
   details.  When propagating the routes with these Extended
   Community towards an untrusted network or outside of an
   administrative domain, it is RECOMMENDED operators use policy to
   filter out them.</t>

      <t>When the BGP Extended Communities carrying SR Policy performance metrics are advertised, it is RECOMMENDED that
   implementations provide mechanisms to limit the churn caused by
   frequently changing performance values, because rapid fluctuations
   could impact protocol stability and network operations.</t>
    </section>
  </middle>

  <back>
    <references title="Normative References">
      <?rfc include="reference.RFC.2119.xml"?>
      
      <?ieee include="reference.IEEE.754.2019.xml"?>

      <?rfc include="reference.RFC.8174.xml"?>

      <?rfc include="reference.RFC.9256.xml"?>

	 <?rfc include="reference.RFC.4360.xml"?>
    </references>

    <references title="Informative References">
      <?rfc include="reference.RFC.9830.xml"?>
      
      <?rfc include="reference.RFC.9857.xml"?>
      
   	<?rfc include="reference.I-D.he-idr-bgpls-sr-policy-pm.xml"?>     
    </references>
  </back>
</rfc>