[PATCH] Add 'preferred' route attribute for selective add-path

Trisha Biswas tbiswas at fastly.com
Fri Feb 26 22:56:42 CET 2021


Hi all,

The attached patch adds a 'preferred' route attribute to check whether the
route being processed has been selected as the best-path for the network it
belongs to. This attribute does not take in a value, and returns a boolean.
This is useful for allowing selection in an add-path enabled BGP session.

The motivation behind selective add paths is to reduce the number of routes
that are shared in an add-path enabled BGP session on a per-prefix basis.
Instead of sending all paths to all destinations for an add-path session,
we would like to specify prefixes (and/or other route attributes) for which
all paths are to be shared. Further, if there are thousands of ways to
reach a destination, simply negotiating add paths for a prefix would result
in sharing all additional paths to the peer. This in turn would result in a
flood of advertisements to be sent between the nodes, and a high memory
footprint on the peer. To avoid this, we are considering a filter-based
selection criteria that would unlock the potential of purposefully sending
additional paths when desired.

Adding the 'preferred' keyword allows us to always send the best-path
whether or not other criteria in the export filter match. In the following
example, a route is exported when it is either the best route or one of
172.16.0.0/16, 10.0.0.0/8{16,24} (regardless of best route status). In the
case of 8.8.8.0/24, we export it if it's the best route, or if it
additionally has the specified extended community attached to the route.

protocol bgp {
[....]
add paths tx;
export filter {
if preferred || (net = [172.16.0.0/16, 10.0.0.0/8{16,24}]) then accept;
if preferred || (net = 8.8.8.0/24 && (ro, 1, 2) ~ bgp_ext_community) then
accept;
#remaining filter code
reject;
}
}

Cheers,
Trisha
--

*Trisha Biswas* | Sr. Software Engineer, Network Systems
fastly.com | @fastly <https://twitter.com/fastly> | LinkedIn
<http://www.linkedin.com/company/fastly>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://trubka.network.cz/pipermail/bird-users/attachments/20210226/2fd72042/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: selective_add_path.patch
Type: application/octet-stream
Size: 3841 bytes
Desc: not available
URL: <http://trubka.network.cz/pipermail/bird-users/attachments/20210226/2fd72042/attachment.obj>


More information about the Bird-users mailing list