Internet-Draft FlowSpec IPFIX November 2026
Gao & Cui Expires 20 May 2027 [Page]
Workgroup:
OPSAWG
Internet-Draft:
draft-gao-opsawg-flowspec-ipfix-01
Published:
Intended Status:
Standards Track
Expires:
Authors:
Y. Gao
Zhongguancun Laboratory
Y. Cui
Tsinghua University

Export of BGP FlowSpec Treatment Information in IPFIX

Abstract

BGP Flow Specification (FlowSpec) is commonly used to distribute traffic filtering and traffic treatment rules. Operational monitoring of FlowSpec deployments may require information from multiple sources, including BGP control-plane telemetry, operational state, and forwarding-plane observations.

This document defines IP Flow Information Export (IPFIX) Information Elements that add FlowSpec context to IPFIX Flow Records. The exported information enables a Collector to correlate exported Flow Records with a FlowSpec rule in the scope of an Observation Domain and to identify the action classes reported by the Exporter.

Status of This Memo

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 20 May 2027.

▲

Table of Contents

1. Introduction

BGP Flow Specification (FlowSpec) [RFC8955] [RFC8956] provides a mechanism for distributing traffic filtering and traffic treatment rules using BGP. A FlowSpec rule can identify traffic and request a treatment such as rate limiting (including discard at a zero rate), redirection, or traffic marking.

When traffic is processed under a FlowSpec rule, operators often need visibility into traffic that matched the rule and was observed by enforcement devices. Control-plane information can describe distribution, validation, or installation of a FlowSpec route, but it does not by itself provide forwarding-plane statistics for traffic observed after FlowSpec processing.

For example, after a mitigation system installs a FlowSpec rule for traffic toward a victim prefix, an operator may need to collect IPFIX statistics from enforcement devices and determine which exported Flow Records were associated with that rule and which action classes were reported at the Observation Point.

IP Flow Information Export (IPFIX) [RFC7011] provides a mechanism for exporting Flow Records from Exporters to Collectors. Existing IPFIX Information Elements can describe flow keys, counters, timestamps, interfaces, Observation Points, and other properties of an observed Flow [RFC7012]. This document defines additional IPFIX Information Elements that allow a Flow Record to carry FlowSpec rule correlation and treatment context.

IPFIX supports enterprise-specific Information Elements, but use of enterprise-specific elements for this information can make cross-vendor collection and analysis difficult. Standard Information Elements allow Collectors to recognize FlowSpec-treated Flow Records in a common way while still relying on existing IPFIX elements for generic flow properties and counters.

The Information Elements defined in this document are intended to be used together with existing IPFIX Information Elements.

2. Terminology

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 document uses the IPFIX terminology defined in [RFC7011].

The following terms are used in this document:

3. Scope

This document defines three new IPFIX Information Elements for traffic processed by BGP FlowSpec:

Used together with existing IPFIX Information Elements for flow keys, counters, timestamps, interfaces, Observation Points, sampling information, and other generic flow properties, these Information Elements enable a Collector to correlate Flow Records with the FlowSpec rule and treatment reported by the Exporter.

Typical uses include correlating IPFIX Flow Records with FlowSpec rules during DDoS mitigation, accounting for traffic observed under FlowSpec-derived treatment, and troubleshooting whether traffic observed at an Observation Point is associated with a specific FlowSpec rule.

4. Relationship to FlowSpec Monitoring

The broader FlowSpec monitoring problem includes route lifecycle information, constrained realization information, enforcement status information, traffic-treatment outcome information, and correlation information across those sources [draft-cui-idr-flowspec-feedback-roadmap].

This document addresses only the IPFIX component of that problem: forwarding-plane observations of traffic associated with FlowSpec-derived behavior. BGP route status, FlowSpec validation status, and structured enforcement state are expected to be reported, when needed, by other mechanisms such as BGP control-plane telemetry or YANG-based operational models.

5. FlowSpec Data-Plane Statistics Export

5.1. Export Model

A FlowSpec-treated Flow Record extends an ordinary IPFIX Flow Record with FlowSpec-specific Information Elements. For example, an Exporter can combine source and destination addresses, transport ports, protocol information, timestamps, packet and octet counters, a FlowSpec rule identifier, and a list of FlowSpec action classes in one Flow Record.

This model allows a Collector to process FlowSpec-treated traffic together with other IPFIX Flow Records while retaining the FlowSpec context needed for operational analysis.

