Questions tagged [mtu]

In computer networking, the MTU (Maximum Transmission Unit) of a communications protocol of a layer is the size (in bytes) of the largest protocol data unit that the layer can pass onwards.

MTU parameters usually appear in association with a communications interface (NIC, serial port...). Standards (Ethernet, for example) can fix the size of an MTU; or systems (such as point-to-point serial links) may decide MTU at connect time.

A larger MTU brings greater efficiency because each packet carries more user data while protocol overheads, such as headers or underlying per-packet delays, remain fixed.

However, this gain is not without a downside. Large packets occupy a slow link for more time than a smaller packet, causing greater delays to subsequent packets and increasing lag and minimum latency. Large packets are also problematic in the presence of communications errors. Corruption of a single bit in a packet requires that the entire packet be retransmitted.

169 questions
5
votes
1 answer

Docker change mtu on the fly?

I have production docker swarm with 9 stacks, most of them have volumes. Currently docker is running with single node. I have to add second node and it is the place where problems started. Especially the problem is with portainer - it becomes very…
Eddie
  • 1,436
  • 5
  • 24
  • 42
5
votes
2 answers

Path MTU discovery - where are ICMP responses?

I'm doing some experiments with path MTU discovery in Linux. As far as I understood from RFC 1191, if a router receives a packet with non-zero DF bit and the packet can't be sent to the next host without fragmentation, then the router should drop…
Rom098
  • 2,445
  • 4
  • 35
  • 52
5
votes
2 answers

Android Ble MTU size

I use BluetoothGatt.requestMtu(512) in my android application. First time it works well But Right after Mtu is changed automatically to 23 (default) I dont know what is the problem... this a log `D/BluetoothGatt: setCharacteristicNotification() -…
hungly
  • 63
  • 1
  • 6
5
votes
4 answers

Sending TCP frames of fixed length

I need to send some data over the subnet with fixed non-standard MTU (for example, 1560) using TCP. All the Ethernet frames transfered through this subnet should be manually padded with 0's, if the frame's length is less than MTU. So, the data size…
Grungegurunge
  • 107
  • 1
  • 4
5
votes
4 answers

set MTU in C programmatically

A client requested that the MTU limit should be 1492. Is there a way to do it in the source code (program in C)? Is there any other way to do it in general? (ifconfig?) Why does somebody needs to modify MTU to a certain limit? What is the benefit?…
cateof
  • 6,608
  • 25
  • 79
  • 153
5
votes
2 answers

Negotiating Bluetooth LE ATT MTU on Android and iOS central / peripheral in practice

On Android we have requestMtu and onMtuChanged, which seems to imply that we have to manually negotiate MTU sizes, if both central and peripheral devices are Android based (but I might be wrong and it might be that it happens also automatically upon…
JustAMartin
  • 13,165
  • 18
  • 99
  • 183
4
votes
2 answers

Change iOS BLE MTU size to 512 (SWIFT)

is there any way to change the MTU value on iOS from the default to an arbitrary value? Much like in Android it's possible to do requestMTU(512). Thanks
zorro
  • 75
  • 1
  • 6
4
votes
1 answer

Android BLE taking some delay after successful connection

I am working on Android app that connect to BLE device and do some process there. I have total 5 steps: After scanning and connectGatt() In onConnectionStateChange(), requestMtu() @Override public void onConnectionStateChange(BluetoothGatt gatt,…
4
votes
1 answer

How to change mtu size inside docker container?

I would like to change the MTU size from specific container, not at docker host, but any command are working, I've tried: ifconfig eth0 mtu 1400 and ip link set mtu 1400 dev eth0, but I've got "operation not permited", I'm already root user.
user2330314
  • 41
  • 1
  • 3
4
votes
2 answers

Request MTU is not working in Nougat

I am working on App which is communicate with BLE device.I can write 20 bytes easily on characteristics but when it is more than 20 bytes it's create problem.I am using mBluetoothGatt.requestMtu(512); write charateristics after getting success. …
MIkka Marmik
  • 1,101
  • 11
  • 29
4
votes
0 answers

Negotiating BLE MTU and characteristic sizes on iOS central and peripheral devices

I have an app which will be acting as a BLE central (scanning for peripherals), running on iOS 8 and above. Also I have a custom accessory acting as a peripheral (advertises a custom service with custom characteristics). I found out that default MTU…
JustAMartin
  • 13,165
  • 18
  • 99
  • 183
4
votes
2 answers

Is there a way to programmatically set an interface MTU using C in Linux?

At the moment my program is making a system() call to ifconfig to do this. It seems a bit messy - maybe ifconfig is not on the path, or in some non-standard location. And then I'd need to check for the iproute2 equivalent in case of failure. Is…
James
  • 65
  • 1
  • 5
4
votes
2 answers

When acting on a UDP socket, what can cause sendto() to send fewer bytes than requested?

When acting on a UDP socket, what can cause sendto() to send fewer bytes than requested? The motivation for asking this is to figure out the precautions I need to take to ensure I always get a complete message sent in a single call to sendto(), and…
duncan
  • 2,323
  • 3
  • 17
  • 21
4
votes
1 answer

On 'data' event, why is the data size multiples of 1374?

This is just a curiosity-based question, but I might learn something useful. With my Node.js server, as I received data through net.Server, I had it print out the size (in bytes) of each data "packet". socket.on 'data', (data) -> console.log…
Nick
  • 5,228
  • 9
  • 40
  • 69
3
votes
0 answers

Is it possible to change MTU value in android permanently

I have a rooted device and using static IP address on my phone. I am trying to change the MTU value using this command: adb shell su ifconfig wlan0 mtu 1440 but value reset back to default mtu(1500) when i reboot my phone. Is there any way…
user565
  • 871
  • 1
  • 22
  • 47
1
2
3
11 12