Is there any way to set different communities while importing prefixes?

Alexander Zubkov green at qrator.net
Thu Apr 13 01:46:00 CEST 2023


Hi,

Just look at the docs:
https://bird.network.cz/?get_doc&v=20&f=bird-6.html#ss6.14


On Wed, Apr 12, 2023, 23:57 Valery Lutoshkin <vpluto at gmail.com> wrote:

> Hi,
>
> I use Bird 2.0.9 to spread a special list of prefixes (about 100k) via BGP
> to an unknown list of users (around 1k).
>
> The prefixes are supposed to be marked by different communities (6 right
> now) and receivers should be able to filter them by those communities to
> use only prefixes they want.
>
>
> While only one community should be attached to the prefix, I use just 6
> different files with prefixes and attach the proper community in the import
> processes like this:
>
> protocol static importbgp_1 {
>
>         ipv4 { import filter {bgp_community.add((65000,1)); accept;}; };
>
>         include "/tmp/prefixes_1.txt";
>
> }
>
> Lines in the prefixes_1 file look like this:
>
> route 1.3.7.7/32 unreachable;
>
>
> But when I need to attach several communities to the prefixes, I have to
> create 2^6=64 different static protocols and generate 64 different files.
>
> And for 8 communities I will have to create 256 protocols and files.
>
>
> If I could add some marks to routes in the imported file, I would use
> those marks in the import filter to attach communities to the prefix.
>
>
> But if I’m not mistaken, there is no way of doing that.
>
>
> If there is a different solution to this issue that I’m unaware of, would
> you please let me know.
>
>
> Best regards,
>
> Valery
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://trubka.network.cz/pipermail/bird-users/attachments/20230413/2ec04bdc/attachment.htm>


More information about the Bird-users mailing list