<div dir="auto">I know that it is not the focus of your question, and also is not the focus on this mail list, but...<div dir="auto"><br></div><div dir="auto">To that kind of automation, the best BGP engine you will find is ExaBGP. It is not focuses in been in compliance with all the concepts of a routing system itself. It's focus is exactly automations using API.</div><div dir="auto"><br></div><div dir="auto">The scenario you described triggered-me something like a Zabbix looking to the status of BGP sessions of bird, and based on that doing API queries to a ExaBGP that is a iBGP peer of Bird.</div><div dir="auto"><br></div><div dir="auto">This model is used on many tools focused in anomaly detection for triggering DDoS mitigation.</div><div dir="auto"><br></div><div dir="auto"><br></div><div dir="auto">But, if your intention is a much simpler scenario, the suggestion Maria made is the most common!</div><div dir="auto">You can used also some BGP communities(if your upstream supports it) for no-export for some prefixes... Sometimes it helps.</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Em qua., 23 de mar. de 2022 12:10, Xavier Trilla <<a href="mailto:xavier.trilla@clouding.io">xavier.trilla@clouding.io</a>> escreveu:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div lang="ES" link="#0563C1" vlink="#954F72" style="word-wrap:break-word">
<div class="m_4536563314747235789WordSection1">
<p class="MsoNormal">Hi,<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal"><span lang="EN-US">I’m quite sure this cannot be done, but I also know there is a lot of BIRD I still don’t know, so here it goes:<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US"><u></u> <u></u></span></p>
<p class="MsoNormal"><span lang="EN-US">Is there any way to filter a export route based on another BGP session status?<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US"><u></u> <u></u></span></p>
<p class="MsoNormal"><span lang="EN-US">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.
<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US"><u></u> <u></u></span></p>
<p class="MsoNormal"><span lang="EN-US">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.<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US"><u></u> <u></u></span></p>
<p class="MsoNormal"><span lang="EN-US">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.)<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US"><u></u> <u></u></span></p>
<p class="MsoNormal"><span lang="EN-US">Thanks for your time!<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US">Xavier<u></u><u></u></span></p>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
</div>
</blockquote></div>