BGP make client (default) announcement depend on ibgp/upstream peers being "up"
Hi, new bird / BGP user here, please bear with me :) Consider a scenario with a bird box acting as (one of several possible) gateway for a set of clients, while having an iBGP and/or upstream BGP connection where the "real routes" come from. Towards the client(s) a default route should be announced. Is it possible to make the client default route announcement depend on at least one of the upstream peers (iBGP, real upstream) being "up" and having sent us all its routes? Or, even more ideally, one of them being up, having sent all its routes, _and_ bird having gotten around to installing them all in the kernel (data plane)? Conversely, if for any reason no more upstream peers are up, kernel routes are withdrawm (shutdown), withdraw that default announce to the clients? Is this possible? (using bird 2.0.2) Is there a different approach to make sure the clients won't be fooled into sending us data plane traffic already while we're not ready for it yet? best regards Patrick
On Tue, Jun 12, 2018 at 08:00:10AM +0200, Patrick Schaaf wrote:
Hi,
new bird / BGP user here, please bear with me :)
Consider a scenario with a bird box acting as (one of several possible) gateway for a set of clients, while having an iBGP and/or upstream BGP connection where the "real routes" come from.
Towards the client(s) a default route should be announced.
Is it possible to make the client default route announcement depend on at least one of the upstream peers (iBGP, real upstream) being "up" and having sent us all its routes? Or, even more ideally, one of them being up, having sent all its routes, _and_ bird having gotten around to installing them all in the kernel (data plane)?
No, that is not currently possible directly in BIRD. You could make some shell scripts that tracks state of BGP sessions and/or number of routes and enable/disable a static protocol with default route. -- Elen sila lumenn' omentielvo Ondrej 'Santiago' Zajicek (email: santiago@crfreenet.org) OpenPGP encrypted e-mails preferred (KeyID 0x11DEADC3, wwwkeys.pgp.net) "To err is human -- to blame it on a computer is even more so."
On Tue, Jun 12, 2018 at 1:46 PM, Ondrej Zajicek <santiago@crfreenet.org> wrote:
On Tue, Jun 12, 2018 at 08:00:10AM +0200, Patrick Schaaf wrote:
Is it possible to make the client default route announcement depend on at least one of the upstream peers (iBGP, real upstream) being "up" and having sent us all its routes? Or, even more ideally, one of them being up, having sent all its routes, _and_ bird having gotten around to installing them all in the kernel (data plane)?
No, that is not currently possible directly in BIRD.
You could make some shell scripts that tracks state of BGP sessions and/or number of routes and enable/disable a static protocol with default route.
Thanks for the answer and suggestion, Ondrej! I can roughly see how that would work. Do you think such a feature might be interesting to have in bird itself - or is my idea too exotic? I'm not going to rush trying to implement something like that, but in case there's interest and I get bored it might be a good excuse to get my hands dirty with the code :) best regards Patrick
participants (2)
-
Ondrej Zajicek -
Patrick Schaaf