Internet-Draft | FSv2 More IP Filters | November 2024 |
Hares | Expires 19 May 2025 | [Page] |
The BGP flow specification version 2 (FSv2) for Basic IP defines user ordering of filters along with FSv1 IP Filters and FSv1 actions. This draft defines the format for the Extended IP Filters for Flow Specification FSv2.¶
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 19 May 2025.¶
Copyright (c) 2024 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.¶
Version 2 of BGP flow specification (FSv2) has a series of foundational documents ([I-D.ietf-idr-fsv2-ip-basic], this document, [I-D.hares-idr-fsv2-more-ip-actions], and [draft-hares-idr-fsv2-non-ip]) plus drafts on specific filter components, actions, or groups of filter components and actions.¶
The remainder of this introductory section provides a introduction to FSv2.¶
Section 2 contains a description of the format of the FSv2 NLRI with the Extended IP Filters TLV. The Extended IP Filters TLV allows the user to specify new IP Filters components and a group of IP Filter components. The concept of a group of filter components allows an BGP peer originating a FSv2 NLRI with the Extended IP Filter TLV to pass what components the originating BGP Peer expects will be supported by the BGP Peers receiving the FSv2 Extended Filter TLV. The group field is designed to aid upgrades to additional component by providing a simple check the FSv2 component range passed in the Extended Filters TLV. Groups can be register with IANA in either a FCFS range or IETF Consensus range. Section 2 also provides templates for defining: a) new components to be passed in the Extended IP Filter group and b) new Extended IP Filter groups.¶
Section 3 provides two new Filters approved in IDR WG drafts. Section 3.1 provides definitions for new components: TTL, SID in IPv6 Segment Routing header (SRH). These two components were defined in the original specification for Flow Specification v2 ([I-D.ietf-idr-flowspec-v2]). Section 3.2 also provides prototypes for a few existing components to aid authors of IDR drafts (current or proposed) examples to aid their quick use of the Extended IP Filters.¶
Section 4 provides information on Validation and Error handling for the Extended Filters TLV. Section 5 contains manageability considerations for FSv2 with Extended IP Filters TLV. Section 6 contains IANA considerations and section 7 contains security considerations.¶
FSv2 specifies new user-ordered filters that will be used with the IPv4 (AFI=1) and IPv6 (AFI=2) 2 new SAFIs (TBD1, TBD2) for FSv2 to be used with 5 AFIs (1, 2, 6, 25, and 31) to allow user-ordered lists of traffic match filters for user-ordered traffic match actions encoded in Communities (Extended or Wide Communities). The first SAFI (TBD1) is used for IP forwarding, and the second SAFI (TBD2) will be used with VPNs. The supported AFI/SAFI combinations in FSV2 are:¶
IPV4 (AFI=1, SAFI=TBD1),¶
IPv6 (AFI=2, SAFI=TBD1),¶
L2 (AFI=6, SAFI=TBD1),¶
SFC (AFI=31, SAFI=TBD1),¶
BGP/MPLS IPv4 VPN (AFI=1, SAFI=TBD2),¶
BGP/MPLS IPV6 VPN (AFI=2, SAFI=TBD2),¶
BGP/MPLS L2VPN (AFI=25, SAFI=TBD2), and¶
SFC VPN (AFI=31, SAFI=TBD2)¶
FSv1 and FSv2 use different AFI/SAFIs to send flow specification filters. Since BGP route selection is performed per AFI/SAFI, this approach can be termed “ships in the night” based on AFI/SAFI.¶
The full FSv2 specification ( Version 2 of BGP flow specification (FSv2) was original defined in [I-D.ietf-idr-flowspec-v2]. contains more than initial implementers desired to put in a single upgrade. Therefore, the original FSv2 draft remains an WG draft, but the content will be split out into groups of functions that can be easily deployed as upgrades to FSv1. The upgrades will come in the following groups:¶
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD 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.¶
The format of the FSv2 NLRI field for IP Filters is defined in [I-D.ietf-idr-fsv2-ip-basic]. This format includes a common header with fields for user specified order, dependency filter chain, and a TLV for filter components (type, length, value).¶
This section defines the use of the dependency filter chain (section 2.1) in the NLRI and the format of the Extended IP Filters TLV (section 2.2). The Extended IP Filter group provides a flexible means to define which components are supported by the Extended IP Filter TLV. Four Extended Filter Component groups are defined in section 2.3, but additional may be defined via an IANA Registry. The ordering of Filters is by user define order number, then component, then value within a component. Section 2.4 provides the rules for ordering for FSv2 NLRI with IP Basic Filters and Extended IP Filters. Section 2.5 provides a template for new Extended IP Components.¶
FSv2 filters may be distributed in multiple BGP UPDATE packets. The format of the FSv2 NLRI is shown in Figure 3-1. In FSv2, the user can define the order of the filters by an including an order in the FSV2 NLRI prior to the filter. FSv2 also defines an optional dependency filter chain to allow the filter chains to be identified across all FSV2 Filter chains. This information may be installed from BGP data based into firewalls.¶
+-------------------------------+ | NLRI length (2 octets) | +-------------------------------+ | TLVs+ | | +===========================+ | | | order (4 octets) | | | +---------------------------+ | | | Dependent filter chain | | | |(type, chain ID, count, | | | | item) (8 octets) | | | +---------------------------+ | | + FSv2 Filter type + | | | (2 octets) | | | +---------------------------+ | | + length TLVs (2 octet) + | | + --------------------------+ | | + value (variable) + | | +---------------------------+ | +-------------------------------+ Figure 2-1 - FSv2 NLRI with Extended IP Filter type.¶
Where:¶
The dependency filter chain has the following components:¶
+-------------------------------+ | Version (1 octet) | +-------------------------------+ | chain id (3 octets) | +-------------------------------+ | Count of items (2 octets) | + ------------------------------+ | Item (2 octets) | +-------------------------------+ Figure 2-2 – IP header SubTLV format¶
where:¶
The Extended IP Filters TLV has a type value of 2 with a variable length. The Extended IP Filters value field has the form shown in Figure 2-3 where:¶
Extended Filters value field +-------------------------------+ | +--------------------------+ | | | FSv2 Extended Filters | | | | group (2 octets) | | | +--------------------------+ | | | Components+ (variable) | | | +--------------------------+ | +-------------------------------+ Figure 2-3 - Extended IP Filters TLV¶
Each Component is a sequence of TLVs with the format¶
+-------------------------------+ | Component Type (1 octet) | +-------------------------------+ | Component length (2 octets) | + ------------------------------+ | Component value (variable) | +-------------------------------+ Figure 2-4 – Component format¶
Where:¶
The valid components for the Extended IP Filters defined by this specification are listed in table 2-X below. These components include the following:¶
Table 2-1 Components for Extended IP Filters SubTLV Extended IP Filters Components -type for IP Extended Filters version 2 -------- ---------------------------------- 0 - TTL 1 - IP Destination prefix 2 - IP Source prefix 3 – IPv4 Protocol od IPv6 Upper Layer Protocol 4 – Port 5 – Destination Port 6 – Source Port 7 – ICMPv4 type or ICMPv6 type 8 – ICMPv4 code or ICMPv6 code 9 – TCP Flags 10 – Packet length 11 – DSCP 12 – Fragment 13 – Flow Label 14 - TTL 15 - Reserved 16 - SID in Routing IPv6 Header 17 - NRP ID in IPv6 Header¶
Three groups are defined for Extended IP Filters:¶
Table 2-2 FSv1 Component Group (0x00) SubTLV Extended IP Filters Components -type for IP Extended Filters version 1 -------- ---------------------------------- 1 - IP Destination prefix 2 - IP Source prefix 3 – IPv4 Protocol or IPv6 Upper Layer Protocol 4 – Port 5 – Destination Port 6 – Source Port 7 – ICMPv4 type or ICMPv6 type 8 – ICMPv4 code or ICMPv6 code 9 – TCP Flags 10 – Packet length 11 – DSCP 12 – Fragment 13 – Flow Label¶
Table 2-3 FSv1 + TTL Component Group (0x01) SubTLV Extended IP Filters Components -type for IP Extended Filters version 1 -------- ---------------------------------- 0 - TTL 1 - IP Destination prefix 2 - IP Source prefix 3 – IPv4 Protocol or IPv6 Upper Layer Protocol 4 – Port 5 – Destination Port 6 – Source Port 7 – ICMPv4 type or ICMPv6 type 8 – ICMPv4 code or ICMPv6 code 9 – TCP Flags 10 – Packet length 11 – DSCP 12 – Fragment 13 – Flow Label 14 - TTL¶
Table 2-4 Segment Routing Group (0x02) SubTLV Extended IP Filters Components -type for IP Extended Filters version 2 -------- ---------------------------------- 0 - TTL 1 - IP Destination prefix 2 - IP Source prefix 3 – IPv4 Protocol od IPv6 Upper Layer Protocol 4 – Port 5 – Destination Port 6 – Source Port 7 – ICMPv4 type or ICMPv6 type 8 – ICMPv4 code or ICMPv6 code 9 – TCP Flags 10 – Packet length 11 – DSCP 12 – Fragment 13 – Flow Label 14 - TTL 15 - Reserved 16 - SID in Routing IPv6 Header 17 - NRP ID in Next Hop HEader¶
Table 2-5 Extended IP Component Ranges Sub-TLV range Definition ------------- ------------- 1-13 V1 filters 14-63 IP Extended Filters¶
The transmission of TLVs within a FSV2 NLRI SHOULD be sent via ascending user order.¶
Within a single user order, the TLVs should be ordered by FSv2 Filter type. The FSv2 Filter types which MUST be supported for the Extended IP Filter support are Filter Type IP Basic (type = 1) and Filter Type Extended IP Filters (type = 2). Other FSv2 Filter types MAY be supported, but the support of those filter types is outside the scope of this document.¶
Within a single user order number and the same IP Basic Filter Type, the components should be ordered by ascending numerical order of the component type.¶
Within a single user order number and the same Extended IP Basic Type, the components should also be ordered by ascending component numbers. The Extended IP Filters version number simply indicates which components are required to be supported per version.¶
Within a single user order and a single component number, the order of the filters is defined by the component. For example, if the component types are the same, then the value fields are compared as defined in [I-D.ietf-idr-fsv2-ip-basic], [RFC8955] and [RFC8956]. The filters MUST be stored with the value fields in ascending order. NLRIs having TLVs which do not follow the above ordering rules MUST be considered as malformed by a BGP FSv2 propagator. This rule prevents any ambiguities that arise from the multiple copies of the same NLRI from multiple BGP FSv2 propagators. A BGP implementation SHOULD treat such malformed NLRIs as ""Treat-as-withdraw"" [RFC7606].¶
TTL Component Value encoding <[numeric_op, value]+> Figure 3-1¶
where:¶
Validation of the FSv2 NLRI follows the rules from section 4.1 of [I-D.ietf-idr-fsv2-ip-basic]. For ease of reference to this validation procedure, the implementer might consider the following facts:¶
Validation of the FSv2 NLRI follows the rules from section 4.2 of [I-D.ietf-idr-fsv2-ip-basic] apply to the FSV2 NLRI filters. For ease of reference to this section, implementers might consider the following facts:¶
The following two error handling rules stated in Section 4.1.3 of [I-D.ietf-idr-fsv2-ip-basic] must be followed by all BGP speakers:¶
Actions are transmitted on Extended Communities (EC) for FSv2 basic actions (FSv2-EC) or BGP Community path attribute (CPA) with FSv2 TLV (FSv2-CPA). The following rules MUST be followed by the FSv2 actions:¶
FSv2-EC MUST be ordered by FSv2 default order (see [I-D.ietf-idr-fsv2-ip-basic]) if one of the two conditions is not present:¶
FSv1 is a key part of many existing networks. The introduction of FSv2 is expected to be a phased process. where FSv1 is replaced slowly. One potential way this might occur is the following:¶
This section complies with [RFC7153].¶
IANA is requested to indicate [this draft] as a reference on the following assignments in the Flow Specification Component Types Registry:¶
ID Name Reference ---- ----------- ----------------- 0 TTL [this document] 14 TTL [this document] 15 Reserved [this document] 16 Partial SID [this document] 17 NRP ID [this document]¶
IANA is requested to create the following a registry for extended IP Filters Group with the following values. Registry type is "IETF-Consensus" for values 0x04 to 0xFF. Registry type is "FCFS" for values 0x100 to 0x1FF.¶
ID Group Name Valid FSV2 component values Reference --- ----------- ---------------- ----------------- 0 FSv1 0-13 [this document] 1 FSv1 + TTL 0-14 [this document] 2 SRv6 0-17 [this document] Values 0x04 - 0xFF (255) - Assigned via IETF Consensus Values 0x100 - 0x1FF (300-511) - Expert review Values 0x200 - 0x2FF (512-7670 - FCFS¶
A template for requesting the IP Filters group assignment is given below.¶
The use of ROA improves on [RFC8955] by checking to see of the route origination. This check can improve the validation sequence for a multiple-AS environment.¶
>The use of BGPSEC [RFC8205] to secure the packet can increase security of BGP flow specification information sent in the packet.¶
The use of the reduced validation within an AS [RFC9117] can provide adequate validation for distribution of flow specification within a single autonomous system for prevention of DDoS.¶
Distribution of flow filters may provide insight into traffic being sent within an AS, but this information should be composite information that does not reveal the traffic patterns of individuals.¶