<?xml version="1.0" encoding="utf-8"?>
<!-- name="GENERATOR" content="github.com/mmarkdown/mmark Mmark Markdown Processor - mmark.miek.nl" -->
<rfc version="3" ipr="trust200902" docName="draft-ietf-idr-flowspec-traffic-compress-action-00" submissionType="IETF" category="std" xml:lang="en" xmlns:xi="http://www.w3.org/2001/XInclude" indexInclude="true" consensus="true">

<front>
<title abbrev="Flow-Spec Traffic Compress Action">BGP Flow-Spec Traffic Compress Action</title><seriesInfo value="draft-ietf-idr-flowspec-traffic-compress-action-00" stream="IETF" status="standard" name="Internet-Draft"></seriesInfo>
<author initials="K." surname="Ma" fullname="Ke Ma"><organization>CAICT</organization><address><postal><street></street>
<city>Beijing</city>
<country>China</country>
</postal><email>make@caict.ac.cn</email>
</address></author><author initials="M." surname="Shen" fullname="Ming Shen"><organization>Huawei Technologies</organization><address><postal><street>Huawei Campus, No. 156 Beiqing Road</street>
<city>Beijing</city>
<code>100095</code>
<country>China</country>
</postal><email>shenming2@huawei.com</email>
</address></author><author initials="X." surname="Huang" fullname="Xiaoying Huang"><organization>China Telecom</organization><address><postal><street></street>
<city>Beijing</city>
<country>China</country>
</postal><email>huangxy48@chinatelecom.cn</email>
</address></author><author initials="W." surname="Li" fullname="Wenyan Li"><organization>Huawei Technologies</organization><address><postal><street>Huawei Campus, No. 156 Beiqing Road</street>
<city>Beijing</city>
<code>100095</code>
<country>China</country>
</postal><email>liwenyan@huawei.com</email>
</address></author><author initials="G." surname="Wang" fullname="Guoqiang Wang"><organization>Huawei Technologies</organization><address><postal><street>Huawei Campus, No. 156 Beiqing Road</street>
<city>Beijing</city>
<code>100095</code>
<country>China</country>
</postal><email>wangguoqiang5@huawei.com</email>
</address></author><date year="2026" month="November" day="16"></date>
<area>Routing</area>
<workgroup>IDR Working Group</workgroup>
<keyword>BGP</keyword>
<keyword>Flow-Spec</keyword>
<keyword>Compression</keyword>
<keyword>Extended Community</keyword>
<keyword>FSv2</keyword>

<abstract>
<t>BGP Flow Specification Version 2 (FSv2) provides an extensible framework for
disseminating traffic flow specification rules and associated actions. While
traditional Flow-spec actions cover rate-limiting, redirecting, and marking,
emerging applications require dynamic bandwidth optimization. This document
specifies a new traffic filtering action to support selective, on-demand
traffic compression across network domains using BGP Extended Communities
aligned with the FSv2 architecture.</t>
</abstract>

</front>

<middle>

<section anchor="sec-intro"><name>Introduction</name>
<t>BGP <xref target="RFC4271"></xref> Flow Specification <xref target="RFC8955"></xref> <xref target="RFC8956"></xref> and its evolution to
Version 2 (FSv2) specified in <xref target="I-D.ietf-idr-fsv2-ip-basic"></xref> allow for the
dissemination of traffic flow specification rules and traffic filtering
actions. Traditional Flow-spec actions define widely-used filtering behaviors
such as discard, rate limit, and traffic marking.</t>
<t>Data transmitted across enterprise networks, data centers, and external
connections varies widely in nature (e.g., database payloads, bulk text,
multimedia, and signaling). Certain traffic aggregates present significant
redundancy and high compression ratios, whereas other data streams have little
to no compression potential or require dedicated processing hardware.</t>
<t>While BGP Flow-spec enables network-wide policy distribution, static
configurations lack the agility required for dynamic data-center interconnect
(DCI) traffic engineering. Therefore, this document introduces a new BGP
Flow-spec action that enables network operators to dynamically apply traffic
compression based on granular traffic filters, saving core transport bandwidth
and improving overall network utilization.</t>

<section anchor="sec-req-lang"><name>Requirements Language</name>
<t>The key words &quot;MUST&quot;, &quot;MUST NOT&quot;, &quot;REQUIRED&quot;, &quot;SHALL&quot;, &quot;SHALL NOT&quot;,
&quot;SHOULD&quot;, &quot;SHOULD NOT&quot;, &quot;RECOMMENDED&quot;, &quot;NOT RECOMMENDED&quot;, &quot;MAY&quot;, and
&quot;OPTIONAL&quot; in this document are to be interpreted as described in
BCP 14 <xref target="RFC2119"></xref> <xref target="RFC8174"></xref> when, and only when, they appear in all
capitals, as shown here.</t>
</section>
</section>

<section anchor="sec-ext-community"><name>Traffic Compress Extended Community</name>
<t>This document proposes a new BGP extended community called the &quot;flow-spec
traffic compress action&quot;. It operates as a Generic Transitive Extended
Community type (&quot;0x80&quot;). 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 aligned with FSv2 action guidelines.</t>
<t>In this extended community, the 2-byte global administrator field encodes
compression algorithms referred to as Compression Parameter Index (CPI)
<xref target="RFC3173"></xref>. The 4-byte local administrator field carries compression
parameters (CPV).</t>
<t>The new BGP extended community is encoded as follows:</t>
<figure anchor="fig-ext-community" align="center"><name>Traffic Compress Extended Community Encoding </name>
<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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|    0x80       |    Sub-Type   |             CPI               |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                             CPV                               |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
]]></artwork>
</figure>

