Force bird to update bgp route configuration after X seconds

Douglas Fischer fischerdouglas at gmail.com
Tue Mar 28 18:13:13 CEST 2023


Thanks a lot for the explanations!
Put like that, things make more sense.

On restructuring the configuration methodology.
Here in my head, separating things and being able to reload only those
small separate things makes a lot of sense.
But it's become clear that clearing the way for SMP will inevitably clear
the way for these other things.

Em ter., 28 de mar. de 2023 às 09:24, Maria Matejka <maria.matejka at nic.cz>
escreveu:

> Hello!
>
> >  From simple things like adding a route, updating a prefix-list...
> > Even with things like adding a new peer.
> > [...]
> > This is certainly not a simple thing to address.
> > But it is a pain that attacks several scenarios.
> >
> > I'm sure the developers have already had deep conversations about this,
> > and that SMP has a higher priority.
>
> Well, SMP has a higher priority at least in cases where the changes
> collide ­– we've already stumbled over several merging hells and the
> faster SMP gets its stable version, the faster is the other development
> as well.
>
> > But could you just mention what possibilities were considered to resolve
> > this issue?
>
> Mostly there are thoughts about creating a "temporary" static protocol
> by a CLI command in some or other way. The discussion mostly hits the
> questions of "classical" reconfiguration – the same way as the
> enable-disable problem with other protocols, for which there are even
> some outstanding patches.
>
> There are also ongoing discussions on completely changing the config
> structure, allowing for back-writing the actual config and being able to
> maka all the changes persistent.
>
> Another colliding topic is the client API; there is a future possibility
> of just opening a socket and feeding routes directly, yet also not
> exactly specified or well-planned now.
>
> In all cases, the main question isn't how to add the routes. That's the
> simple part. What it is all about, is when and how to safely delete them
> with no memory leaks, no use-after-free and no performance penalty on
> the hotpath. And that is surprisingly hard to model correctly.
>
> In fact, most of the time I spent on SMP went exactly to this – how to
> safely clean everything up in the right order without impeding
> performance badly. And still I'm opening more and more cans of worms.
>
> After SMP gets stable, our positions on this should clarify a lot as
> there are some specific ways how to do stuff inside SMP BIRD
> thread-safely and all the other ways just fail badly. Until then, the
> dynamic route insertion is just a well concealed footgun.
>
> Thank you for your understanding.
>
> Maria
>
>
> > Em ter., 28 de mar. de 2023 às 04:01, Maria Matejka via Bird-users
> > <bird-users at network.cz <mailto:bird-users at network.cz>> escreveu:
> >
> >     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 <mailto: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 <http://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?
> >
> >
> >
> > --
> > Douglas Fernando Fischer
> > Engº de Controle e Automação
>


-- 
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/20230328/94029048/attachment.htm>


More information about the Bird-users mailing list