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
3
votes
2 answers

Tune MTU on a per-socket basis?

I was wondering if there is any way to tune (on a linux system), the MTU for a given socket. (To make IP layer fragmenting into chunks smaller that the actual device MTU). When I say for a given socket, I don't mean programatically in the code of…
Jocelyn delalande
  • 5,123
  • 3
  • 30
  • 34
3
votes
3 answers

Path MTU Discovery in C#

How do I find the path MTU between connection? I need this to define the packet size of my UDP connection. Is there things like Path MTU Discovery in .Net?
Syaiful Nizam Yahya
  • 4,196
  • 11
  • 51
  • 71
3
votes
1 answer

Method peripheral: didWriteValueForCharacteristic: error: is not called

I send data over BLE using the following call [peripheral writeValue:dataPiece forCharacteristic:characteristic type:CBCharacteristicWriteWithResponse]; when the dataPiece size is 180 bytes or less everything works fine: accepting device…
sbeliakov
  • 2,169
  • 1
  • 20
  • 37
3
votes
2 answers

How to get the current MTU of an interface in C#

I want to show the current network interface mtu value to the user. The user can change the mtu by the netsh command e.g. for the interface with id 11: netsh interface ipv4 set subinterface 11 mtu=1700 store=persistent How can I read the current…
Maddy
  • 570
  • 1
  • 7
  • 27
3
votes
1 answer

MTU mismatch between GetIfEntry and netsh

I'm working on pseudo-transport layer software that runs over UDP, providing reliable connection-oriented transmission, as an alternative to TCP. In order to maximize network efficiency, we query the MTU of the "best" network adapter upon…
ChrisJ
  • 110
  • 6
3
votes
1 answer

Packets larger than MTU arriving on TUN interface

I'm using pytun to setup a TUN and forward packets that arrive on it to another machine using UDP. What's puzzling me is that even though I've configured the TUN to have MTU of 141 bytes, I'm reading packets of size 145 on it. See the code…
Mansour
  • 1,787
  • 2
  • 20
  • 33
3
votes
1 answer

How get MTU in POSIX

What is POSIX function to get MTU Size value ?? Thanks.
deddihp
  • 653
  • 1
  • 6
  • 17
3
votes
2 answers

TCP/UDP and ethernet MTU Fragmentation

I've read various sites and tutorials online but I am still confused. If the message is bigger than IP MTU, then send() returns the byte sent. What happens to the rest of the message? Am I to call send() again and attempt to send rest of the…
Fantastic Fourier
  • 613
  • 7
  • 13
  • 20
2
votes
3 answers

Fix an ad-hoc network hosted by a Windows XP machine (problems with MTU)

I have the following problem. I use an old Windows XP laptop as some sort of a wireless router by creating an ad-hoc wireless network. It works OK with my Win7 laptop, but when I brought my MacBook Pro from work I realized that although it finds and…
Preslav Rachev
  • 3,983
  • 6
  • 39
  • 63
2
votes
0 answers

setting UDP socket MTU value

I'm currently using MTU per interface, as i'm using a virtual interface to implement some VPN algorithm. Here's how it's done : struct ifreq ifr; ifr.ifr_addr.sa_family = AF_INET; strncpy(ifr.ifr_name, "en0", sizeof(ifr.ifr_name)); ifr.ifr_mtu =…
Zohar81
  • 4,554
  • 5
  • 29
  • 82
2
votes
1 answer

How to determine MTU between my cable modem and ISP?

I am trying to understand the "big picture" of MTU. Specifically, many discussions of MTU focus on a single hop (e.g. laptop to router), so the natural question is: how to determine MTU between cable modem and ISP, or more generally, for any given…
Peter Skirko
  • 695
  • 7
  • 14
2
votes
1 answer

Why am I receiving packer bigger than with raw packet

I am trying to transfers a packet from an interface to another by using raw packets (just for playing). First I focused on received packets. On my machine (archlinux, that has 192.168.30.3 as IP) I created this code: #include #include…
2
votes
0 answers

Setting MTU in NIC with powershell

need help I’m facing problem with the below script that show several steps: print parameters from NIC before change change MTU 8000 print parameters from NIC after change commands: Get-NetIPInterface | where {($_.interfacealias -eq "Delivery" )}…
2
votes
1 answer

Weird IPERF observations: MSS size get decreased from what specifed

I am using IPERF to send some packets from one PC to another. Following things have been observed while testing MSS (Maximum Segment Size) with IPERF. Send packets with MSS = 20 Bytes: iperf -c 192.168.1.98 -P 1 -i 5 -p 5001 -M 20 -m We were…
Uthman
  • 9,251
  • 18
  • 74
  • 104
2
votes
1 answer

Obtaining allowed MTU range for specific device from bash-script

How can one obtain MTU range supported by some network device in Linux from bash-script (not directly through netlink API)? I tried to play with ifconfig and ip link but can't find the solution.
narotello
  • 419
  • 2
  • 14
1 2
3
11 12