| Internet-Draft | Destination-IP-Community Filter | October 2026 |
| Wu, et al. | Expires 16 April 2027 | [Page] |
BGP Flow Specification Version 2 (FSv2) propagates both traffic Flow Specifications and Traffic Filtering Actions using an extensible TLV-based filter family architecture. This document specifies a new FSv2 component type under the Routing Filter Family to support community-level filtering. The match condition evaluates the BGP Community attribute associated with the destination IP address encoded in the Flowspec NLRI. This mechanism is intended for deployment within a single administrative domain.¶
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 [RFC2119] [RFC8174] when, and only when, they appear in all capitals, as shown here.¶
This Internet-Draft is submitted in full conformance with the provisions of BCP 78 and BCP 79.¶
Internet-Drafts are working documents of the Internet Engineering Task Force (IETF). Note that other groups may also distribute working documents as Internet-Drafts. The list of current Internet-Drafts is at https://datatracker.ietf.org/drafts/current/.¶
Internet-Drafts are draft documents valid for a maximum of six months and may be updated, replaced, or obsoleted by other documents at any time. It is inappropriate to use Internet-Drafts as reference material or to cite them other than as "work in progress."¶
This Internet-Draft will expire on 16 April 2027.¶
Copyright (c) 2026 IETF Trust and the persons identified as the document authors. All rights reserved.¶
This document is subject to BCP 78 and the IETF Trust's Legal Provisions Relating to IETF Documents (https://trustee.ietf.org/license-info) in effect on the date of publication of this document. Please review these documents carefully, as they describe your rights and restrictions with respect to this document. Code Components extracted from this document must include Revised BSD License text as described in Section 4.e of the Trust Legal Provisions and are provided without warranty as described in the Revised BSD License.¶
BGP [RFC4271] Flow Specification, originally defined in [RFC8955] [RFC8956], has evolved to Flow Specification Version 2 (FSv2) as specified in [I-D.ietf-idr-fsv2-ip-basic]. FSv2 introduces an extensible, TLV-based filter family architecture with explicit rule ordering and modular components.¶
In large-scale networks, configuring individual Flowspec rules based on explicit destination IP prefix matches can lead to severe TCAM and control-plane entry scale bottlenecks. This document specifies a new FSv2 component type under the Routing Filter Family to support community-level filtering. The match field targets the BGP Community attribute of the destination IP prefix. This functionality is designed to operate within a single administrative domain.¶
This document defines a new FSv2 component encoded within the Routing Filter Family (Type 1400). Unlike legacy FSv1 raw byte streams, FSv2 utilizes explicit TLV formatting.¶
This document defines a new Flow Specification component type encoded within the BGP Flowspec NLRI.¶
Encoding format for the DIP COM component:¶
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 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Flags | Type (300) | Length | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | <[numeric_op, Destination-IP-Community]+> | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
Where:¶
Flags (4 bits): Defined in FSv2 specifications.¶
Type (12 bits): Set to 300 for DIP COM.¶
Length (16 bits): Length of the value field in octets.¶
<[numeric_op, Destination-IP-Community]+>: Contains a list of {numeric_op, Destination-IP-Community} pairs that are used to match the Destination-IP-Community.¶
numeric_op: This component uses the Numeric Operator (numeric_op) described in Section 4.1.1 of [I-D.ietf-idr-fsv2-ip-basic], Type 300 component values SHOULD be encoded as 4 octets (numeric_op len=10).¶
Destination-IP-Community (32 bits): BGP Community value to match.¶
The implementation of Destination-IP-Community filtering relies on a cross-coupling mechanism between the Unicast BGP Forwarding Table (FIB) and the Flowspec Packet Inspection Engine. The detailed processing workflow is defined in the following three steps:¶
Control-Plane Community Dissemination and FIB Tagging: When a BGP speaker receives unicast BGP routes carrying BGP Communities (e.g., Standard Communities), and those routes are selected as best paths and installed into the Forwarding Information Base (FIB), the local system MUST preserve the associated BGP Community attributes (or a local mapped metadata tag representing the Community) within the corresponding FIB entries. For example:¶
Flowspec Rule Installation: When a BGP Flowspec rule containing the Destination-IP-Community component is received, the system programs a filtering rule into the forwarding hardware. The match parameters include both standard RFC 8955/8956 n-tuples (e.g., Destination IP, Source IP, Protocol, Port) and the target Community value specified in the Destination-IP-Community component (denoted as COMM_Rule, e.g., 64597:1).¶
Datapath Two-Stage Packet Matching:¶
Upon receiving a data packet:¶
The device evaluates the packet against installed Flowspec rules.¶
If a candidate rule contains a Destination-IP-Community match condition, the forwarding engine performs a FIB lookup using the packet's Destination IP address to extract the associated FIB entry's Community attribute (denoted as COMM_FIB).¶
Evaluation:¶
If COMM_FIB matches COMM_Rule (e.g., both are 64597:1), the Destination-IP-Community match condition is satisfied, and the configured Flowspec action (e.g., redirect, drop, rate-limit) is executed.¶
If COMM_FIB does not match COMM_Rule (e.g., COMM_FIB is 64597:2 while COMM_Rule is 64597:1), the match condition fails, and packet processing continues to subsequent rules or default forwarding.¶
This section illustrates a representative operational scenario for community-level traffic steering. Consider the topology in Figure 2.¶
+---------+
| BGP FS |
| Server |
+----|----+
|
|
/
/
************/************
* / *
IP Prefix 61 * / AS64597 * IP Prefix 81 (Comm 1:1)
* / * IP Prefix 82 (Comm 1:1)
+-------+ * +---+/ +---+ * +-------+
|AS64596+--------+ R1+---------+ R2|-------+AS64598|
+-------+ * +-+-+\ +---+ */ +-------+
* \ |\ /
* \ | \ /*
* \ | /\*
* \ | / \ IP Prefix 91 (Comm 1:1)
* \ |/ *\ IP Prefix 92 (Comm 1:1)
* \ +-+-+ * \ +-------+
* \-+ R3+-------+AS64599|
* +---+ * +-------+
* *
*************************
In AS64597, ISP operator policy requires redirecting all traffic from IP Prefix 61 bound for AS64598 and AS64599 to traverse R3 first.¶
Using traditional BGP Flowspec rules, router R1 requires multiple "Destination Prefix + Source Prefix" filter entries:¶
+--------------+--------------+-------------------------+
| Destination | Source Prefix| Redirect to IP Nexthop |
| Prefix | | |
+--------------+--------------+-------------------------+
| IP Prefix 81 | IP Prefix 61 | R3 |
+--------------+--------------+-------------------------+
| IP Prefix 82 | IP Prefix 61 | R3 |
+--------------+--------------+-------------------------+
| IP Prefix 91 | IP Prefix 61 | R3 |
+--------------+--------------+-------------------------+
| IP Prefix 92 | IP Prefix 61 | R3 |
+--------------+--------------+-------------------------+
| More prefixes... |
+--------------+--------------+-------------------------+
Using the Destination-IP-Community filter defined in this document, the operator configures a single "Destination Community + Source Prefix" rule on R1:¶
+--------------+--------------+-------------------------+
| Destination | Source Prefix| Redirect to IP Nexthop |
| Community | | |
+--------------+--------------+-------------------------+
| 1:1 | IP Prefix 61 | R3 |
+--------------+--------------+-------------------------+
This mechanism significantly reduces control-plane propagation state and hardware TCAM resource usage on network processors.¶
IANA is requested to make the following allocations under the BGP Flow Specification Version 2 (FSv2) registries defined in [I-D.ietf-idr-fsv2-ip-basic]:¶
FSv2 Routing Filter Family Component Types Registry: +------+------------------------------------+---------------+ | Type | Description | Reference | +------+------------------------------------+---------------+ | 300 | DIP COM (Destination-IP-Community) | This document | +------+------------------------------------+---------------+¶
This specification extends BGP Flow Specification Version 2 (FSv2) matching capabilities. All security considerations defined in [I-D.ietf-idr-fsv2-ip-basic] apply.¶
Unauthorized injection or modification of Destination-IP-Community Flowspec rules could lead to traffic misdirection, unexpected dropping, or Denial-of-Service (DoS) conditions.¶
To mitigate these risks:¶
This feature MUST be restricted to a single administrative domain or strictly trusted peer boundaries.¶
BGP speakers MUST filter or strip this Flowspec component type at eBGP domain boundaries unless explicitly allowed by bilateral policy.¶
Standard BGP Flowspec validation procedures MUST be enforced to prevent unauthorized prefix rule propagation.¶
The following people made significant contributions to this document:¶
Jun Ge Huawei Technologies Email: jack.gejun@huawei.com Xiangfeng Ding Huawei Technologies Email: dingxiangfeng@huawei.com¶
TBD.¶