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
60
votes
6 answers

How to find the largest UDP packet I can send without fragmenting?

I need to know what the largest UDP packet I can send to another computer is without fragmentation. This size is commonly known as the MTU (Maximum Transmission Unit). Supposedly, between 2 computers, will be many routers and modems that may have…
Unknown
  • 45,913
  • 27
  • 138
  • 182
25
votes
6 answers

curl: (35) OpenSSL SSL_connect: SSL_ERROR_SYSCALL in connection to domain.com:443

I'm hitting my curl on ubuntu terminal and getting this response curl: (35) OpenSSL SSL_connect: SSL_ERROR_SYSCALL in connection to domain.com:443 . I really can't understand why it happens. I tried to show curl's error number but it did not revert…
Vineet
  • 4,525
  • 3
  • 23
  • 42
15
votes
5 answers

Do MTU modifications impact both directions?

ifconfig 1.2.3.4 mtu 1492 This will set MTU to 1492 for incoming, outgoing packets or both? I think it is only for incoming
cateof
  • 6,608
  • 25
  • 79
  • 153
9
votes
1 answer

Optimal SNAPLEN for PCAP live capture

When using pcap_open_live to sniff from an interface, I have seen a lot of examples using various numbers as SNAPLEN value, ranging from BUFSIZ () to "magic numbers". Wouldn't it make more sense to set as SNAPLEN the MTU of the interface we…
ziu
  • 2,634
  • 2
  • 24
  • 39
9
votes
2 answers

MTU 1500: fragment packets after 1472 bytes

I have couple of VMs running on Openstack. I have one data network gateway assigned into the switch with MTU=1500, where VMs has to running. Also in Openstack, I have set the default MTU=1500 of the network. I am trying to ping from the VM to…
tgcloud
  • 857
  • 6
  • 18
  • 37
9
votes
7 answers

How to know the MTU size of Android Smartphone

Any command to know the MTU size of Android?
user1507022
  • 91
  • 1
  • 1
  • 2
8
votes
2 answers

Does the MTU of a TCP packet include the TCP & IPv4 headers?

Or: What is the maximum payload size for a TCP/IPv4 packet. Much appreciated! Cheers.
James
  • 1,430
  • 4
  • 20
  • 27
8
votes
1 answer

What happens if my udp package is larger than mtu

What would happen if my udp package is larger than mtu? Say my package is 512 bytes, after encapsulated, the package is 572 bytes. In transporting, some intermediate node fix it mtu size to 512 bytes, so what happens? Does my package simply being…
user2269707
8
votes
2 answers

Can UDP packet be fragmented to several smaller ones

Can UDP packet be fragmented to several smaller ones if it exceeds MTU? It seems that MTU fragmentation is about IP layer so I think it can. If so, what is the recommended max. packet size to send over UDP to avoid fragmentation and why?
FrozenHeart
  • 19,844
  • 33
  • 126
  • 242
8
votes
4 answers

How to find mtu value of network through code(in python)?

I have to write a code where I need to send data using udp protocol in python. I need to set the packet size to the MTU value of the network. Is there any way that I can decide the MTU value of the network writing some code in python?
Rahul Katare
  • 115
  • 1
  • 2
  • 7
7
votes
3 answers

When I send a packet over tcp, it is split into two packets

I am developing an application in C#, using the server-client model, where the server sends a byte array with a bitmap to the client, the client loads it into the screen, sends an "OK" to the server, and the server sends another image, and so…
Joao Oliveira
  • 213
  • 1
  • 5
  • 8
7
votes
3 answers

Negotiate BLE MTU on iOS

I'm currently developing a BLE App for iOS. In my application I need to implement a segmentation protocol to send large quantities of data using BLE. My application need to have the Central role. My issue is that I can't get the negotiate MTU. I can…
anté75
  • 167
  • 1
  • 1
  • 8
6
votes
0 answers

Ignore Path MTU on Linux when sending UDP packets

I am implementing DPLPMTUD and I want to suppress the Linux kernel from returning -1 with errno = EMSGSIZE when I send UDP packet longer than the local interface's MTU. I want to avoid the pain of dealing with error handling when several datagrams…
Dmitri
  • 479
  • 3
  • 10
6
votes
2 answers

Sending raw IP Traffic with Python: Detect MTU

How can I implement a manual MTU discovery with Python? From: https://networkengineering.stackexchange.com/a/28988/23983 Send a ping to a target, in my example, I'll use Google's DNS server (8.8.8.8). Set your DF bit in your ping to on, to prevent…
guettli
  • 25,042
  • 81
  • 346
  • 663
6
votes
2 answers

How to change MTU setting permanently?

I need to permanently change MTU to 1500. By permanently I mean if I reboot the system or if I do service network restart it should always be 1500. I followed this article…
Vor
  • 33,215
  • 43
  • 135
  • 193
1
2 3
11 12