<?xml version="1.0" encoding="US-ASCII"?>

<?xml-model href="rfc7991bis.rnc"?>

<!-- <?xml-stylesheet type="text/xsl" href="rfc2629.xslt" ?> --> 
<!-- This third-party XSLT can be enabled for direct transformations in XML processors, including most browsers -->

<!DOCTYPE rfc [
  <!ENTITY nbsp    "&#160;">
  <!ENTITY zwsp   "&#8203;">
  <!ENTITY nbhy   "&#8209;">
  <!ENTITY wj     "&#8288;">
]>

<?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"
    xmlns:xi="http://www.w3.org/2001/XInclude"
    docName="draft-zhang-idr-bgp-flowspec-extension-01"
    consensus="true"
    submissionType="IETF"
    ipr="trust200902"
    tocInclude="true"
    tocDepth="4"
    symRefs="true"
    sortRefs="true">

 <!-- ***** FRONT MATTER ***** -->

 <front>
   <!-- The abbreviated title is used in the page header - it is only necessary if the 
        full title is longer than 39 characters -->
   <title abbrev="BGP FlowSpec Extension">BGP FlowSpec Extension for Traffic Scheduling
</title>
    <seriesInfo name="Internet-Draft" value="draft-zhang-idr-bgp-flowspec-extension-01"/>

   <!-- add 'role="editor"' below for the editors if appropriate -->


   <!-- Another author who claims to be an editor -->
  <author fullname="Huiyue Zhang" initials="H." surname="Zhang">
     <organization>China Telecom</organization>
     <address>
       <email>zhanghy30@chinatelecom.cn</email>
     </address>
   </author>

   <author fullname="Zhuojun Huang" initials="Z." surname="Huang">
     <organization>China Telecom</organization>
     <address>
       <email>huangzhuoj@chinatelecom.cn</email>
     </address>
   </author>

  <author fullname="Cancan Huang" initials="C." surname="Huang">
     <organization>China Telecom</organization>
     <address>
       <email>huangcanc@chinatelecom.cn</email>
     </address>
   </author>

   <date year="2025" />

   <!-- Meta-data Declarations -->
   <area>General</area>
   <workgroup>IDR Working Group</workgroup>

   <!-- WG name at the upperleft corner of the doc,
        IETF is fine for individual submissions. 
	    If this element is not present, the default is "Network Working Group",
        which is used by the RFC Editor as a nod to the history of the IETF. -->

   <keyword>BGP</keyword>
   <keyword>FlowSpec</keyword>
   <keyword>Traffic Scheduling</keyword>
   
   <abstract>
   <t>Traditional QoS technology can not achieve fine adjustment in the traffic scheduling, and has a large amount of configuration and poor maintainability. BGP FlowSpec technology provides a wealth of filtering conditions and processing actions, using BGP network layer reachable information (NLRI) to transmit traffic filtering information, which can achieve a more fine-grained control of the traffic and improve maintainability.</t>
   <t>This document defines the extension of BGP FlowSpec, adding two new traffic filtering actions for extended community: minimum rate guarantee and congestion management, to enable better management and scheduling of traffic, and further improving the scalability and applicability of BGP FlowSpec.</t>
   </abstract>

   <note 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>
   </note>

 </front>

 <middle>
  <section title="Introduction" anchor="intro">
   <t><xref target="RFC8955"/> and <xref target="RFC8956"/> have defined commonly used traffic filtering conditions and actions for IPv4 and IPv6. The traffic filtering conditions are used as NLRI and the traffic filtering actions are used as Extended Community in BGP FlowSpec routing. <xref target="I-D.ietf-idr-flowspec-v2"/> defines BGP Flow Specification Version 2. More refined traffic management can be achieved by traffic scheduling that matches the rules through the traffic filtering conditions and the corresponding actions carried in BGP FlowSpec routes.</t>   

   <t>This document defines two new extended community for traffic filtering actions of BGP flowspec, which respectively represent the minimum rate guarantee and congestion management for the flow, in order to better realize traffic scheduling through BGP FlowSpec routes.</t>

   <section title="Terminology" anchor="terminology">
    <t>
     <list style="hanging" hangIndent="3">

      <t hangText="NLRI:  ">Network Layer Reachability Information</t>
      <t hangText="DSCP: ">Diffserv Code Point</t>
 
     </list>
    </t>
   </section>

  </section>

  <section title="Extended Community Flow Specification Actions" anchor="bgp_fs_extention">
   <t>This document defines two new extended community: minimum rate guarantee and congestion management.

  <figure><artwork><![CDATA[
    Type Vlue     Action                       Encoding
    ---------------------------------------------------------------
    TBD1    CBR (Minimum rate guarantee)   2-octet AS, 4-octet Rate

    TBD2    CM (Congestion Management)     1-octet Queue value
  ]]>
  </artwork></figure>
  </t>

   <t>The specific encoding for the first new extended community is shown as follows:

                <figure><artwork><![CDATA[
     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
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    |           TBD1                |           ASN                 |    
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    |                          Rate                                 |    
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  ]]>
  </artwork></figure>
  </t>
 
   <t>Where,</t> 

   <t>Type: 2 bytes, representing the minimum rate guarantee attribute, to be allocated by IANA.</t>

   <t>ASN: 2 bytes, representing the AS number.</t>

   <t>Rate: 4 bytes, representing the minimum guaranteed rate, expressed in IEEE floating point format, units being bytes per second. The router sets the traffic flow as fast forwarding based on this attribute, ensuring that the CBR is the Rate value.</t>
   
   <t>The specific encoding for the second new extended community defined in this document is shown as follows:

                <figure><artwork><![CDATA[
     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
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    |           TBD2                |           Queue               |    
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  ]]>
  </artwork></figure>
  </t>

   <t>Where,</t>

   <t>Type: 2 bytes, representing congestion management attribute, to be allocated by IANA.</t>

   <t>Queue: 2 byte, indicating the type used for queue scheduling. The lower three bits have values from 0 to 7, representing queues BE, AF1, AF2, AF3, AF4, EF, CS6, and CS7, corresponding to the commonly used 8 queues currently, and the other bits are reserved. After the router is configured with congestion management mechanism (which may be queue technologies such as FIFO, PQ, CQ, RTPQ, WFQ, CBQ, CBR, etc., not discussed in this document), traffic of different queue types will be forwarded according to the corresponding queue scheduling technology.</t>

  </section>

  <section title="Use Cases" anchor="use_cases">

   <t>This section describes how to use the defined new extended community in real scenarios.</t>

   <t>Example 1:</t>

   <t>The traffic with a destination address of 2.2.2.0/24 and DSCP of 3 requires a guaranteed minimum rate of 30 Mb/s. The BGP FlowSpec controller advertises a BGP route to the Ingress Router, carrying the following information.</t>

   <t>Flow Specification NLRI encoding:

  <figure><artwork><![CDATA[
    Length     Destination            DSCP
    ---------------------------------------------------------
    0x08       01 18 02 02 02         0B 81 0C
  ]]>
  </artwork></figure>
  </t>

   <t>Extended Community:

  <figure><artwork><![CDATA[
    Type         ASN                Rate
    ---------------------------------------------------------
    TBD1         00 00              01 c9 c3 80
  ]]>
  </artwork></figure>
  </t>

   <t>Parsing the NLRI encoding of the above route as the traffic filtering condition: the destination address is 2.2.2.0/24 and the DSCP is 3. Traffic that matches this condition will perform the action carried in the Extended Community: minimum traffic rate guarantee of 30M, so as to achieve traffic scheduling.</t>

   <t>Example 2:</t>

   <t>The traffic with a destination address of 192.0.2.0/24 and DSCP of 3 is set to AF2 queue. The router forwards the message according to its configured queue scheduling method. The BGP FlowSpec controller advertises a BGP route to the Ingress Router, carrying the following information.</t>

   <t>Flow Specification NLRI encoding:

  <figure><artwork><![CDATA[
    Length     Destination            DSCP
    ---------------------------------------------------------
    0x08       01 18 c0 00 02         0B 81 0C
  ]]>
  </artwork></figure>
  </t>

   <t>Extended Community:

  <figure><artwork><![CDATA[
    Type          Queue             
    ----------------------------
    TBD1          00 02           
  ]]>
  </artwork></figure>
  </t>

   <t>Parsing the NLRI encoding of the above route as the traffic filtering condition: the destination address is 192.2.2.0/24 and the DSCP is 3. Traffic that matches this condition will perform the action carried in the Extended Community: traffic queue is AF2, so as to achieve traffic scheduling.</t>

  </section>

  <section anchor="IANA" title="IANA Considerations">
  
   <t>For the purpose of this work, the following two Extended Communities require IANA assignments.</t>

   <t>TBD1 for CBR (Minimum rate guarantee, bytes).</t>

   <t>TBD2 for CM (Congestion Management).</t>

  </section>

</middle>

 <!--  *****BACK MATTER ***** -->

<back>
    <!-- References split into informative and normative -->
    <references title="References">
       <?rfc include="reference.RFC.2119.xml"?>
     <?rfc include="reference.RFC.8174.xml"?>
    <!--    <?rfc include="reference.RFC.4760.xml"?>-->
        <?rfc include="reference.RFC.8955.xml"?>
        <?rfc include="reference.RFC.8956.xml"?>
        <?rfc include="reference.I-D.ietf-idr-flowspec-v2.xml"?> 
    <!--    <?rfc include="reference.RFC.5575.xml"?>-->
    </references>

    <!--
    <section title="Acknowledgments">
    </section>
    -->
    

</back>
</rfc>

