Batman-adv bat0 mtu

I'm using batman-adv on a multilink (eth/wifi) network, and I cannot set MTU to 1532 on all interfaces.
One way to avoid fragmentation is to set bat0 MTU to 1468.
I tried setting mtu in /etc/config/network, but I can't seem to find the right place to set it.


config interface 'bat0'
    option proto 'none'
    option ifname 'bat0'
    option mtu '1468'

is not solving the problem.

Which version of batman-adv? Config was changed early this year to a hard interface structure.

1 Like
$ batctl  -v
batctl openwrt-2018.1-1 [batman-adv: openwrt-2018.1-8]
cat /etc/openwrt_release 
DISTRIB_DESCRIPTION='OpenWrt 18.06.4 r7808-ef686b7292'
1 Like

That is the older version and the last revision of the wiki page describing that configuration is

Unfortunately, "default" naming of interfaces can be confusing, as there can be "reuse" of the same name and that the physical interface and the batman-adv portal interface were challenging to unwind from each other.

From that linked page (as my memory of the older config style is very dusty), it shows

config interface 'nwi_mesh0'
        option ifname 'mesh0'
        option proto 'batadv'
        option mesh 'bat0'
#       option routing_algo 'BATMAN_V'
        option mtu '2304'
1 Like

I believe the configuration stanza you're referring to is setting MTU for mesh0 inteface, which is the physical interface.
What I wanted was to lower MTU for virtual interface bat0 to 1468 so that it would fit in a 1500 byte ethernet packet

That could well be -- it took me several days to wrap my head around the older config scheme!

1 Like