Filter based on BGP protocol status ...

Maria Matejka maria.matejka at nic.cz
Thu Mar 24 08:27:19 CET 2022


Hello!

> Is there any way to filter a export route based on another BGP session 
> status?

No and it isn't in a short-term plan. The multithreaded version may get 
some better API to do it, yet I won't promise anything specific.

> For the sake of simplicity let’s say we have just two providers A and B, 
> and I only want to export some specific routes to B when A is down.
> 
> I can do it externally with a quite simple script (For example: Check if 
> the provider is down via CLI and if it’s down insert the routes I want 
> to export to a kernel table and export that to provider B) but it would 
> be nice if I could do it directly in Bird.
> 
> I’ve been scratching my head around this, but unless there is something 
> like if proto.A == down on the filters I don’t really see how to do it 
> (Or maybe some way to raise a global flag based on if I’m receiving 
> routes via provider B, but I don’t think that can’t be done either.)

I'd suggest to depreference the B-route by AS path stuffing, like 3-5 
times or so, to effectively force usage of the other route while still 
exporting it.

Maria


More information about the Bird-users mailing list