Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 29 Jun 2013 13:56:22 -0700
From:      Peter Wemm <peter@wemm.org>
To:        Hiroki Sato <hrs@freebsd.org>
Cc:        freebsd-net@freebsd.org
Subject:   Re: Looking for a bgp listener that works with RADIX_MPATH / EQMP that's in HEAD
Message-ID:  <CAGE5yCq3HiE20J9-S1-gL_GRHfnV%2BQnxhMULYiJ%2B4E=T7fQywQ@mail.gmail.com>
In-Reply-To: <20130630.054258.1958564335251044000.hrs@allbsd.org>
References:  <CAGE5yCpTjKOeZDCKGU6QC_FVmNrbPnp4BiZP0fYi5oYxk1DgUw@mail.gmail.com> <20130630.054258.1958564335251044000.hrs@allbsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sat, Jun 29, 2013 at 1:42 PM, Hiroki Sato <hrs@freebsd.org> wrote:
> Peter Wemm <peter@wemm.org> wrote
>   in <CAGE5yCpTjKOeZDCKGU6QC_FVmNrbPnp4BiZP0fYi5oYxk1DgUw@mail.gmail.com>:
>
> pe> I'm looking for pointers to something that can listen to bgp default
> pe> route announcements from two outbound gateways and set a RADIX_MPATH
> pe> compatible default route based on whether one or both are alive.
> pe>
> pe> openbgpd from ports is extremely incompatible with RADIX_MPATH on 10.
> pe> You *have* to turn off fib (kernel routing table) updates or it will
> pe> destroy your machine when it runs out of physical memory for duplicate
> pe> routes.
> pe>
> pe> I know I can do an evil hack and poll the 'bgp show ...' output and
> pe> manually update the default route but that means updates are delayed
> pe> to the poll interval.  I'm hoping there is a more elegant solution
> pe> that already works and is immediately responsive to a change in bgp
> pe> state.
> pe>
> pe> The caveat is it *must* run on 10.x, with RADIX_MPATH enabled.  I'd
> pe> gladly run openbgpd if it actually worked.  openbgpd has some
> pe> awareness of mpath so it might be fixable but openbsd's multipath is
> pe> different to ours.
> pe>
> pe> Ideas?
>
>  Unfortunately openbgpd does not work well with RADIX_MPATH yet.  As
>  you pointed out, it is due to difference of multiple routes support
>  between FreeBSD and OpenBSD.  I think FIB handling can be improved,
>  but needs some more investigation for that.

Yes, the port is extremely dangerous if RADIX_MPATH is enabled.  It
does this sort of thing:

 cmd = RTM_ADD
 retry:
 error = routectl(cmdl, data);
 if (error && cmd == RTM_ADD) {
    cmd = RTM_CHANGE;
    goto retry;
 }

In short, it creates duplicates every single time there's a fib change
if you enable RADIX_MPATH.  This does not end well.

It appears that openbsd allows multiple overlapping routes to coexist
if they have a MPATH flag on them.  Our radix structure is quite
different from what I understand, but the routing socket interface
causes openbgpd to accidently work and spam the rables.

>  I think Quagga and BIRD can work with injecting ECMP routes into
>  RADIX_MPATH-enabled FIB.
>
> -- Hiroki

I'm looking for some examples.  See the bgpd.conf fragments I sent Scott.

-- 
Peter Wemm - peter@wemm.org; peter@FreeBSD.org; peter@yahoo-inc.com; KI6FJV
On IRC, talking about C++:
<BigKnife> I think that it is a good thing I will never meet Bjarne on a street
<BigKnife> cause really, I don't want to end up in prison or anything



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAGE5yCq3HiE20J9-S1-gL_GRHfnV%2BQnxhMULYiJ%2B4E=T7fQywQ>