<?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-shen-idr-flowspec-traffic-compress-action-01"
     ipr="trust200902">
  <front>
    <title abbrev="Abbreviated-Title">BGP Flow-Spec Traffic Compress Action</title>

    <author fullname="Ming Shen" initials="M" surname="Shen">
      <organization>Huawei Technologies</organization>

      <address>
        <postal>
          <street>Huawei Campus, No. 156 Beiqing Road</street>

          <city>Beijing</city>

          <code>100095</code>

          <region/>

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

        <phone/>

        <facsimile/>

        <email>shenming2@huawei.com</email>
      </address>
    </author>
    <author fullname="Wenyan Li" initials="W" surname="Li">
      <organization>Huawei Technologies</organization>

      <address>
        <postal>
          <street>Huawei Campus, No. 156 Beiqing Road</street>

          <city>Beijing</city>

          <code>100095</code>

          <region/>

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

        <phone/>

        <facsimile/>

        <email>liwenyan@huawei.com</email>
      </address>
    </author>

    <author fullname="Lili Wang" initials="L" surname="Wang">
      <organization>Huawei Technologies</organization>

      <address>
        <postal>
          <street>Huawei Campus, No. 156 Beiqing Road</street>

          <city>Beijing</city>

          <code>100095</code>

          <region/>

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

        <phone/>

        <facsimile/>

        <email>lily.wong@huawei.com</email>
      </address>
    </author>
    <author fullname="Guoqiang Wang" initials="G" surname="Wang">
      <organization>Huawei Technologies</organization>

      <address>
        <postal>
          <street>Huawei Campus, No. 156 Beiqing Road</street>

          <city>Beijing</city>

          <code>100095</code>

          <region/>

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

        <phone/>

        <facsimile/>

        <email>wangguoqiang5@huawei.com</email>
      </address>
    </author>
    <date day="22" month="October" year="2023"/>

    <abstract>
      <t>Flow-spec is an extension to BGP that allows for the dissemination
      of traffic flow specification rules and traffic filtering actions.
      This document specifies a new traffic filtering action to support
      compressing traffic.</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 <xref
      target="RFC2119">RFC 2119</xref>.</t>
    </note>
  </front>

  <middle>
    <section title="Introduction">
      <t>Flow-spec <xref target="RFC8955"></xref> <xref target="RFC8956"></xref> is an extension to BGP that allows
      for the dissemination of traffic flow specification rules and traffic
      filtering actions. The flow-spec standard defines widely-used filter
      actions such as discard, rate limit, traffic marking and so on.</t>

      <t>Data transmitted on the enterprise network, data center, office,
      and external connections is inconsistent. The data may be text, audio,
      or video.</t>

      <t>The BGP flowSpec extension allows traffic filters to be distributed
      to routers on the entire network. However, some nodes are suitable for
      compression and have a large compression ratio. Some nodes have no
      compression space. Some nodes have no compression or decompression capabilities.
      Therefore, a new traffic action needs to be added to
      selectively compress different traffic based on the existing traffic filters.</t>

      <t>For example, database data is transmitted between financial data centers.
      We need to compress the data of different network nodes to save bandwidth.</t>

      <t>This document specifies a new traffic filtering action that provides a
      method of traffic compressing. The details of the action, including
      compression algorithms, are encoded in newly defined BGP extended
      communities</t>
    </section>

    <section title="Traffic compress Extended Community">
      <t>This document proposes a new BGP extended community called the
      "flow-spec traffic compress action". It has a Generic Transitive
      Extended Community type "0x80". The sub-type value [to be assigned by IANA]
      indicates that the global administrator and local administrator
      fields encode a flow-spec traffic compress action. In the new extended
      community the 2-byte global administrator field encodes compression
      algorithms called Compression Parameter Index (CPI) [ RFC-3173].
      And the 4-byte local administrator field is reserved for future use.</t>

      <t>This new BGP extended community is encoded as follows :</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 
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|    0x80    |    Sub-Type   |                CPI               |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                          RESERVED                             |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+]]></artwork>
        </figure><list style="symbols">
          <t>Sub-Type: TBD.</t>

          <t>CPI: 2 octets. The values 0-63 designate well-known compression
          algorithms.The values 64-255 are reserved for future use. The values
          256-61439 are negotiated between the two nodes in definition of 
          an IPComp Association<xref target="RFC3173"></xref>.</t>

          <t>RESERVED: 4 octets. All bits in the local administrator field MUST
          be set to 0 by the originating BGP speaker and ignored by receiving
          BGP speakers.</t>
        </list>
      </t>
      
      <t>Generally, the receive end of Flowspec Traffic Compress Extended
      Communityfunctions as the compressing end and the transmit end
      functions as the decompressing end. In addition, the CPI can be
      delivered through the controller or other devices. In this case,
      the traffic receiver must have the decompression capability corresponding
      to the traffic compression extended community.</t>
    </section>

    <section title="Error Handling">
      <t>If multiple traffic compression extended communities exist in
      the BGP route attribute, the value of the first traffic compression
      extended community must be used.</t>

      <t>The validation of the TLVs/sub-TLVs introduced in this document
      and defined in their respective sub-sections of Section 2 MUST
      be performed to determine if they are malformed or invalid.
      In case of any error detected, the error handling should
      comply with <xref target="RFC7606"></xref>.</t>
    </section>

    <section anchor="IANA" title="IANA Considerations">
      <t>This document requests the creation of a new registry called
      "Traffic compress Extended Community" under the "Extended Community"
      registry.</t>

      <t><figure align="center">
          <artwork><![CDATA[SubType  Description
-------  -------------------------------
  TBD    Traffic compress Extended Community
]]></artwork>
        </figure></t>
    </section>

    <section anchor="Security" title="Security Considerations">
      <t>There are no additional security risks introduced by this design.</t>
    </section>

    <section anchor="Acknowledgements" title="Acknowledgements">
      <t/>
    </section>
  </middle>

  <back>
    <references title="Normative References">
      <?rfc include="reference.RFC.2119"?>
    </references>
    <references title="References">
      <?rfc include="reference.RFC.8955"?>
    </references>

    <references title="References">
      <?rfc include="reference.RFC.8956"?>
    </references>
    <references title="References">
      <?rfc include="reference.RFC.3173"?>
    </references>
    <references title="References">
      <?rfc include="reference.RFC.7606"?>
    </references>
  </back>
</rfc>
