[Babel-users] Multiple internet gateways in the mesh
Mark Shuttleworth
mark.shuttleworth at canonical.com
Sun Nov 7 16:19:56 GMT 2021
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.
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
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, 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
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
More information about the Babel-users
mailing list