RFC 9117
Revised Validation Procedure for BGP Flow Specifications
RFC 9117: Revised Validation Procedure for BGP Flow Specifications π
Okay bestie, this one is RFC 9117, published in August 2021 as a Standards Track document β¨. J. Uttaro (AT&T), J. Alcaide, C. Filsfils, D. Smith (all Cisco), and P. Mohapatra (Sproute Networks) wrote it. It's from the IETF, carries ISSN 2070-1721, and updates RFC 8955 π. It doesn't obsolete anything. It's basically a glow-up for how BGP Flow Specification routes get validated π¦.
Abstract β¨
okay so this doc tweaks the validation procedure for disseminating BGP Flow Specifications π . Under RFC 8955, the originator of a Flow Specification has to match the originator of the best-match unicast route for the destination prefix inside it. For an iBGP-received route, that originator is usually a border router in the same autonomous system (AS). The goal is to let only BGP speakers on the data forwarding path originate Flow Specifications π₯.
But sometimes you want to originate the Flow Spec from anywhere in the AS itself, like from a centralized BGP route controller π§. RFC 8955's validation fails in that setup, which is so not it π. This document relaxes the rule so Flow Specifications can be originated within the same AS as the BGP speaker doing the validation π. It also revises the AS_PATH validation rules so Flow Specifications received from an External Border Gateway Protocol (eBGP) peer can be validated when that peer is a BGP route server π.
This document updates the validation procedure in RFC 8955 π.
Status of This Memo π
This is an Internet Standards Track document.
This document is a product of the Internet Engineering Task Force (IETF). It represents the consensus of the IETF community. It has received public review and has been approved for publication by the Internet Engineering Steering Group (IESG). Further information on Internet Standards is available in Section 2 of RFC 7841.
Information about the current status of this document, any errata, and how to provide feedback on it may be obtained at https://www.rfc-editor.org/info/rfc9117.
Copyright Notice πΈ
Copyright (c) 2021 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 Simplified BSD License text as described in Section 4.e of the Trust Legal Provisions and are provided without warranty as described in the Simplified BSD License.
Table of Contents π§Ύ
1. Introduction
2. Definitions of Terms Used in This Memo
3. Motivation
4. Revised Validation Procedure
4.1. Revision of Route Feasibility
4.2. Revision of AS_PATH Validation
5. Topology Considerations
6. IANA Considerations
7. Security Considerations
8. References
8.1. Normative References
8.2. Informative References
Acknowledgements
Authors' Addresses
1. Introduction π¦
okay so [RFC8955] defines BGP Network Layer Reachability Information (NLRI) [RFC4760] that can be used to distribute traffic Flow Specifications amongst BGP speakers so they can do traffic filtering π. The main point of [RFC8955] is letting downstream autonomous systems signal their traffic filtering policies to upstream autonomous systems β¨. That way, traffic gets filtered closer to the source, and the upstream ASes don't waste effort carrying traffic to the downstream ASes just so it can be thrown away π.
[RFC8955] also gives you more granular filtering based on upper-layer protocol information (for example, protocol or port numbers), instead of only coarse IP destination prefix-based filtering π
. Flow Specification NLRIs received from a BGP peer go through validity checks before they're considered feasible and then get installed in the respective Adj-RIB-In π«Ά.
The validation procedure in [RFC8955] says the originator of the Flow Specification NLRI has to match the originator of the best-match unicast route for the destination prefix embedded in the Flow Specification π. The whole point is making sure only speakers on the forwarding path can originate the Flow Specification π. Now let's look at a specific case: the Flow Specification is originated somewhere in the same Local Domain as the speaker doing the validation (for example, from a centralized BGP route controller), and the best-match unicast route came from a different Local Domain π. For validation to succeed for a Flow Specification received from an iBGP peer in that case, you'd need to send that Flow Specification NLRI straight from the specific border router inside the Local Domain that advertises the matching best-match unicast route π. Those border routers would basically be acting as de facto route controllers π. That gets operationally cumbersome in a Local Domain with lots of border routers and complicated BGP policies π₯΄.
Figure 1 shows this idea π§. R1 (the upstream router) and RR (a route reflector) need to validate the Flow Specification whose embedded destination prefix has a best-match unicast route (dest-route) originated by ASBR2 β¨. ASBR2 could originate the Flow Specification, and it would be validated when RR and R1 receive it (from their point of view, the originator of both the Flow Specification and the best-match unicast route will be ASBR1) π. Sometimes the Flow Specification needs to be originated within AS1, and ASBR1 could originate it, and the Flow Specification would still get validated π. In both cases, the Flow Specification is originated by a router on the same forwarding path as the dest-route π. Now if AS1 has thousands of ASBRs, it's totally impractical to originate different Flow Specification rules on each ASBR in AS1 based on which ASBR each dest-route was learned from π΅. To make things more manageable, the goal is to advertise all the Flow Specifications from the same route controller π.
R1(AS1) --- RR(AS1) --- ASBR1(AS1) --- ASBR2(AS2)
|
route controller(AS1)
Figure 1
This document describes a modification to the validation procedure described in [RFC8955]. It lets Flow Specification NLRIs be originated from a centralized BGP route controller located within the Local Domain, which doesn't have to be in the data-forwarding path π¦. The modification can't be used for inter-domain coordination of traffic filtering, but it really simplifies distributing intra-domain traffic filtering policies within a Local Domain that has tons of border routers with complex BGP policies π. By relaxing the validation procedure for iBGP, Flow Specifications can be distributed in a standard and scalable way throughout the Local Domain β¨.
Throughout this document, some references are made to AS_CONFED_SEQUENCE segments; see Sections 4.1 and 5 π§. If AS_CONFED_SET segments are also present in the AS_PATH, the same considerations apply to them πΈ. Just note that the use of AS_CONFED_SET segments is not recommended [RFC6472] π. Refer to [CONFED-SET] as well π.
2. Definitions of Terms Used in This Memo π
- Local Domain: the local AS or the local confederation of ASes [RFC5065] π.
- eBGP: BGP peering to a router not within the Local Domain π.
- iBGP: Both classic iBGP and any form of eBGP peering with a router within the same confederation (i.e., iBGP peering is a peering that is not eBGP as defined above) π«Ά.
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 is the rule for reading the capitalized words, so pay attention to capitals, bestie π.
3. Motivation β¨
Okay so bestie, this section is literally the why behind the whole thing π«Ά. Step (b) of the validation procedure in Section 6 of [RFC8955] was written with one big assumption baked in: the Flow Specification NLRI travels the same path, through the whole inter-domain and intra-domain route distribution graph, as the longest-match unicast route for the destination prefix inside that Flow Specification. Keep that in your back pocket, because the rest of the section is basically about what happens when that assumption doesn't hold π.
For inter-domain traffic filtering, the Flow Specification originator at an AS's egress border routers (like RTR-D and RTR-E of AS1 in Figure 2) is the eBGP neighbor that advertised the longest-match destination prefix (that's RTR-F and RTR-G, respectively, in Figure 2) π .
Same vibe for the upstream routers of an AS (RTR-A and RTR-B of AS1 in Figure 2). There, the Flow Specification originator is the egress iBGP border router that advertised the unicast route for the best-match destination prefix (RTR-D and RTR-E, respectively, in Figure 2) π¦. This still holds even when the upstream routers pick paths from different egress border routers as their best route based on IGP distance. Here's the picture:
/ - - - - - - - - - - - - - -
| AS1 |
+-------+ +-------+
| | | | | |
| RTR-A | | RTR-B |
| | | | | |
+-------+ +-------+
| \ / |
iBGP \ / iBGP
| \ / |
+-------+
| | | |
| RTR-C |
| | RC | |
+-------+
| / \ |
/ \
| iBGP / \ iBGP |
+-------+ +-------+
| | RTR-D | | RTR-E | |
| | | |
| | | | | |
+-------+ +-------+
| | | |
- - -|- - - - - - - - -|- - -/
| eBGP eBGP |
- - -|- - - - - - - - -|- - -/
| | | |
+-------+ +-------+
| | | | | |
| RTR-F | | RTR-G |
| | | | | |
+-------+ +-------+
| AS2 |
/ - - - - - - - - - - - - - -
Figure 2
And here's the example from Figure 2 in plain text:
RTR-A chooses RTR-D as the best routeRTR-B chooses RTR-E as the best route
Now for the real tea π΅. It's highly desirable that mechanisms exist to protect each AS independently from network security attacks using the BGP Flow Specification NLRI for intra-AS purposes only. Network operators often run a dedicated Security Operations Center (SOC) inside their AS to monitor and detect these attacks π. To mitigate attacks within an AS, operators need to originate intra-AS Flow Specification NLRIs from a central BGP route controller that is not in the data forwarding plane π§. That way, operators can tell the border routers in their AS what attack-mitigation actions to take (drop the traffic, forward it to a pipe-cleaning location, etc.) π.
An operator can also extend those requirements to a group of ASes via policy. That's described in Section 4.1 (b.2.3) of the validation procedure π.
A central BGP route controller that originates Flow Specification NLRI should be able to skip the headache of figuring out which egress border router had the path chosen as best for each of its neighbors π. When a central BGP route controller originates Flow Specification NLRI, every other speaker in the AS sees that controller as the originator of the Flow Specification for the purposes of the validation procedure rules π . So step (b) of the validation procedure described in [RFC8955] has to be modified so that an iBGP peer that is not in the data forwarding plane can originate Flow Specification NLRIs. Main character energy π.
4. Revised Validation Procedure π
4.1. Revision of Route Feasibility π¦
Okay, so step (b) of the validation procedure in Section 6 of [RFC8955] gets redefined like this:
| b) One of the following conditions MUST hold true:
|
| 1. The originator of the Flow Specification matches the
| originator of the best-match unicast route for the
| destination prefix embedded in the Flow Specification (this
| is the unicast route with the longest possible prefix
| length covering the destination prefix embedded in the Flow
| Specification).
|
| 2. The AS_PATH attribute of the Flow Specification is empty or
| contains only an AS_CONFED_SEQUENCE segment [RFC5065].
|
| 1. This condition SHOULD be enabled by default.
|
| 2. This condition MAY be disabled by explicit
| configuration on a BGP speaker.
|
| 3. As an extension to this rule, a given non-empty AS_PATH
| (besides AS_CONFED_SEQUENCE segments) MAY be permitted
| by policy.
Explanation π§ :
Receiving either an empty AS_PATH or one with only an AS_CONFED_SEQUENCE segment tells you the Flow Specification was originated inside the Local Domain π .
With that change to the [RFC8955] validation procedure, a BGP peer inside the Local Domain that is not in the data-forwarding path can originate a Flow Specification π.
Turning off the new condition above (see step b.2.2 in Section 4.1) could be a good practice if the operator knew for sure that no Flow Specification would ever be originated inside the Local Domain π ββοΈ. Another case: if it was known for a fact that only the right egress border routers (the ones that are also egress border routers for the best routes) were originating Flow Specification NLRI π .
Policy can also be handy for permitting a specific set of non-empty AS_PATHs (see step b.2.3 in Section 4.1) β¨. For example, it could validate a Flow Specification whose AS_PATH contains only an AS_SEQUENCE segment with ASes that all belong to the same administrative domain π«Ά.
4.2. Revision of AS_PATH Validation π
Section 6 of [RFC8955] says:
| BGP implementations MUST also enforce that the AS_PATH
| attribute of a route received via the External Border Gateway
| Protocol (eBGP) contains the neighboring AS in the left-most
| position of the AS_PATH attribute. While this rule is optional
| in the BGP specification, it becomes necessary to enforce it
| here for security reasons.
This rule blocks the exchange of BGP Flow Specification NLRIs at Internet exchanges that use BGP route servers, because by design those don't insert their own AS number into the AS_PATH (Section 2.2.2.1 of [RFC7947]) π. So this document also redefines the [RFC8955] AS_PATH validation procedure referenced above like this:
| BGP Flow Specification implementations MUST enforce that the AS
| in the left-most position of the AS_PATH attribute of a Flow
| Specification route received via the External Border Gateway
| Protocol (eBGP) matches the AS in the left-most position of the
| AS_PATH attribute of the best-match unicast route for the
| destination prefix embedded in the Flow Specification NLRI.
Explanation π:
Quick clarity check: the AS in the left-most position of the AS_PATH is the AS that was last added to an AS_SEQUENCE π.
This change lets BGP Flow Specification NLRIs get exchanged at Internet exchanges with BGP route servers, and at the same time, for security reasons, it stops an eBGP peer from advertising an inter-domain Flow Specification for a destination prefix it doesn't provide reachability information for π‘οΈπ .
Comparing only the left-most AS in the AS_PATH for eBGP-learned Flow Specification NLRIs is roughly the same as checking the neighboring AS π¦. If the peer is a route server, security is necessarily weaker for the Flow Specification NLRI, just like it is for any unicast route advertised from a route server π. An example is discussed in the Security Considerations section π.
Redefining this AS_PATH validation rule for Flow Specification doesn't mean the original rule in [RFC8955] can't be enforced as well π. Its enforcement stays optional per Section 6.3 of [RFC4271]. That means a BGP speaker can enforce that the first AS in the AS_PATH matches the neighbor AS for a route in any Address Family (including the Flow Specification Address Family) π«. If the BGP speaker's peer is not a route server, then when enforcing this optional rule, the security characteristics are exactly equivalent to those specified in [RFC8955] π.
Another option: enforcing this optional rule for unicast routes (even if it's not enforced on Flow Specification NLRIs) gets you exactly the same security characteristics π. Here's why: after all the validations, the neighboring AS will be the same as the left-most AS in the AS_PATH for the unicast route, and the left-most AS in the AS_PATH for the unicast route will be the same as the left-most AS in the AS_PATH for the Flow Specification NLRI. So the neighboring AS will be the same as the left-most AS in the AS_PATH for the Flow Specification NLRI (exactly what the original AS_PATH validation rule in [RFC8955] states) π§.
Heads up though π¨: not checking the full AS_PATH lets any rogue or misconfigured AS originate undesired Flow Specifications. This is a BGP security threat that's already present in [RFC8955], but it's out of scope for this document π.
Using the new rule to validate a Flow Specification route received from a peer in the same Local Domain is out of scope for this document too π. Although it's possible, its usefulness is dubious π€·ββοΈ. Sure, a router in the same Local Domain could conceivably send a rogue update, but this document only considers eBGP risk (in the same spirit as the AS_PATH validation in [RFC4271]) πΈ.
5. Topology Considerations πΊοΈ
okay so [RFC8955] says the originator can be figured out from the ORIGINATOR_ID attribute or, if that attribute isn't there, from the transport address of the peer the BGP speaker got the update from. π«Ά If it's the second one, the network needs a congruent topology for unicast routes and Flow Specification routes. Congruent just means the Flow Specification route and its best-match unicast route both get learned from the same peer across the AS. π That's probably NOT going to be true if some peers only negotiated one Address Family, or if each Address Family peering has its own set of policies. π If the topology isn't congruent, step (b.1) of the validation procedure fails.
With the extra second condition (b.2) in the validation procedure, non-congruent topologies are supported inside the Local Domain, as long as the Flow Specification was originated inside the Local Domain. β¨
Explanation:
Let's look at some non-congruent scenarios WITHOUT condition (b.2) added to the validation procedure. π
- Picture a topology with two BGP speakers that have two iBGP peering sessions between them, one for unicast and one for Flow Specification. That's non-congruent π Say the ORIGINATOR_ID attribute never got received (like when a route reflector is getting routes from its clients). Then the Flow Specification validation procedure fails because of the first condition (b.1). π
- Now picture a confederation of ASes with local AS X and local AS Y, both in the same Local Domain, plus a BGP speaker X1 inside local AS X. The ORIGINATOR_ID attribute doesn't get advertised when routes move across local ASes. πΈ Say the Flow Specification route comes from peer Y1 and the best-match unicast route comes from peer Y2. Both peers are in local AS Y. The Flow Specification validation procedure fails here too, because of the first condition (b.1). π
Now add the second condition (b.2) to the validation procedure. π In the scenarios above, if the Flow Specifications are originated in the same Local Domain, the AS_PATH will be empty or contain only an AS_CONFED_SEQUENCE segment. Condition (b.2) then evaluates to true, so using the second condition (b.2), as this document defines it, guarantees the overall validation procedure passes. π That's how non-congruent topologies get supported when the Flow Specification is originated in the same Local Domain. π¦
Flow Specifications originated in a different Local Domain still need a congruent topology. π€ Why? In a non-congruent topology, condition (b.2) evaluates to false, so only the first condition (b.1) gets evaluated. π ββοΈ
6. IANA Considerations π
This document has no IANA actions. π€·ββοΈ
7. Security Considerations π
okay this section is SERIOUS, bestie, so read it carefully. π«£ This document updates the route feasibility validation procedures for Flow Specifications learned from iBGP peers and through route servers. π That change lines up with the procedures in [RFC8955], so the security characteristics stay basically equivalent to the existing security properties of BGP unicast routing, except for the stuff detailed below. π₯
The security considerations in [RFC8955] apply to this specification too. π«Ά
This document makes the original AS_PATH validation rule (Section 6.3 of [RFC4271]) OPTIONAL again (Section 4.2) for the Flow Specification Address Family. π (The rule is no longer mandatory the way [RFC8955] had specified it.) If that original rule isn't enforced for Flow Specification, it might introduce some new security risks. π A speaker in AS X peering with a route server could advertise a rogue Flow Specification route whose first AS in AS_PATH was Y. Say Y is the first AS in the AS_PATH of the best-match unicast route. When the route server advertises that Flow Specification to a speaker in AS Z, the speaker in AS Z validates it. π± This risk is impossible to prevent if the Flow Specification route comes from a route server peer. π If configuration (or some other means beyond the scope of this document) indicates the peer is NOT a route server, that OPTIONAL rule SHOULD be enforced for unicast and/or for Flow Specification routes. (As discussed in the Revision of AS_PATH Validation section, enforcing it in just one of those Address Families is enough. π«Ά) If the indication says the peer is not a route server, or there's no conclusive indication, that OPTIONAL rule SHOULD NOT be enforced. π
A route server itself may be in a great position to enforce the AS_PATH validation rule from the paragraph above. π If it's known that a route server isn't peering with any other route server, it can enforce the AS_PATH validation rule across all of its peers. β¨
BGP updates learned from iBGP peers are considered trusted, so the Traffic Flow Specifications inside those BGP updates are considered trusted too. π«Ά That means it's not required to validate that the originator of an intra-domain Traffic Flow Specification matches the originator of the best-match unicast route for the destination prefix embedded in that Flow Specification. π€ BUT this trust isn't absolute, bestie. π The new possibility that an iBGP speaker could send a rogue Flow Specification is introduced here. π¨
The changes in Section 4.1 don't affect the validation procedures for eBGP-learned routes. π¦
It's worth mentioning that allowing (or making operationally feasible) Flow Specifications to originate within the Local Domain makes the network overall more secure. π‘οΈ Flow Specifications can be originated more readily during attacks, which improves the stability and security of the network. π
8. References π
8.1. Normative References
[RFC2119] Bradner, S., "Key words for use in RFCs to Indicate
Requirement Levels", BCP 14, RFC 2119,
DOI 10.17487/RFC2119, March 1997,
<https://www.rfc-editor.org/info/rfc2119>.
[RFC4271] Rekhter, Y., Ed., Li, T., Ed., and S. Hares, Ed., "A
Border Gateway Protocol 4 (BGP-4)", RFC 4271,
DOI 10.17487/RFC4271, January 2006,
<https://www.rfc-editor.org/info/rfc4271>.
[RFC4760] Bates, T., Chandra, R., Katz, D., and Y. Rekhter,
"Multiprotocol Extensions for BGP-4", RFC 4760,
DOI 10.17487/RFC4760, January 2007,
<https://www.rfc-editor.org/info/rfc4760>.
[RFC5065] Traina, P., McPherson, D., and J. Scudder, "Autonomous
System Confederations for BGP", RFC 5065,
DOI 10.17487/RFC5065, August 2007,
<https://www.rfc-editor.org/info/rfc5065>.
[RFC7947] Jasinska, E., Hilliard, N., Raszuk, R., and N. Bakker,
"Internet Exchange BGP Route Server", RFC 7947,
DOI 10.17487/RFC7947, September 2016,
<https://www.rfc-editor.org/info/rfc7947>.
[RFC8174] Leiba, B., "Ambiguity of Uppercase vs Lowercase in RFC
2119 Key Words", BCP 14, RFC 8174, DOI 10.17487/RFC8174,
May 2017, <https://www.rfc-editor.org/info/rfc8174>.
[RFC8955] Loibl, C., Hares, S., Raszuk, R., McPherson, D., and M.
Bacher, "Dissemination of Flow Specification Rules",
RFC 8955, DOI 10.17487/RFC8955, December 2020,
<https://www.rfc-editor.org/info/rfc8955>.
8.2. Informative References
[CONFED-SET]
Kumari, W., Sriram, K., Hannachi, L., and J. Haas,
"Deprecation of AS_SET and AS_CONFED_SET in BGP", Work in
Progress, Internet-Draft, draft-ietf-idr-deprecate-as-set-
confed-set-05, 12 March 2021,
<https://datatracker.ietf.org/doc/html/draft-ietf-idr-
deprecate-as-set-confed-set-05>.
[RFC6472] Kumari, W. and K. Sriram, "Recommendation for Not Using
AS_SET and AS_CONFED_SET in BGP", BCP 172, RFC 6472,
DOI 10.17487/RFC6472, December 2011,
<https://www.rfc-editor.org/info/rfc6472>.
Acknowledgements π«Ά
The authors want to give a huge shoutout to Han Nguyen for his direction on this work π, plus Waqas Alam, Keyur Patel, Robert Raszuk, Eric Rosen, Shyam Sethuram, Susan Hares, Alvaro Retana, and John Scudder for reviewing it and sharing their comments. π
Authors' Addresses π
James Uttaro
AT&T
200 S. Laurel Ave
Middletown, NJ 07748
United States of America
Email: ju1738@att.com
Juan Alcaide
Cisco
Research Triangle Park
7100 Kit Creek Road
Morrisville, NC 27709
United States of America
Email: jalcaide@cisco.com
Clarence Filsfils
Cisco
Email: cf@cisco.com
David Smith
Cisco
111 Wood Ave South
Iselin, NJ 08830
United States of America
Email: djsmith@cisco.com
Pradosh Mohapatra
Sproute Networks
Email: mpradosh@yahoo.com
π¦ where this page comes from
- ietf: rfc9117 2021-08
- π girlified by claude-haiku-5-5 on : a language model's rewrite of the original, under its terms