5.2. Correlation with FlowSpec Rules

The FlowSpec rule identifier defined in this document is used to correlate a FlowSpec-treated Flow Record with a FlowSpec rule referenced by the Exporter. The identifier is scoped to the Observation Domain that exports the Flow Record. The identifier is intended only for correlation within the Observation Domain.

A Flow Record carrying this identifier reports traffic that matched the identified rule. If an Exporter reports multiple rules matched by the same traffic, it MUST use a separate Flow Record for each reported rule. This document does not require an Exporter to report every matching rule.

The detailed representation of the FlowSpec rule and the mechanism used to distribute the mapping between a FlowSpec rule identifier and a FlowSpec rule are outside the scope of this document. A Collector that requires the complete rule needs to obtain that mapping from the Exporter or from an operational system that maintains the corresponding FlowSpec rule context.

An Exporter SHOULD keep the association between a FlowSpec rule identifier and a FlowSpec rule stable for as long as Flow Records that use the identifier may be interpreted by a Collector.

If a FlowSpec rule identifier is derived from an identifier signaled or configured by another mechanism, the Exporter SHOULD preserve the scope and collision properties of that mechanism. If no such identifier is available, the Exporter can assign a local identifier, provided that the identifier is unique within the Observation Domain for the relevant lifetime.

5.3. Reporting Action Classes

The FlowSpec action class list defined in this document reports the coarse-grained FlowSpec-derived action classes that the Exporter determines were associated with the metered packets at the Observation Point. It is not a complete encoding of the BGP FlowSpec Traffic Filtering Actions or their parameters, not proof that the requested actions were successfully enforced, and not a replacement for forwarding status or counters.

Collectors SHOULD interpret this Information Element together with existing IPFIX Information Elements for counters, timestamps, interfaces, Observation Points, forwarding status, and sampling. Reported action classes do not by themselves demonstrate whether a mitigation policy was effective.

More than one Traffic Filtering Action can be associated with the FlowSpec rule identified in a Flow Record. A Flow Record containing flowSpecActionClassList MUST also contain flowSpecRuleIdentifier. The Exporter MUST report each distinct action class of the identified rule that it determines was associated with at least one metered packet in the Flow Record. The list MUST NOT include action classes from other matching FlowSpec rules. The list does not indicate that every class was associated with every metered packet. The order of list members has no significance and does not report the order in which actions were applied. If the Exporter cannot determine the complete set of associated action classes for the identified rule, it MUST report only unknown (value 0) in the list. An absent list means that action classes were not reported, rather than that they were unknown.

Action classes identify the signaled FlowSpec actions, not their resulting forwarding outcomes. The traffic-rate-bytes and traffic-rate-packets actions in [RFC8955] are reported as separate classes, including when their rate is zero and the resulting behavior is to discard traffic. The sampling bit of the traffic-action Extended Community is reported as sampling when set. The terminal-action bit controls evaluation of subsequent FlowSpec rules and is not reported as a traffic-treatment class. The redirect class includes the redirect actions in [RFC8955] and [RFC8956].

5.4. Relationship to Existing IPFIX Information Elements

Existing IPFIX Information Elements are used for generic flow properties and statistics. Examples include IP addresses, transport ports, protocol identifiers, packet and octet counters, flow timestamps, interfaces, and Observation Point information.

Existing IPFIX Information Elements can also describe forwarding outcomes where they are available from the Exporter. The Information Elements defined in this document add FlowSpec-specific rule correlation and treatment context to those records; they do not replace existing IPFIX Information Elements for counters, forwarding status, metering, or sampling.

6. FlowSpec Information Elements

This section defines the initial set of IPFIX Information Elements for FlowSpec data-plane statistics export.

Table 1
ElementID Name Description
TBD1 flowSpecRuleIdentifier Provides a local identifier for the FlowSpec rule associated with the Flow Record.
TBD2 flowSpecActionClassList Reports the FlowSpec-derived action classes associated with the metered packets.
TBD3 flowSpecActionClass Identifies an action class within flowSpecActionClassList.

6.1. flowSpecRuleIdentifier

Name:

flowSpecRuleIdentifier

ElementID:

TBD1

Description:

An identifier assigned or reported by the Exporter for the FlowSpec rule associated with the Flow Record. The identifier is scoped to the Observation Domain that exports the Flow Record. This Information Element is not reversible.

Abstract Data Type:

unsigned64

