Change MTU on single VLAN


Is it possible to use different MTU on some VLANs?

Im having an idea to put batman-adv traffic over one wired port also so it only users Wifi when needed.


Hmmm, you've got me scratching my head, as MTU is sort of a property of an interface or link or path between two interfaces, not of a VLAN itself. Yes, you can configure the MTU of the pseudo-interfaces created for a VLAN (as in reducing it from the "native" interface's MTU), but I'm not sure what you're trying to accomplish.

What is your use case and desired behavior?

Yes, B.A.T.M.A.N. should be transport agnostic and work over "any" link.

I have wired ethernet to many rooms in the house and also to my garage and workshop. Thought I could use those wires in the mesh also so the Wifi band would not be so crowded and so on.

I did get it to work with a crossover between two routes, but I guess there will be fragmentation when MTU on wifi side is 1536 and ethernet has 1500. Only tested with pings yet.

Then I had a vision to put the mesh on a VLAN in the managed switch so only some wallplugs/rooms will get the mesh, ie where the routers will be.

Since pings are seldom anywhere near the MTU, I'd try ssh or the like. If the connection "freezes" it is likely an path-MTU (PMTU) problem. Bridged protocols have challenges when there is an MTU restriction, such as a tunnel with an MTU less than 1500, for some technical, non-OpenWrt reasons related to how PMTU is determined.

Conceptually, it all should "just work" if everything is routed as each hop can know the originator of an oversized packet for the egress link's MTU. I don't know enough about how B.A.T.M.A.N. handles PMTU discovery to be able to confirm that though. Yes, once it's working, the PMTU will be the MTU of the "narrowest" link, possibly with an additional reduction from packet encapsulation.

From it looks like VLAN tags are handled in some way, but I haven't looked into it further at this time.