Guidance on using custom BGP attributes for traffic engineering

Douglas Fischer fischerdouglas at gmail.com
Tue Aug 26 12:39:35 CEST 2025


Just out of curiosity...
Is this related to some Kubernetes CNI, or some kind of container underlay
that somehow bridges from the underlay to BGP engines within the containers?

I'm asking this because I've come across similar ideas in the past for
deploying PODs that required BGP to fail over to the outside world. For
example, Anycasts.

Em sáb., 23 de ago. de 2025 às 12:48, yazan slaila <yazan.slaila at hotmail.com>
escreveu:

> Hello there,
> I am currently working on my thesis and experimenting with the BIRD
> routing daemon. As part of my work, I added a new optional transitive BGP
> path attribute using the following configuration line:
>
> attribute bgp 200 bytestring new_attribute;
>
> The attribute appears correctly in the routing table as follows:  (birdc
> show route all)
> 192.168.5.0/24       unicast [router5 15:00:40.321] * (100) [AS5i]
> via 10.0.51.5 on eth2
> Type: BGP univ
> BGP.origin: IGP
> BGP.as_path: 5
> BGP.next_hop: 10.0.51.5
> BGP.local_pref: 100
> *BGP.c8 [t]: 20*
>
> And this is the way I declare it in my bird.conf file:
>
> filter export_with_new_attribute {
>   new_attribute = hex:20;
>   accept;
> }
> But now I would like to use it as part of traffic engineering decisions.
> Specifically, I would like to understand what steps are required in order
> to make this new attribute influence the BGP decision-making process for
> choosing the best path to route the traffic.
> Could you please advise:
>
>    1. Which files and functions in the BIRD source code are responsible
>    for the BGP path selection process that I need to edit to make my new
>    attribute come after LOCAL_PREF attribute in the priority list? Or if there
>    is a way to do this without the need to edit the source code.
>    2. Are the previous things correct to add a custom path attribute that
>    is doing something?
>    3. Why is it displaying like this: *BGP.c8 [t]: 20? *Is there a way to
>    make it appear like this: *BGP.new_attribute [t]: 20?*
>    4. Is there a standard or recommended way to extend BIRD so that a
>    custom attribute can be incorporated into route preference / best path
>    selection, and if I want to compare 2 values and choose the lowest path
>    that has this value?
>
> I would greatly appreciate any pointers or guidance that could help me
> move forward because I did not find any clues on that in your documentation.
> Thank you very much for your time and support.
> Best regards,
> Yazan.
>
>

-- 
Douglas Fernando Fischer
Engº de Controle e Automação
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://trubka.network.cz/pipermail/bird-users/attachments/20250826/3e1d7987/attachment.htm>


More information about the Bird-users mailing list