| Internet-Draft | Destination-IP-Origin-AS Filter | October 2026 |
| Wang, et al. | Expires 16 April 2027 | [Page] |
This document defines an extension to the Border Gateway Protocol (BGP) Flow Specification Version 2 (FSv2) defined in [draft-ietf-idr-fsv2-ip-basic] to enable filtering based on the Origin Autonomous System (AS) of the destination IP address. This extension is particularly useful in mitigating Distributed Denial of Service (DDoS) attacks or optimizing traffic redirection where the target IP addresses are numerous or rapidly changing, but belong to a specific destination Origin AS.¶
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] and [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 certain DDoS mitigation and traffic engineering scenarios, an operator may need to apply rate-limiting, redirection, or filtering to traffic destined for a particular network (Autonomous System), even when the specific target IP prefixes within that AS are numerous or rapidly changing. Manually updating hundreds of prefix-based FlowSpec rules is inefficient and consumes significant Hardware Forwarding Information Base (FIB) / TCAM resources. This document introduces a new FSv2 component under the Routing Filter Family that allows operators to use the Destination Origin AS as a matching criterion.¶
This document proposes a new FSv2 component encoded within the Routing Filter Family (Type 1400). Unlike legacy FSv1 raw byte streams, FSv2 utilizes explicit TLV formatting.¶
Encoding format for the DIP-AS 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 (100) | Length | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | <[numeric_op, Destination-IP-Origin-AS]+> | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
Where:¶
Flags (4 bits): Defined in FSv2 specifications.¶
Type (12 bits): Set to 100 for DIP-AS.¶
Length (16 bits): Length of the value field in octets.¶
<[numeric_op, Destination-IP-Origin-AS]+>: Contains a list of {numeric_op, Destination-IP-Origin-AS} pairs that are used to match the Destination-IP-Origin-AS.¶
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 100 component values SHOULD be encoded as 4 octets (numeric_op len=10).¶
Destination-IP-Origin-AS (32 bits): A 4-octet Autonomous System Number encoded in network byte order.¶
As defined in [I-D.ietf-idr-fsv2-ip-basic], rules and components follow strict ordering principles. The DIP-AS component (Type 100) within the Routing Filter Family (1400) MUST be evaluated deterministically according to FSv2 component sequencing rules.¶
When a BGP speaker receives and installs an FSv2 route containing the Routing Filter Family with the DIP-AS component (Type 100), the matching process for a transit data packet MUST proceed as follows:¶
The router extracts the packet's Destination IP address.¶
The router performs a longest-prefix match (LPM) lookup for the Destination IP in its local BGP Loc-RIB / FIB to retrieve the associated active BGP route.¶
The router evaluates the AS_PATH attribute of the retrieved BGP route:¶
If the evaluated Origin AS matches the criterion in the FSv2 rule, the packet matches this component.¶
In multi-homing or multipath scenarios, the match succeeds if ANY valid active path to the destination prefix matches the Origin AS defined in the rule.¶
This section describes a representative use case for traffic redirection and rate-limiting using the Destination-IP-Origin-AS filter under the FSv2 framework.¶
Consider the topology shown in Figure 2. ISP AS64597 receives traffic from AS64596 (Source IP Prefix 61) destined for AS64598.¶
+---------+
| BGP FS |
| Server |
+----|----+
|
|
/
/
************/************ IP Prefix 81
* / * IP Prefix 82
IP Prefix 61 * / AS64597 * IP Prefix 83
* / * IP Prefix 84
+-------+ * +---+/ +---+ * +-------+
+AS64596+-------+ R1+---------+ R2|------+AS64598+
+-------+ * +-+-+\ +---+ */ +-------+
* \ |\ /
* \ | \ /* IP Prefix 91
* \ | /\* IP Prefix 92
* \ | / \ IP Prefix 93
* \ |/ *\ IP Prefix 94
* \ +-+-+ * \ +-------+
* \-+ R3+------+AS64599+
* +---+ * +-------+
* *
*************************
Using traditional FlowSpec (RFC 8955), if AS64598 announces dozens or hundreds of individual prefixes (Prefix 81, 82, 83, 84...), AS64597 must inject separate FlowSpec rules for each destination prefix to redirect traffic coming from Source IP Prefix 61 towards Router R3:¶
+--------------+--------------+-------------------------+ | Destination | Source Prefix| Action / Next-hop | | Prefix | | | +--------------+--------------+-------------------------+ | IP Prefix 81 | IP Prefix 61 | Redirect to R3 | | IP Prefix 82 | IP Prefix 61 | Redirect to R3 | | IP Prefix 83 | IP Prefix 61 | Redirect to R3 | | IP Prefix 84 | IP Prefix 61 | Redirect to R3 | | ... | ... | ... | +--------------+--------------+-------------------------+
Using the extension defined in this draft, the BGP FlowSpec Server needs to generate only a single FlowSpec rule:¶
+--------------+--------------+--------------------+ | Destination | Source Prefix| Action / Next-hop | | IP Origin AS | | | +--------------+--------------+--------------------+ | 64598 | IP Prefix 61 | R3 | +--------------+--------------+--------------------+
This significantly reduces BGP NLRI messaging overhead, control plane churn, and hardware FIB/TCAM entry consumption on network elements.¶
This document extends BGP FlowSpec Version 2 (FSv2). Security considerations discussed in [I-D.ietf-idr-fsv2-ip-basic] apply directly.¶
In addition, operators MUST consider routing inconsistencies, RPKI-based Route Origin Validation (ROV) [RFC6811], and FSv2 route validation procedures.¶
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 | +-------------+---------------------------+---------------+ | 100 | DIP-AS (Destination-IP-AS)| This document | +-------------+---------------------------+---------------+¶
The following people made significant contributions to this document:¶
Tao Qin Huawei Email: qintao11@huawei.com¶
The authors would like to acknowledge the review and inputs from Gang Yan, Robert Raszuk, Jeffray Haas, Linda Dunbar, Zhenbin Li, Rainbow Wu, Jie Dong and Ziqing Cao.¶