Maximum transmission unit (MTU) explained

Maximum transmission unit (MTU) explained

The maximum transmission unit (MTU) is a term used in data networking and refers to the maximum size of a single data unit that can be transmitted across a specified medium. For example, the MTU of Ethernet, the most widely used protocol on the Internet, is 1500 bytes. That is to say that a single Ethernet frame cannot be larger than 1500 bytes.

The MTU represents a balance between efficiency through reduction of protocol overheads and the reduction of work if an error occurred. Thus, if the MTU is set too low, more data packets will have to be sent to represent a single bit of data. Each comes with its own headers and thus extra overhead. However, if the MTU is set too high and a transmission error occurs, the whole packet will have to be re-transmitted. It is also the case that larger packets are more likely to encounter errors – thus worsening the problem.

So how do networks of different MTUs communicate? In an IPv4 network, the mediums will simply fragment the data into multiple packets. For example, if the network was something like this:

Computer —– Ethernet Jumbo Frames (8000 bytes) —–> Router —– Ethernet v2 (1500 bytes) —–> ADSL Modem —– PPPoA (1492 bytes) —–> ISP Router —– Ethernet v2 (1500 bytes) —–> Server

This represents a network comprising of a number of different MTUs. The first computer is on a network which permits Ethernet Jumbo Frames at an MTU of 8000 bytes. It, thus, sends packets of a maximum size of 8000 bytes. Let say one of these packets is 6000 bytes in size. It will hit the first router which must send the packet to the ADSL Modem at an MTU of 1500 bytes. It will, thus, split the packet into 1500 byte chunks. This will likely be 5 packets, once the additional protocol data has been applied to each packet.

The ADSL modem is then restricted by an MTU of 1492 bytes to transmit data over the phone lines to the ISP’s router. It further fragments each packet, probably into 2 (making 10 total), to allow this transmission. The ISP’s router receives this packet and, although the next hop allows a higher MTU, it will not typically attempt to re-combine packets to get maximum efficiency.

So, the bottleneck of this network is the PPPoA communication over the phone lines. It could be eliminated by allowing a 1500 byte MTU. This is not something that any single party can do, rather both sides of the connection must agree to the MTU setting.  BT’s 21CN network permits an MTU of 1500 bytes, however many ADSL modems are configured by default to use 1492. Upping this to 1500 will prevent certain fragmentation and thus increase throughput.

An IPv4 packet can set a flag to tell routers not to fragment it. If this is set and the packet is larger than a given MTU, the packet will not be sent on – rather a failure message will be sent.

In IPv6, the MTU of the entire transmission is determined using discovery protocols, by the sending host. This means that the host will never send a packet that is too large to transmit over any given part of the path between source and destination and it will thus never be fragmented. So, in our example above, the computer should never send a packet more than 1492 bytes. If it does, the packet will be dropped.