Re: Is there a way to clear sessions created by «neighbor range» option?

Valery Lutoshkin vpluto at gmail.com
Sun Mar 12 11:50:33 CET 2023


Thank you, this is exactly what I needed!

Just made a simple bash script to clean BGP and it worked. Quite sure it
could be better, but for my case it is good enough :)

#!/bin/bash
birdc sh pro | grep start | grep dynbgp | cut -d " " -f1 | while read
line || [[ -n $line ]];
do
  birdc disable $line
done
birdc configure



От 12 марта 2023 г. в 13:33:45, Maria Matejka via Bird-users (
bird-users at network.cz) написал:

Hello!

IIRC, the right way to do it is to call

disable X;

for X in all protocol names you want to clear, and then request
reconfiguration which should clear them.

BTW thank you for pointing at this feature. There is currently no
automatic test suite for dynamic BGP and we should definitely add it.

Maria

On 3/12/23 09:19, Valery Lutoshkin wrote:
> Hi,
>
> I use Bird 2.0.9 to spread a special list of prefixes via BGP to an
> unknown list of users, so I use “neighbor range 0.0.0.0/0
> <http://0.0.0.0/0> external;” and a passive mode.
>
>
> In this situation, there are some dynamic protocols created by port
> scanners or some other one-time connections. It is not a big deal, but
> after some time the “show protocol” output looks huge, and I presume
> Bird eats more memory with several thousand connections.
>
>
> The only way I found to clear those dynamic protocols was to restart
> Bird, but this affects real users of the service.
>
>
> Is there another way to clear unsuccessful dynamic protocols? I can
> parse the list of it, but still I didn’t find a way to clear a specific
> protocol, like “clear protocol dynbgp2049” or smth. The best way would
> be to clear “all protocols in the start state”, but AFAIK right now
> there is no command like that in Birdc.
>
>
> Best regards,
> Valery
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://trubka.network.cz/pipermail/bird-users/attachments/20230312/53908c0f/attachment.htm>


More information about the Bird-users mailing list