Updated:
I use Batman for L2 meshing, with wired and wireless links as backhaul, using Openwrt hosts (near git master, on 5.10) and Debian bullseye
On all my in-use OpenWrt devices with DSA (MT7621, Realtek) I have issues using the wired interfaces as backhaul. MTU needing to be higher than 1560 to avoid crap performance is only one of problems.
For MT762X, MTU 2030 is possible, with this backport to 5.10 from patches linked to by @LGA1150
Since ipq40xx and ath79 (qc8k) will probably soon be joining the list of DSA-targets, I would like to see, if my current usage of batmanOnDSA is somehow wrong.
So, on a DSA-target, we have 1(or more LAGged) CPU-port, usually eth0, mtu 1504 on mt7621 and realtek, with a bunch of lanX@eth0 interfaces set to MTU 1500, all bridged into a vlan-aware-bridge switch
, also mtu 1500. The CPU-port on MT7621 can be set to 2030 after the kernel patch.
I would like to use some of the wired ports for backhaul traffic and some for user traffic, and some ports carrying both through different VLANs.
First intuition:
- set configuration of eth0 (DSA master port) to MTU 2030.
- Set the
switch
bridge interface and alllanX
ports MTU to 2026 - Define 1 additional VLAN on bridge for batman hardif traffic, e.g. 7.
- Add VLAN7 to some ports, either tagged, or untagged PVID
- configure
switch.7
to have a MTU of 2026, and to have its master set to thebat0
device. - set unique MAC addresses on most L2 links.
- add bat0 to the switch slave ports.
That would leave the User VLAN at normal MTU 1500, and enable switch-level forwarding for user and batman-traffic, while also enabling the MT7621 and realtek devices to participate in the mesh.
But that has following problems:
- MTU of LAN-ports doesn't change (But switch passes large packets between ports). Are they supposed to?
- Large packets don't arrive at the master port
- switch.7 cannot be added as a slave to
bat0
:Resource busy
.ip l set down
didn't help.
-> fail.
Second try: Use a separate bridge, e.g. hi4b
for batman hardif wired L2 interfaces, e.g. lan3
& lan4
, and add that to bat0
.
-> Doesn't work either: batman on DSA-host sees no neighbors in batctl n
(But they show up in brctl showmacs hi4b
) . Curiously the non-DSA batman hosts attached to lan3
& lan4
, they do see the DSA host in their neighbor list, but can't batctl p
ing it, only each-other.
IPv6 traffic (and login over SSH) works, using the fe80::
auto-generated addresses.
3rd try: add the lan{3,4}
ports directly to bat0
, no intermediary bridge.
--> Fail, similar result as above, but now IPv6 doesn't work at all, and the non-DSA-hosts see the MAC of eth0
as batman neighbor, but communication doesn't work.
To me, the above points to (at least) 3 separate problems (with my usage of) DSA and VLAN-switches:
- MTU setting/display is faulty.
lanX
always stay at 1500. -
switch.X
interfaces should be able to be used as batman hardIfs. - the bridges somehow filter/block/drop the batman broadcasts incoming. (i see them with tcpdump on the
lanX
interfaces though).
At this point I'm dreading the switch-over to DSA for ath79 and ipq40xx, because there I can still use the wired ports as wanted.
Or how is batman supposed to be used on DSA-targets? Can somebody help me debug this?