MTU (networking)

From Free net encyclopedia

In computer networking, the term Maximum Transmission Unit (MTU) refers to the size (in bytes) of the largest datagram that a given layer of a communications protocol can pass onwards. MTU parameters usually appear in association with a communications interface (NIC, serial port, etc.).

Theory

The Internet Protocol allows IP fragmentation, allowing a datagram to sub-divide into pieces, each small enough to pass over a link with a smaller MTU than the original datagram size. This fragmentation takes place at the IP layer (OSI layer 3) and uses the MTU parameter of the network interface that will send the packet out onto the link. The fragmentation process marks the "fragments" of the original packet so that the IP layer of the destination host can reassemble the packets into the original datagram.

The Internet Protocol defines the "path MTU" of an Internet transmission path as the smallest MTU of any of the IP hops of the "path" from the source address to the destination address. Or, looked at another way, the "path MTU" defines the largest MTU value that can traverse the "path" without the packets sufferring further fragmentation.

RFC 1191 describes "Path MTU discovery", a technique for determining the path MTU between two IP hosts with a view to avoiding IP fragmentation. This technique makes use of feedback to the source address of the results of sending gradually increasing datagram sizes, with the DF (Don't Fragment) bit set - any device along the path that needs to fragment the packet will drop the packet instead, and send an ICMP "datagram too big" response back to the source address. Through this probing, the source host "learns" the largest MTU that can pass that path without fragmenting.

Potential problems and troubleshooting

Unfortunately, increasing numbers of networks block all ICMP traffic (e.g. to prevent denial-of-service attacks) - this prevents path MTU discovery from working. One often detects such blocking in the cases where a connection works for low-volume data but hangs as soon as a host sends a large block of data at a time (for example, with irc a client might see up to the nospoof ping but get no response after that, as the large set of welcome messages freezes up the connection). Also, in an Internet Protocol network, the "path" from the source address to the destination address often gets modified dynamically, in response to various events ( load-balancing, congestion, outages, etc.) - this could result in the path MTU changing (sometimes repeatedly) during a transmission, which may introduce further packet drops before the host finds the new safe MTU.

Most modern ethernet LANs use an MTU of 1500 bytes. But systems like PPPoE will reduce this, causing path MTU discovery to come into effect with the possible effect of making some sites behind badly-configured firewalls unreachable. One can possibly work around this, depending on which part of the network one controls; for example one can change the MSS (maximum segment size) in the initial packet that sets up the TCP connection at one's firewall.

References

de:Maximum Transfer Unit es:MTU fr:Maximum transmission unit it:MTU pl:MTU pt:MTU ru:MTU zh:最大传输单元