| Internet-Draft | Destination-IP-Community Filter | October 2026 |
| Wu, et al. | Expires 11 April 2027 | [Page] |
The BGP Flow Specification (BGP-FS) mechanism propagates both traffic Flow Specifications and Traffic Filtering Actions using the BGP NLRI and Extended Community encoding formats. This document specifies a new BGP-FS component type 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 11 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 Flow Specification (BGP-FS) [RFC8955] [RFC8956] defines a BGP NLRI mechanism to distribute traffic flow filtering rules via BGP [RFC4271]. BGP-FS policies contain match conditions (which can be n-tuple packet header matches) and corresponding actions that modify, forward, or drop matching traffic. Using BGP, filtering rules can be dynamically distributed to network elements without requiring manual device reconfiguration. BGP-FS defines Network Layer Reachability Information (NLRI) formats for IPv4 unicast (AFI=1, SAFI=133) and BGP/MPLS VPNs (AFI=1, SAFI=134).¶
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 BGP-FS component type 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 Flow Specification component type encoded within the BGP Flowspec NLRI.¶
Type TBD1: Destination-IP-Community¶
Encoding: <type (1 octet), [op, value]+>¶
This component contains a set of {operator, value} pairs used to match the Destination-IP-Community associated with the destination prefix.¶
The operator byte (numeric_op) is encoded as defined in Section 4.2.1 of [RFC8955]:¶
0 1 2 3 4 5 6 7
+---+---+---+---+---+---+---+---+
| e | a | len | 0 |lt |gt |eq |
+---+---+---+---+---+---+---+---+
Where:¶
e - End-of-list bit. Set in the last {op, value} pair.¶
a - AND bit. If unset, the logical operation with the previous term is OR. If set, the operation is AND. For the Destination-IP-Community filter, the 'a' bit MUST be unset (0) unless matching multi-value community sets.¶
len - Length of the value field encoded as (1 << len). Valid lengths for Standard BGP Communities [RFC1997] are 4 octets (len=10). Future extensions MAY support 8 octets (Extended) or 12 octets (Large Communities).¶
lt - Less-than comparison between target data and value.¶
gt - Greater-than comparison between target data and value.¶
eq - Equality comparison between target data and value.¶
The comparison operators (lt, gt, eq) can be combined to evaluate a specific community or a range of communities.¶
The value field is encoded as:¶
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 +---------------------------------------------------------------+ ~ Destination-IP-Community (4 octets) ~ +---------------------------------------------------------------+
Per Section 10 of [RFC8955], if a receiving BGP speaker does not support this component type, it MUST discard the entire NLRI value containing the unknown component. Because the NLRI encoding [RFC8955] uses a 2-tuple <length, NLRI value> structure, parsing engines can skip the unknown NLRI value and continue processing subsequent NLRIs.¶
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, Extended, or Large 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 3.¶
+---------+
| 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 allocate a new component type entry in the "Flow Spec Component Types" registry under the "BGP Flow Spec NLRIs" registry group:¶
+---------+--------------------------+---------------+
| Type | Description | Reference |
+---------+--------------------------+---------------+
| TBD1 | Destination-IP-Community | This Document |
+---------+--------------------------+---------------+
¶
This specification extends BGP Flowspec NLRI matching capabilities. 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 [RFC8955] 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.¶