Force bird to update bgp route configuration after X seconds

Maria Matejka maria.matejka at nic.cz
Tue Mar 28 21:01:02 CEST 2023


Yes, import from kernel or import by e.g. ExaBGP or even by another instance of BIRD via BGP is definitely a thing. The main question is imho about scaling – how big is the original config, how many routes are being inserted and what latency is required. 

Maria

On 28 March 2023 20:22:00 CEST, Hugo Slabbert <hugo.slabbert at menlosecurity.com> wrote:
>For this specific use case, you could also couple this through creating the
>static routes to blackhole in a discrete kernel routing table, creating a
>kernel protocol definition in BIRD config for that kernel routing table,
>and then importing those kernel routes from there, yea? That does only
>speak to this specific requirement rather than the overall question of "hot
>config reloads", but may address Pedro's specific use case?
>
>On Tue, Mar 28, 2023 at 12:02 AM Maria Matejka via Bird-users <
>bird-users at network.cz> wrote:
>
>> Hello!
>>
>> Yes, you shall run "birdc conf" yourself when your conffile is ready. What
>> if BIRD started the autoreconfig right when you're writing the file? You
>> could easily get strange behavior like accidentally removing a bunch of
>> protocols by loading a partial config file. You'd have to assure atomic
>> exchange of the file – and this way, you may just run the reconfigure
>> command explicitly anyway.
>>
>> There are some internal drafts on how to dynamically add routes without
>> having to reload possibly large config files, yet we haven't decided on any
>> approach yet, let aside actually implementing it.
>>
>> Maria
>>
>> On 28 March 2023 00:55:04 CEST, "Pedro Henrique de Araújo Marques" <
>> pedroam27 at hotmail.com> wrote:
>>>
>>> Good evening, I'm doing some tests with BIRD for a while now and I would
>>> like some help with a problem I'm facing. I have the following BIRD
>>> configuration:
>>>
>>> *router id 10.0.0.128;*
>>>
>>> *ipv4 table master4;*
>>> *ipv6 table master6;*
>>> *flow4 table flowtab4;*
>>> *flow6 table flowtab6;*
>>>
>>> *filter subnet_group1{*
>>> *                if(bgp_community.len = 0) then {*
>>> *                        bgp_community.add((555,555));*
>>> *                        accept;*
>>> *                }*
>>> *                else{ accept; }*
>>>
>>> *};*
>>>
>>> *protocol bgp uplink1{*
>>> *        local as 129;*
>>> *        neighbor 10.0.1.128 as 128;*
>>> *        multihop 1;*
>>> *        ipv4{*
>>> *                import filter { accept; };*
>>> *                export filter subnet_group1;*
>>> *        };*
>>> *        ipv6{*
>>> *                import filter { accept; };*
>>> *                export filter subnet_group1;*
>>> *        };*
>>> *};*
>>>
>>> *protocol static blackhole_ipv4_routes{*
>>> *        route 10.0.90.100/32 <http://10.0.90.100/32> blackhole;*
>>> *        route 10.0.90.99/32 <http://10.0.90.99/32> blackhole;*
>>> *        ipv4;*
>>> *};*
>>>
>>> I created a script that after some time it inserts some new routes into
>>> the  blackhole_ipv4_routes protocol defined above, let's say all of
>>> 10.0.0.0/24 for example. Is there an option that I could use in the
>>> config file to detect this change and update bird accordingly with the new
>>> table additions, or do I need to always call 'birdc -configure' after the
>>> script ends?
>>>
>>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://trubka.network.cz/pipermail/bird-users/attachments/20230328/ec60db24/attachment.htm>


More information about the Bird-users mailing list