handling of unreachable routes with gateway direct

Alexander Zubkov green at qrator.net
Sun Nov 22 20:08:51 CET 2020


Hello,

Thanks for the reply. Yes, I also thought that setting gw will drop
the "recursive bit" and your solution is quite good.
But anyway, I also had another problem in that setup. I configured the
same link-local ipv6 on different interfaces and when I use "gateway
direct" it correctly sets the interface. But with "gateway recursive",
it performs a lookup, which may assign another interface with the same
ip to the route.
Maybe it would also make sense in recursive mode to make lookup
considering the interface, the route was received from.
I also would like to know if the patch I attached looks good in the
sense that it does not break some bird's internal assumptions, etc.
Because, as I said, when I tried to add recursive resolution, I got
segfaults. I probably miss some understanding of the code. So I am
afraid that such a patch could make some things bad too. I did some
basic tests and it works, but I have not tried it in production yet.

On Sun, Nov 22, 2020 at 3:17 PM Ondrej Zajicek <santiago at crfreenet.org> wrote:
>
> On Thu, Oct 01, 2020 at 11:19:24AM +0200, Alexander Zubkov wrote:
> > Hello,
> >
> > It seems reasonable, of course, but it breaks things for our case. So
> > I want to suggest some changes to make our setup possible. At the
> > moment, I consider the possibility of adding something like "gateway
> > <direct_with_recursive_fallback>" so that it would behave like
> > "gateway direct", but in the case of a non-reachable neighbour, it
> > would switch to recursive logic. What do you think? Whether this is a
> > good idea or maybe you can suggest some better variants?
>
> Hello
>
> Sorry for late answer. Perhaps it would make sense to have such hybrid
> mode (i would imagine it like 'if bgp_next_hop is from same network as
> BGP neighbor, use gateway direct, otherwise use gateway recursive'), but
> it seems like just another hack to avoid limited recursive handling
> (not supporting double recursion, which is a valid configuration).
>
> Also, it is something that could be done in import filter. Setting 'gw'
> attribyte removes recursive behavior for a route, so if you set BGP to
> 'gateway recursive', you can use:
>
>   if bgp_next_hop = from then gw = bgp_next_hop;
>
> To accomplish what you need.
>
>
> > We have a couple of reasons why we want "gateway direct":
> > We want to avoid double recursion, which is not allowed - we might
> > have some other recursive routes that use direct routes received in
> > this session. We could make separate sessions for direct and transit
> > routes, but I'm not sure that the whole thing would be simpler.
> > And there is an issue with next-hop resolution when we have the same
> > ips on different interfaces. As I understand, bird daemon currently
> > does not support that case.
>
> --
> Elen sila lumenn' omentielvo
>
> Ondrej 'Santiago' Zajicek (email: santiago at 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."


More information about the Bird-users mailing list