<ul>
<li><t>Sub-Type: TBD.</t>
</li>
<li><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 endpoints in the definition of an
IPComp Association <xref target="RFC3173"></xref>.</t>
</li>
<li><t>CPV (4 octets): Parameters associated with the selected CPI. Depending on
the CPI, the CPV can be divided into distinct segments (e.g., algorithm
tuning flags, window sizes, or application IDs). Unused bits <bcp14>MUST</bcp14> be
set to zero by the originating BGP speaker and ignored upon receipt.<br />
For instance, when utilizing the zstd compression algorithm, the CPV can
be structured as: &lt;trainAppId (1 octet), CRC (2 octets), appId (1 octet)&gt;.</t>
</li>
</ul>
</section>

<section anchor="sec-operational"><name>Operational and Processing Considerations</name>

<section anchor="sec-role"><name>Role Assignment and Capability Confirmation</name>
<t>In the typical use case, the tailend node enables decompression capability and,
via BGP Flow Specification, advertises the flow specification rules together
with the Traffic Compress Extended Community. The CPI field of the action
carries the algorithm supported by the tailend node for the associated
IPComp Association.</t>
<t>Upon receiving the Flow-spec route, the headend node verifies that it locally
supports compression with the algorithm indicated in the action. If the
capability check succeeds, the Flow-spec rule is installed and the compression
action becomes effective on the matching traffic. If the headend node does not
support the indicated algorithm, the rule MUST NOT take effect, and matching
traffic MUST be forwarded uncompressed; an implementation MAY record a local
policy exception. No reverse notification of the check result is defined in
this document.</t>
<t>The tailend node thus acts as the decompression endpoint and the headend node as
the compression endpoint; the Flow-spec route propagates the compression
action from the tailend node toward the headend node.</t>
</section>

<section anchor="sec-hw-offload"><name>Compression Processing and Capability Verification</name>
<t>Flow-spec match conditions refer to the uncompressed packets. For each packet
matching the Flow-spec rule that is not already compressed, the headend node
compresses the payload using the algorithm indicated by the action and
encapsulates the compressed packet in accordance with <xref target="RFC3173"></xref> (IP protocol
number 108, IPComp). Transport mode of IPComp SHOULD be used so that the outer
IP header is preserved and can still be matched by Flow-spec rules along the
path. Packets already carrying IPComp encapsulation MUST be left unmodified.
The tailend node identifies compressed packets by the IPComp protocol number
and performs the corresponding decompression.</t>
<t>The same action may be received by more than one node, for instance when
Flow-spec routes are distributed by Route Reflectors to all PEs. In such
deployments, the rule above ensures that a packet compressed by an upstream
node is not compressed again by an intermediate node, which simply forwards it
unchanged toward the tailend node.</t>
<t>Algorithm selection is conveyed by the Flow-spec action defined in this
document rather than by the CPI negotiation procedures of <xref target="RFC3173"></xref>.</t>
<t>Because compression and decompression introduce processing overhead, nodes
receiving this action MUST verify that they possess the hardware or software
capabilities corresponding to the requested CPI. If a node lacks the requested
compression capability, it MUST fall back to standard uncompressed forwarding
or report a local policy exception, preventing packet dropping due to
processing failures.</t>
</section>
</section>

<section anchor="sec-error-handling"><name>Error Handling</name>
<t>If multiple traffic compression extended communities exist in a BGP route
attribute, the value of the first traffic compression extended community MUST
take precedence.</t>
<t>The validation of the TLVs and extended community structures introduced in
this document MUST be performed to verify formatting correctness. In case of
any malformed attributes detected, error handling MUST comply with <xref target="RFC7606"></xref>
and the error policies defined in <xref target="I-D.ietf-idr-fsv2-ip-basic"></xref>.</t>
</section>

<section anchor="sec-iana"><name>IANA Considerations</name>
<t>IANA is requested to create a new entry/registry under the &quot;Extended Community&quot;
registries:</t>

<artwork><![CDATA[   SubType   Description
   -------   ---------------------------------------------
   TBD       Traffic Compress Extended Community
]]></artwork>
</section>

<section anchor="sec-security"><name>Security Considerations</name>
<t>Traffic compression introduces potential vector risks, such as CPU exhaustion
(Denial-of-Service) attacks caused by malformed or highly inefficient payload
structures designed to trigger worst-case compression cycles. Operators SHOULD
implement rate-limiting or resource quotas on compression-enabled forwarding
engines.</t>
<t>Furthermore, standard BGP security mechanisms (such as RPKI and BGP session
authentication) MUST be deployed to prevent unauthorized injection of
compression action extended communities.</t>
</section>

<section anchor="sec-ack"><name>Acknowledgements</name>
<t>The authors would like to acknowledge the review and inputs from
Haibo Wang, Gang Yan, Linda Dunbar, Zhenbin Li, Rainbow Wu, Jie Dong
, Ziqing Cao, Lily Wang, Shunwan Zhuang, Gang Pei and Shuqiang Wang.
The authors also thank Linda Dunbar, Joel Halpern, and Bill Fenner
for their detailed review comments during the WG adoption call, which
significantly improved this document.</t>
</section>

</middle>

<back>
<references><name>References</name>
<references><name>Normative References</name>
<xi:include href="https://bib.ietf.org/public/rfc/bibxml3/reference.I-D.ietf-idr-fsv2-ip-basic.xml"/>
<xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.2119.xml"/>
<xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.3173.xml"/>
<xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.7606.xml"/>
<xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.8174.xml"/>
<xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.8955.xml"/>
<xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.8956.xml"/>
</references>
<references><name>Informative References</name>
<xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.4271.xml"/>
</references>
</references>

</back>

</rfc>
