Bridge and VLAN Interface on bridge MTU problem : MTU needs to be L2MTU - 1 ??

RB5009 using RouterOS 7.14RC1 :

When adding a VLAN interface on a bridge, it is not possible to have MTU = L2MTU.


For example, if the available L2MTU is 1600 on the VLAN interface, then it is not possible to get a MTU of 1600. If i try to put MTU = 1600, then the interface revert to MTU = 1500 silently without any error message (using Winbox).

If i put MTU = 1599, then it is ok. Seems like we need to reduce the MTU 1 byte below the L2MTU size, if not the value is rejected and defaulted to 1500.


Seems like a bug that was not present a few versions ago. We should be able to put the same MTU as the L2MTU.

Same problem on the bridge interface.

How to reproduce :

  1. create a bridge interface with L2MTU = 1604.

  2. create a VLAN interface on this bridge. Available L2MTU is then 1600 (1604 minus 4 bytes for the VLAN header).

  3. try to increase the VLAN interface MTU to 1600. → it will silently revert to 1500.

  4. the maximum MTU available without silent reverting to 1500 is 1599. It should be 1600.

Generally setting MTU to a random value is wrong. Generally all devices in same IP subnet (which talk to each other without gateway) should have the same MTU set and unless one knows (much better) industry standard value of 1500 is safe to stick to.

And L2MTU has to be larger than MTU as L2 frame has to hold entire L3 packet (sized up to MTU; L2 equipment don’t fragment packets, they drop oversized ones) and its own overhead (for ethernet that’s 18 bytes + optional 4 byte VLAN tag). Generally it’s safe to have L2MTU much larger than this, but then Tx buffers have to be allocated larger (and less of them fit into available RAM).

So the actual bug here is that ROS allows you to set MTU larger than 1600-18=1582 bytes.

I think that you are wrong.

First, Ethernet header is 14 bytes, not 18.

Second, Mikrotik L2MTU never takes into account the size of the Ethernet header, it takes only DATA + IP header + VLAN and eventual other encaps. It means that when the L2MTU is 1500 for example, you can have a max MTU of 1500, for simple routing without VLAN.

Mikrotik L2MTU is Data + IP header. See the example for simple routing without VLAN :
.
L1-MTU.png
You are confusing L2MTU with Hardware MTU. Hardware MTU takes into account the size of the Ethernet header :
.
Simple routing MTU.png
.
Then when you have a L2MTU of 1600 (in my case i absolutely need it because my provider is set to this value for tunneling), you should have a max MTU of 1600, not 1599. And we should have an error message when trying to put more than 1600. Not a silent revert to 1500 like actually.

The important thing to remember is that without any VLAN or other encap headers, max MTU = L2MTU.

Edit : even more strange, this time my VLAN interface MTU reverted without any intervention to 1500. Then now i can’t put more than 1598 instead of 1599… Something is definitely broken.