Data Type Semantics:

identifier

Units:

none

Status:

current

Reference:

This document.

6.2. flowSpecActionClassList

Name:

flowSpecActionClassList

ElementID:

TBD2

Description:

A basicList of flowSpecActionClass Information Elements identifying the distinct FlowSpec-derived action classes of the rule identified by flowSpecRuleIdentifier in the same Flow Record that the Exporter determines were associated with at least one metered packet. The list uses the allOf structured data type semantic defined in [RFC6313] when it contains multiple members and the undefined semantic when it contains one member. List members MUST NOT be duplicated, and an exported list MUST contain at least one member. The order of members has no significance. If the complete set cannot be determined, the list MUST contain only unknown (value 0). This Information Element does not encode action parameters or confirm successful enforcement. This Information Element is not reversible.

Abstract Data Type:

basicList

Data Type Semantics:

list

Units:

none

Additional Information:

The list contains flowSpecActionClass (TBD3) values and is encoded as specified in [RFC6313].

Status:

current

Reference:

This document.

6.3. flowSpecActionClass

Name:

flowSpecActionClass

ElementID:

TBD3

Description:

A coarse-grained FlowSpec-derived action class reported as a member of flowSpecActionClassList. This Information Element does not encode a complete BGP FlowSpec Traffic Filtering Action or its parameters. This Information Element is not reversible.

Abstract Data Type:

unsigned8

Data Type Semantics:

identifier

Units:

none

Range:

0..255

Additional Information:

Values are defined in the "FlowSpec Action Class" subregistry.

Status:

current

Reference:

This document.

The initial values for flowSpecActionClass are defined as follows:

Table 2
Value Action Class
0 unknown
1 traffic-rate-bytes
2 traffic-rate-packets
3 redirect
4 traffic-marking
5 sampling
6-255 Unassigned

7. Export Example

The following example illustrates a Template for exporting an IPv4 Flow Record for traffic processed by a FlowSpec rule.

Table 3
Information Element
sourceIPv4Address
destinationIPv4Address
sourceTransportPort
destinationTransportPort
protocolIdentifier
packetDeltaCount
octetDeltaCount
flowStartMilliseconds
flowEndMilliseconds
observationPointId
flowSpecRuleIdentifier
flowSpecActionClassList

The existing Information Elements provide the flow keys, statistics, timestamps, and observation context. The FlowSpec-specific Information Elements provide the local FlowSpec rule identifier and the action classes reported for the metered packets. The flowSpecActionClassList field contains flowSpecActionClass values; for example, it can contain traffic-rate-bytes (1) and redirect (3) without implying an order of application.

8. Operational Considerations

The interpretation of FlowSpec data-plane statistics depends on the Observation Point and metering behavior of the Exporter. A Collector needs to consider where the traffic was observed and whether the exported counters are affected by aggregation, sampling, filtering, or local implementation behavior.

The Information Elements defined in this document provide correlation and treatment context for IPFIX Flow Records. They do not by themselves provide the full FlowSpec rule, its control-plane state, or the state of enforcement objects derived from the rule.

The action class list reports associations for the Flow Record, which may aggregate multiple packets. A reported class need not have been associated with every metered packet. The list does not report action order; the ordered Information Element mechanism discussed in [draft-claise-opsawg-ipfix-ordered-ie] does not define an ordered-list data type for this purpose.

Separate Flow Records for multiple rules matched by the same traffic may count some of the same packets. A Collector MUST NOT sum their counters as if the records represented disjoint traffic.

A Collector needs to treat absence of a FlowSpec-specific Information Element differently from an explicit value. For example, a Flow Record without a FlowSpec rule identifier does not necessarily mean that no FlowSpec rule existed; it may mean that the Exporter did not support or did not apply this export.

When multiple Exporters report records for the same FlowSpec rule, a Collector needs to use the Observation Domain, Observation Point, timestamps, and other IPFIX context to avoid treating independent observations as duplicate or equivalent measurements.

9. Security Considerations

FlowSpec-treated Flow Records can reveal sensitive information about traffic filtering policy, DDoS mitigation behavior, victim prefixes, attack traffic characteristics, and platform or deployment capabilities. Exporters, Collectors, and transport paths need to protect this information according to the sensitivity of the exported Flow Records.

Forged, modified, delayed, replayed, or suppressed Flow Records could cause an operator or automated system to draw an incorrect conclusion about whether FlowSpec treatment is active or effective. Deployments need appropriate authentication, integrity protection, confidentiality, access control, and replay or staleness handling for IPFIX export.

