[Babel-users] MTU based routing for tunnel based babel networks?

Daniel Gröber dxld at darkboxed.org
Sun Jul 16 22:25:13 BST 2023


Hi Juliusz,

On Sun, Jul 16, 2023 at 09:22:40PM +0200, Juliusz Chroboczek wrote:
> > I've been running babel on top of my wireguard IPv6 network for a while now
> > and I have a problem that keeps biting me and I can't find a good solution
> > for: babel is oblivious to a link's MTU and picks paths that involve
> > wireguard-in-wireguard tunnels even though paths without this stacking are
> > available.
> 
> Is the MTU of your interfaces set correctly?  Please type
> 
>     ip link show
> 
> and check that the value is right.
> 
> Babeld already checks the interface's MTU, so if the MTU is set correctly,
> it's a simple matter of tweaking this code:
> 
>   https://github.com/jech/babeld/blob/master/interface.c#L300
> 
> If the MTU is not set correctly, then you'll run into trouble with
> higher-layer protocols.

I must have not explained the problem sufficiently because the interface
MTU doesn't matter at all here. All that is important is that tunnel
interfaces are involved in the L3 network carrying tunnel packets.

"Usually" the underlying L3 network is the IPv4 internet which has a (more
or less) predictable 1500 MTU, though I would call that a very
1500MTU-normative assessment. So the tunnel interface's MTU will be
1500 minus overhead. Easy.

Problem is when the underlay L3 network is composed of more tunnels and not
1500 MTU ethernet links, then at each hop the path MTU could be reduced by
the tunnel overhead again and again and again (across the entire
path). Hence no predictable MTU I can deploy across all my interfaces
exists. QED :)

Babeld really has to take care of the the *PATH* MTU not just look at
whatever is configured on the local interfaces for this to work.

Here's one way this could be done:

Enable a config option for "minimum path MTU" on each babel node. Nodes
then pad all hello packets to this size and set appropriate sockopts to
stop the kernel from doing PMTUdisc behind our backs (on IPv6) and setting
DF=1 (on IPv4). When paths with lesser MTU are encountered these packets
will simply get dropped by the network preventing neighbour relationships
from forming.

Problem solved :)

--Daniel



More information about the Babel-users mailing list