Limit of numbers of BGP communities
Hello all! How many standard communities, extended communities and large communities, user can apply on a route using Bird? BGP UPDATE message has finite size so I guess that there must be a limit somewhere. Regards, Grzegorz Ponikierski Senior Network Engineer Akamai Technologies AS20940 and AS21342
On Fri, Jul 12, 2024 at 02:30:10AM +0000, Ponikierski, Grzegorz via Bird-users wrote:
Hello all!
How many standard communities, extended communities and large communities, user can apply on a route using Bird? BGP UPDATE message has finite size so I guess that there must be a limit somewhere.
Hello There is no specific limit on communities, just a limit on overall BGP attribute length on export, which is 1 kB less than BGP message size (there is 1 kB reserved for prefixes). So with regular BGP messages, there can be at most 3 kB of attributes, which is ~768 standard, ~384 extended, or ~256 large communities. In fact, it is a slightly less due to attribute framing and presence of other attributes than communities. -- Elen sila lumenn' omentielvo Ondrej 'Santiago' Zajicek (email: santiago@crfreenet.org) "To err is human -- to blame it on a computer is even more so."
It assumes that Extended Length bit of Attribute Type is properly implemented so community attribute can use attribute length field as 2 octet field, right? How situation changes with RFC 8654<http://www.rfc-editor.org/info/rfc8654> - Extended Message Support for BGP? Regards, Grzegorz From: Ondrej Zajicek <santiago@crfreenet.org> Date: Friday, 12 July 2024 at 05:40 To: "Ponikierski, Grzegorz" <gponikie@akamai.com> Cc: "bird-users@network.cz" <bird-users@network.cz> Subject: Re: Limit of numbers of BGP communities On Fri, Jul 12, 2024 at 02:30:10AM +0000, Ponikierski, Grzegorz via Bird-users wrote: Hello all! How many standard communities, extended communities and large communities, user can apply on a route using Bird? BGP UPDATE message has finite size so I guess that there must be a limit somewhere. Hello There is no specific limit on communities, just a limit on overall BGP attribute length on export, which is 1 kB less than BGP message size (there is 1 kB reserved for prefixes). So with regular BGP messages, there can be at most 3 kB of attributes, which is ~768 standard, ~384 extended, or ~256 large communities. In fact, it is a slightly less due to attribute framing and presence of other attributes than communities. -- Elen sila lumenn' omentielvo Ondrej 'Santiago' Zajicek (email: santiago@crfreenet.org<mailto:santiago@crfreenet.org>) "To err is human -- to blame it on a computer is even more so."
On Fri, Jul 12, 2024 at 07:34:28AM +0000, Ponikierski, Grzegorz wrote:
It assumes that Extended Length bit of Attribute Type is properly implemented so community attribute can use attribute length field as 2 octet field, right?
Yes, that is a standard part of BGP.
How situation changes with RFC 8654<http://www.rfc-editor.org/info/rfc8654> - Extended Message Support for BGP?
With that enabled on both sides, there is still 1 kB reserved for prefixes, so you can have 63 kB for attributes, i.e. ~16128 standard, ~8064 extended, or ~5376 large communities. But propagation of such route will break on the first non-RFC8654 session.
On Fri, Jul 12, 2024 at 02:30:10AM +0000, Ponikierski, Grzegorz via Bird-users wrote: Hello all!
How many standard communities, extended communities and large communities, user can apply on a route using Bird? BGP UPDATE message has finite size so I guess that there must be a limit somewhere.
Hello
There is no specific limit on communities, just a limit on overall BGP attribute length on export, which is 1 kB less than BGP message size (there is 1 kB reserved for prefixes). So with regular BGP messages, there can be at most 3 kB of attributes, which is ~768 standard, ~384 extended, or ~256 large communities. In fact, it is a slightly less due to attribute framing and presence of other attributes than communities.
-- Elen sila lumenn' omentielvo Ondrej 'Santiago' Zajicek (email: santiago@crfreenet.org) "To err is human -- to blame it on a computer is even more so."
On 12 Jul 2024, at 04:30, Ponikierski, Grzegorz via Bird-users <bird-users@network.cz> wrote:
Hello all! How many standard communities, extended communities and large communities, user can apply on a route using Bird? BGP UPDATE message has finite size so I guess that there must be a limit somewhere.
The limit is that ISPs are limiting it to a 100: https://bgpfilterguide.nlnog.net/guides/many_communities/ Above that, it will be emptied completely in many networks. Greets, Jeroen
Unfortunately, this number of 100 BGP communities has no basis, at least not yet, in the RFC. It is just a recommendation (a very healthy one, by the way) from the NLNOG team. As far as I remember, neither the maximum mask limit of /24 for IPv4 nor /48 for IPv6 in a BGP session are defined in RFC as either must or should. It would be good if it were in the RFCs, but it is not. Em sex., 12 de jul. de 2024 às 06:43, Jeroen Massar via Bird-users < bird-users@network.cz> escreveu:
On 12 Jul 2024, at 04:30, Ponikierski, Grzegorz via Bird-users < bird-users@network.cz> wrote:
Hello all! How many standard communities, extended communities and large communities, user can apply on a route using Bird? BGP UPDATE message has finite size so I guess that there must be a limit somewhere.
The limit is that ISPs are limiting it to a 100:
https://bgpfilterguide.nlnog.net/guides/many_communities/
Above that, it will be emptied completely in many networks.
Greets, Jeroen
-- Douglas Fernando Fischer Engº de Controle e Automação
On 12 Jul 2024, at 14:57, Douglas Fischer <fischerdouglas@gmail.com> wrote:
Unfortunately, this number of 100 BGP communities has no basis, at least not yet, in the RFC.
A RFC is just a Request For Comments documents.... comments have been given amongst that in the form of the NLNOG BGP Filter Rules and other operators have also voiced their opinions, each network is their own. There is also no BCP (Best Current Practice) document on this subject; nor a STD (Standard). Operators can fortunately decide what they accept or not, own network, own rules, bit the point of an Autonomous System.
It is just a recommendation (a very healthy one, by the way) from the NLNOG team.
As far as I remember, neither the maximum mask limit of /24 for IPv4 nor /48 for IPv6 in a BGP session are defined in RFC as either must or should.
It would be good if it were in the RFCs, but it is not.
In a way, all the NLNOG BGP Filter Rules are effectively a BCP, it is just not a document that went through the IETF process. As it is a changing target, unlikely that a IETF BCP makes sense either IMHO. Greets, Jeroen
participants (4)
-
Douglas Fischer -
Jeroen Massar -
Ondrej Zajicek -
Ponikierski, Grzegorz