The Security Considerations of [RFC7011] apply, including its guidance on protecting IPFIX export with TLS or DTLS as appropriate for the transport in use.

High-volume FlowSpec-related export can create load on Exporters, Collectors, and transport paths. Deployments need to consider filtering, aggregation, sampling, rate control, and retention policies that are appropriate for the operational use case.

10. IANA Considerations

IANA is requested to allocate flowSpecRuleIdentifier (TBD1), flowSpecActionClassList (TBD2), and flowSpecActionClass (TBD3) in the "IPFIX Information Elements" registry. Their complete definitions are in Section 6. New IPFIX Information Elements are reviewed according to the Expert Review process described in [RFC7012] and [RFC7013].

IANA is also requested to create and maintain a new subregistry named "FlowSpec Action Class" under the "IPFIX Information Elements" registry. The initial values are:

Table 4
Value Description Reference
0 unknown This document
1 traffic-rate-bytes This document
2 traffic-rate-packets This document
3 redirect This document
4 traffic-marking This document
5 sampling This document
6-255 Unassigned  

New values in the "FlowSpec Action Class" registry are assigned by Expert Review [RFC8126].

11. References

11.1. Normative References

[RFC2119]
Bradner, S., "Key words for use in RFCs to Indicate Requirement Levels", BCP 14, RFC 2119, DOI 10.17487/RFC2119, , <https://www.rfc-editor.org/rfc/rfc2119>.
[RFC8174]
Leiba, B., "Ambiguity of Uppercase vs Lowercase in RFC 2119 Key Words", BCP 14, RFC 8174, DOI 10.17487/RFC8174, , <https://www.rfc-editor.org/rfc/rfc8174>.
[RFC7011]
Claise, B., Ed., Trammell, B., Ed., and P. Aitken, "Specification of the IP Flow Information Export (IPFIX) Protocol for the Exchange of Flow Information", STD 77, RFC 7011, DOI 10.17487/RFC7011, , <https://www.rfc-editor.org/rfc/rfc7011>.
[RFC7012]
Claise, B., Ed. and B. Trammell, Ed., "Information Model for IP Flow Information Export (IPFIX)", RFC 7012, DOI 10.17487/RFC7012, , <https://www.rfc-editor.org/rfc/rfc7012>.
[RFC7013]
Trammell, B. and B. Claise, "Guidelines for Authors and Reviewers of IP Flow Information Export (IPFIX) Information Elements", BCP 184, RFC 7013, DOI 10.17487/RFC7013, , <https://www.rfc-editor.org/rfc/rfc7013>.
[RFC6313]
Claise, B., Dhandapani, G., Aitken, P., and S. Yates, "Export of Structured Data in IP Flow Information Export (IPFIX)", RFC 6313, DOI 10.17487/RFC6313, , <https://www.rfc-editor.org/rfc/rfc6313>.
[RFC8126]
Cotton, M., Leiba, B., and T. Narten, "Guidelines for Writing an IANA Considerations Section in RFCs", BCP 26, RFC 8126, DOI 10.17487/RFC8126, , <https://www.rfc-editor.org/rfc/rfc8126>.
[RFC8955]
Loibl, C., Hares, S., Raszuk, R., McPherson, D., and M. Bacher, "Dissemination of Flow Specification Rules", RFC 8955, DOI 10.17487/RFC8955, , <https://www.rfc-editor.org/rfc/rfc8955>.
[RFC8956]
Loibl, C., Ed., Raszuk, R., Ed., and S. Hares, Ed., "Dissemination of Flow Specification Rules for IPv6", RFC 8956, DOI 10.17487/RFC8956, , <https://www.rfc-editor.org/rfc/rfc8956>.

11.2. Informative References

[draft-cui-idr-flowspec-feedback-roadmap]
Cui, Y., Gao, Y., and J. Haas, "Problem Statement and Roadmap for BGP FlowSpec Monitoring", .
[draft-claise-opsawg-ipfix-ordered-ie]
Claise, B., Aitken, P., Keller, H., Liu, Y., and P. Lucente, "Ordered Information Element Export in IP Flow Information Export (IPFIX)", .

Authors' Addresses

Yujia Gao
Zhongguancun Laboratory
Beijing, 100094
China
Yong Cui
Tsinghua University
Beijing, 100084
China