Paths Limit for Multiple Paths in BGP
Internet-Draft draft-abraitis-idr-addpath-paths-limit-02
Donatas Abraitis
NetDef
donatas@opensourcerouting.org
Alvaro Retana
Futurewei Technologies, Inc.
aretana@futurewei.com
Jeffrey Haas
Juniper Networks
1133 Innovation Way
Sunnyvale
CA
94089
US
jhaas@juniper.net
2024
Routing
Inter-Domain Routing
BGP ADD-PATH
This document specifies a BGP capability that complements the ADD-PATH Capability by indicating the maximum number of paths a BGP speaker can receive from a peer, optimizing the transmission of BGP routes by selectively relaying pertinent routes instead of the entire set.
Introduction
BGP ADD-PATH [RFC7911] defines a BGP extension that allows the advertisement of multiple paths for the same address prefix without the new paths implicitly replacing any previous ones.
Multiple paths for a large number of prefixes may be received by a BGP speaker, potentially depleting memory resources or even causing network-wide instability. Such instability could be considered a denial-of-service attack. Without knowing the maximum number of paths the receiver wants to receive, the sender may send more than that number of paths. [I-D.ietf-idr-add-paths-guidelines] provides recommendations for the use of BGP ADD-PATH while implementing specific applications.
This document specifies a BGP capability [RFC5492] that complements the ADD-PATH Capability [RFC7911] by indicating the maximum number of paths a BGP speaker can receive from a peer. This indication allows the sender to optimize the transmission of BGP routes by selectively relaying pertinent routes instead of the entire set.
Specification of Requirements
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.
PATHS-LIMIT Capability
The PATHS-LIMIT Capability is a BGP capability [RFC5492], with Capability Code 76. The Capability Length field of this capability is variable. The Capability Value field consists of one or more of the following tuples:

    +------------------------------------------------+
    | Address Family Identifier (2 octets)           |
    +------------------------------------------------+
    | Subsequent Address Family Identifier (1 octet) |
    +------------------------------------------------+
    | Paths Limit (2 octet)                          |
    +------------------------------------------------+

The meaning and use of the fields are as follows:
- Address Family Identifier (AFI):
This field is the same as the one used in [RFC4760].
Subsequent Address Family Identifier (SAFI):
This field is the same as the one used in [RFC4760].
Paths Limit:
This field indicates the maximum paths limit the receiver wants to receive from its peer. If the received Paths Limit is zero (0), the tuple SHOULD be ignored.
A BGP speaker that wishes to indicate support for multiple AFI/SAFIs MUST do so by including the information in a single instance of the PATHS-LIMIT capability.
The PATHS-LIMIT capability MUST be ignored if the ADD-PATH capability is not present.
If the PATHS-LIMIT capability is empty (i.e. the Capability Length field is set to 0), it means that the sender doesn't have any specific limits to communicate.
An AFI/SAFI tuple MUST be ignored if the same tuple was not received in the ADD-PATH capability.
If more than one tuple is received for the same AFI/SAFI pair, only the first tuple should be considered. All others MUST be ignored.
A sender advertising multiple paths for the same prefix SHOULD send only the specified maximum number of paths indicated in the PATHS-LIMIT capability.
An implementation SHOULD provide a configuration knob to specify the maximum number of paths to accept from a sender.
IANA Considerations
IANA has assigned capability number 76 for the PATHS-LIMIT Capability described in this document. This registration is in the BGP Capability Codes registry.
PATHS-LIMIT Capability
Value | Description
76 | PATHS-LIMIT Capability
Security Considerations
This document defines a BGP extension that allows a receiver to better control the number of routes it receives when using BGP ADD-PATH [RFC7911]. Use of the PATHS-LIMIT capability can then mitigate some of the security-related concerns expressed in [RFC7911].
A rogue node or misconfiguration can result in the advetisement of a Paths Limit value that is too low for the application being used. This can result in inconsistent forwarding. Describing applications for BGP ADD-PATH is outside the scope of this document. Users of the PATHS-LIMIT Capability are encouraged to examine the behavior and potential impact by studying the best practices described in [I-D.ietf-idr-add-paths-guidelines].
Acknowledgements
The authors would like to thank everyone who has commented on this work, including Robert Raszuk, Shyam Sethuram.
References
Normative References
Informative References
[RFC7911]
[I-D.ietf-idr-add-paths-guidelines]
[RFC5492]
[RFC2119]
[RFC8174]
[RFC4760]

Implementation Report
According to RFC 7942, "This will allow reviewers and working groups to assign due consideration to documents that have the benefit of running code, which may serve as evidence of valuable experimentation and feedback that have made the implemented protocols more mature".
FRRouting implementation.