[Babel-users] Multiple internet gateways in the mesh

Dave Taht dave.taht at gmail.com
Sun Nov 7 19:56:45 GMT 2021


On Sun, Nov 7, 2021 at 10:42 AM Mark Shuttleworth
<mark.shuttleworth at canonical.com> wrote:
>
> Hi folks
>
> I run a mesh across three sites each of which has their own internet
> connection, but they are of different capacities.
>
> Babel does a great job of keeping the three sites talking to one
> another. But I am unable to get the default route behaviour that I would
> like.

> I would like to use the fastest internet connection that is
> available for the whole mesh. If I can get all traffic going out of the
> fastest internet connection, that would be great, and if not I'd like
> the mesh to fall back to the second fastest, and finally third fastest
> connection.

Philosophically... what do you mean by fastest? Different capacities as per
your above is one thing, but a heavily congested "high speed link" with an
enormous bufferbloated FIFO is far worse than a fq_codel'd one.

> I have a hack which pings from each site to see if its own internet
> connection is up. If it is, it installs a default route. The metric of
> the installed route reflects the speed of the connection. If its own

Do you mean capacity, or "speed"? How are you deriving "speed"?
with the ping rtt?

Babel has an rtt metric:

https://datatracker.ietf.org/doc/html/draft-ietf-babel-rtt-extension-00

which does indeed work assuming all your links are short FIFOs or
all your links are fq_codel'd or sch_cake'd, and the physical rtt differences
are big enough to make a wise choice feasible. So if the "faster" link is
closer, a good choice is made.

You enable timestamping and that metric, see man page.

However this does not allow for physical preference of a link of more
capacity  (and with a big fifo it ends to oscillate routes with load,
one link goes idle, gets a lower rtt, switches routes). So perhaps the
rtt metric is not what you want.

I have one suggestion below that might help on txcost and rxcost.

> link is down, it removes any default route, so that Babel will tell it
> to use another default route from elsewhere in the mesh. What I was
> hoping is that Babel would install multiple default routes,

I would like it to do that too.

> with metrics
> that reflect the speed of the relevant internet connection.
> So the
> router for a particular site might have its own default route with
> metric 500, and get a route from elsewhere in the mesh via Babel with a
> lower metric. That isn't happening. It seems that Babel will not put its
> own proto route into the table, if there is a static route already
> configured.
>
> I've tried playing with "allow-duplicates 20", but Babel crashed (1.10).
> I poked at babel-pinger despite the warnings (:-)) but was unable to
> figure that out.
>
> Any other suggestions?
>
> For reference on of the hosts babel.conf looks like this:
>
> # For more information about this configuration file, refer to
> # https://www.irif.fr/~jch/software/babel/babeld.html
> pid-file /var/snap/babeld-sabdfl/common/pid
> log-file /var/snap/babeld-sabdfl/common/log
> state-file /var/snap/babeld-sabdfl/common/state
> link-detect true
> reflect-kernel-metric true
> interface bond-lan type wired rxcost 100

> interface bond-plein-1 type wired rxcost 24
> interface bond-plein-2 type wired rxcost 23
> interface bond-protea-1 type wired rxcost 25
> interface bond-protea-2 type wired rxcost 26
> interface bond-peer type wired rxcost 55

I will defer to others as to what to do here, as I'm out of practice
but these should be much larger, and powers of two, X * 64 or 96 IMHO.

> redistribute ip 0.0.0.0/0 eq 0 metric 128
> out ip 0.0.0.0/0 ge 32 deny
> redistribute ip 192.168.0.0/16 ge 24 allow
> redistribute local deny
>
> Mark
>
>
>
>
> _______________________________________________
> Babel-users mailing list
> Babel-users at alioth-lists.debian.net
> https://alioth-lists.debian.net/cgi-bin/mailman/listinfo/babel-users



-- 
I tried to build a better future, a few times:
https://wayforward.archive.org/?site=https%3A%2F%2Fwww.icei.org

Dave Täht CEO, TekLibre, LLC



More information about the Babel-users mailing list