Community discussions

MikroTik App
 
chanklish
newbie
Topic Author
Posts: 36
Joined: Wed Jan 08, 2020 12:44 pm

jumbo frame (mtu) and bridge

Tue Oct 04, 2022 3:37 pm

hello everyone
i have 3 x mikrotik switches all acting as a bridge and connected with each other by sfp+
I have around 50 users and one hyperv server - most can support jumbo frames
I have increase the mtu on the port of the server and one test user and i was able to ping with around 8980 bytes without fragmentation
i plan to increase the mtu for all supporting users but my question is should i also increase the mtu on the bridge ? i know the bridge will take the mtu of the smallest port automatically .. but would the traffic from the server to the users remain in 9000 ?
thank you
 
User avatar
mkx
Forum Guru
Forum Guru
Posts: 11598
Joined: Thu Mar 03, 2016 10:23 pm

Re: jumbo frame (mtu) and bridge

Tue Oct 04, 2022 4:13 pm

There are two different settings: l2mtu and mtu. And they are set in different places, e.g. under /interface ethernet (for ethernet ports), /interface wireless (for physical and virtual wifi interfaces) and /interface bridge (for bridge interface ... see this topic for explanation of different bridge personalities).

Now about l2mtu VS. mtu:
  • frame on the physical medium (e.g. UTP cable) has some overhead, pure ethernet overhead is 18 bytes, VLAN/802.1q adds 4 bytes on top of ethernet or multiple if VLAN tag stacking in use, etc. Which means if ethernet transports "standard" 1500 byte IP packet, frame size on the wire will be 1518 bytes or more. Bridges and switches have to buffer whole frame if they operate in store-and-forward mode (most of them do), so they need enough buffer space. Since their memory is not unlimited, they impose limit on frame size that they can handle. And that's l2mtu size. When your MT device is used as switch in network using jumbo frames, l2mtu size on bridge port members (e.g. ether1, sfp-sfpplus10, ...) has to be set to at least (IP-MTU + overhead). For 9k packets that means at least 9018 (or 9022 if single layer of VLAN tags is used). If switch/bridge receives frame with size exceeding l2mtu, it will likely experience overrun and will drop frame. Similarly end device will possibly drop oversized frame.
    IIRC bridge l2mtu setting will match lowest value of bridge port members.
  • in order for IP device to know, what is the maximum IP packet size allowed on physical network, one has to set appropriate MTU size (parameter mtu, it's about L3), so that IP stack (and higher layers, e.g. TCP or UDP or ICMP) can fragment data chunks to optimal sizes. The gotcha with non-standard MTU sizes is that all devices in same L3 (IP) subnet has to use same MTU size ... if one of devices in same network is capable of smaller MRU size (by default MRU is same as MTU), it'll drop oversized packets. Same is true for routers where every IP interface can have different MTU and router will, if allowed, fragment packets into smaller ones to handle the MTU size difference.
    Bridge interface property mtu is L3 MTU for IP interface associated with bridge (i.e. when router has IP address set on bridge interface). If the device is configured as a switch, then bridge MTU setting will only affect management connections. If bridge does not have IP address associated, then bridge mtu has no meaning (even if there's some slave interface, such as vlan interface ... that interface will have its own mtu setting, l2mtu will be inherited from it's master interface - i.e. bridge interface - reduced by own overhead size). If device is configured as router, then bridge MTU will affect traffic between different network segements (e.g. between LAN and internet). However mtu setting will not increase with increased l2mtu (that could be dangerous), but will probably decrease with l2mtu (or it will show an error if l2mtu falls below what's minimum for set mtu value).

So l2mtu has to be large enough to accommodate traffic flowing over network. It can be set much higher, but I guess l2mtu also defines number of frames that can be buffered by bridge/switch (divides total available memory with l2mtu and gives number of frames that can be buffered). Setting l2mtu way too high then means reduced buffering capacity (which is not always a bad thing).
 
chanklish
newbie
Topic Author
Posts: 36
Joined: Wed Jan 08, 2020 12:44 pm

Re: jumbo frame (mtu) and bridge

Tue Oct 04, 2022 4:38 pm

excellent explanation but i still dont understand : should i keep it by default ? currently i use MTU 9000 and L2 MTU : 9080 (on the ethernet ports) but it is still 1500 on the bridge
weirdly i can ping more than 8900 without fragmentation

i read it carefully : bridge L2 Mtu has no effect on the port .. it is just for management
correct ?
 
User avatar
mkx
Forum Guru
Forum Guru
Posts: 11598
Joined: Thu Mar 03, 2016 10:23 pm

Re: jumbo frame (mtu) and bridge  [SOLVED]

Tue Oct 04, 2022 9:00 pm

currently i use MTU 9000 and L2 MTU : 9080 (on the ethernet ports) but it is still 1500 on the bridge
weirdly i can ping more than 8900 without fragmentation
Ping what from where? If you're running ping on one of LAN hosts and pinging another LAN host whereas MT (configured as switch) is between those two ... then it's l2mtu setting (large enough) that enables that pinging. Settings on bridge interface don't have anything to do with it.

If you're running ping on one of LAN hosts and pinging MT's IP address (bound to bridge interface), then it leaves me confused.

i read it carefully : bridge L2 Mtu has no effect on the port .. it is just for management
correct ?
Yes.

Who is online

Users browsing this forum: Amazon [Bot], Bing [Bot], dzo, JesusMarino, RBrogen and 136 guests