[j-nsp] Limit on the number of BGP communities a route can be tagged with?
Alexander Arseniev
arseniev at btinternet.com
Tue Aug 23 10:02:25 EDT 2016
Hello,
JUNOS allows You to use regex with communities
https://www.juniper.net/techpubs/en_US/junos16.1/topics/usage-guidelines/policy-defining-bgp-communities-and-extended-communities-for-use-in-routing-policy-match-conditions.html
So if You want to restrict ANY community value to no more than N
occurences, then
set policy-options community no-more-than-N-only members "^(.*):(.*){N+1,}$"
- and matching it in the BGP import policy should do the job.
And I never tested it myself...
You may need to construct another regex for extended communities though.
HTH
Thx
Alex
On 23/08/2016 14:04, James Bensley wrote:
> On 23 August 2016 at 13:40, Olivier Benghozi
> <olivier.benghozi at wifirst.fr> wrote:
>> And about a limitation to 10 communities:
>> I've seen that on SEOS (Redback/Ericsson OS for SmartEdge routers) when using "set community" in a route-map. This is a ridiculous arbitrary limitation, of course.
>>
>> Hopefully the limitation was only in the CLI, not in the BGP code itself. So the workaround was to use the route-map "continue" command like in a BASIC GOTO structure to add more communities in additional route-map entries (with set community additive - these are Cisco-like commands).
>>
>>> Le 23 août 2016 à 14:03, Alexander Arseniev <arseniev at btinternet.com> a écrit :
>>>
>>> In BGP messages, a regular community is encoded in 7 bytes, and extended one in 11 bytes.
>>>
>>> Max BGP message size is 4096 bytes - this sets a limit for regular communities number to about 4K/7=570, and for extended communities to about 4K/11=360, if You consider the minimal mandatory information that has to be there apart from communities.
>>>
>>>
>>> On 23/08/2016 03:18, Huan Pham wrote:
>>>> I remember hitting a limit on a number of communities (something like 10 or
>>>> so) on a platform (can not remember which one from which vendor). So I
>>>> believe that there is a hard limit a platform or OS can support.
>>>>
>>>> I test this in the lab and found no problem with tagging 100 communities.
>>>>
>>>> Is there a maximum number of communities that Junos can tag to a route? If
>>>> yes, then what it is? Thanks.
>
> Hi,
>
> Hopefully not completely hijacking this thread; I'm interested to know
> if there is a way I can limit a peer to a maximum number of
> communities?
>
>
> Cheers,
> James.
> _______________________________________________
> juniper-nsp mailing list juniper-nsp at puck.nether.net
> https://puck.nether.net/mailman/listinfo/juniper-nsp
More information about the juniper-nsp
mailing list