Maximum Transmission Unit – MTU-TCP/IP Networking world

MTU

Maximum transmission unit (MTU) is a well-known parameter in the TCP/IP Networking world.

MTU “maximum transmission unit” define the maximum length of network packet/Frame transmission size which can be transmitted over a network out of an interface toward a destination. MTU size measured in bytes and typically referring to the interface MTU.

MTU size fixed and vary on type of protocols and network technology. For example, Ethernet has a fixed MTU of 1500 bytes, Token-Ring IEEE 802.5 has fixed MTU of 2044 bytes (2052 minus 8 bytes for the LLC header). Some types of networks, such as FDDI, have larger MTUs, and some networks have smaller MTUs, but the value is fixed for each physical technology.

If network device receive Packet/Frame larger than the MTU, the packet will be fragmented into smaller packets before it sent to destination node and the fragments are reassembled by the receiving host. It would require fragmentation to prevent it being discarded somewhere along the path.

MTU and Network Throughput –

Typically internet connection of 100 Mbps is theoretical maximum bandwidth which network node is being able to send 100000000 bits per second, that would be an approx. one hundred million and one Byte of data consists of 8 bits, hence the net capacity of 100 Mbps link is the capability to transfer 125, 000, 00 bytes per second (100000000 / 8) also called Bytes/sec.

In an actual scenario network, not all of the 12500000 bytes/second can be used to send data as there are multiple protocol layers create the overhead in the transmission layer.

Data transferred over an Ethernet based network must be divided into “Frames”. The size of these frames regulates the maximum number of bytes to send together. The maximum frame size for Ethernet has been 1518 byte as per standards norm.

With each frame sent there is certain combination of bits that must be transmitted, called the Preamble, which basically signals to the receiver that a frame is coming right behind it. The preamble is 8 bytes and is sent just before each and every frame.


TCP/IP MTU = 1460 bytes data + IP (20 bytes) + TCP (20 bytes) = 1500 bytes.

ICMP MTU = ICMP Payload (1472 bytes) + IP (20 bytes) +ICMP Header (8 bytes) = 1500 bytes.

Data Frame = MTU + Ethernet Header (14 bytes) + FCS (4 bytes) + 8 bytes of preamble + Empty bytes of Interframe Gap (12 bytes) = 1538

MTU Calucaltion

Above Calculations shows that each frame actually consumes 1538 bytes of bandwidth and if we remember that there are “time slots” for sending 12500000 bytes each second this will allow space for 8127 frames per second. (12500000 / 1538)

100 Mbps internet link can use to transmit over approx. 8100 full size frames each second. Since Symmetric internet connection provide same upload/download speed. So its means that the link could be used at the same time receive 8100 frames simultaneously.


Frame and Bandwidth Calculation –

If you remember we mentioned that potential to send 12500000 bytes/second on 100 Mbps internet link. When each frame consumes 1538 byte of bandwidth that gave us 8127 frames/second (12500000/ 1538).

If each frame carries a maximum of 1460 bytes of user data this means that we could transfer 11865420 data bytes per second (8127 frames x 1460 byte of data), i.e. around 11.8 MB/s.

This means that when using default Ethernet frame size of 1518 byte (MTU = 1500) we can efficiently use of approx. 93% (11865420 / 12500000), and other 7% is used for the transport protocols at various layers, which we could left for overhead.

MTU-Related Problems – 

TCP Windowing size is 64KB (65,525 bytes) default setting in window and it’s auto-scaling. The upper layer limit is much larger than we ever use, since the transmission layers have defined much lower sizes of transmission packet which is max transmission size is 1500 bytes.

In theory, the limitation of TCP windowing size is 64K (65,525 bytes). This limit is much larger than you’ll ever use because the transmission layers have much lower sizes.

Ethernet’s MTU of 1500 bytes limits the size of packets that traverse it. Larger IP packets than the MTU must go through IP fragmentation procedures. If a datagram is passed from a network with a high MTU to one with a low MTU, it must be fragmented to fit the network with the smaller MTU.

Packet sent over the internet may traverse multiple router hops. If an intermediate router is configured with an MTU size that is too small and the IP header in the datagram has the “Do-not-fragment” bit set, the router informs the sender of an unacceptable maximum packet size with an ICMP “Destination Unreachable-Fragmentation Needed and DF Set” message. The sender will then transmit a smaller frame taking into account the smaller MTU size.

Some routers are configured to drop certain ICMP traffic. If the ICMP error message never makes it back to the sender, it can cause intermittent connectivity issues between the source and destination hosts. 

Jumbo Frame –

A MTU of 9000 bytes is referred to as a jumbo frame. Jumbo frame can exceed the max size of transmission up to 9000 bytes. In order to enable Jumbo frame Gigabit switch Ethernet is needed. Enabling jumbo frames, increases the frame size, reducing the number of frames the switch needs to process and reduces the overhead and CPU cycles needed on the switch.

Jumbo frames must be enabled end to end on each device in the network path the main risk when adopting jumbo frames, is that if one component in the network path is not properly configured for jumbo frames, a MTU mismatch occurs.


Interesting Fact About MTU –


MTU Troubleshooting and Command –

mturoute.exe

mturoute.exe is a small command line application will help you to diagnose and debug the MTU size from source to destination node.

Download mturoute.exe – https://www.elifulkerson.com/projects/mturoute.php

Step-:

Download mturoute.exe on your desktop location and run via command prompt.

C:\Users\xxxx\Desktop>mturoute.exe google.com -f
Fragmentation is not permitted. *
* Speed optimization is enabled. *
* Maximum payload is 10000 bytes. *
- ICMP payload of 1472 bytes is too big.
+ ICMP payload of 92 bytes succeeded.
+ ICMP payload of 782 bytes succeeded.
+ ICMP payload of 1127 bytes succeeded.
- ICMP payload of 1299 bytes is too big.
+ ICMP payload of 1213 bytes succeeded.
+ ICMP payload of 1256 bytes succeeded.
- ICMP payload of 1277 bytes is too big.
+ ICMP payload of 1266 bytes succeeded.
+ ICMP payload of 1271 bytes succeeded.
- ICMP payload of 1274 bytes is too big.
+ ICMP payload of 1272 bytes succeeded.
- ICMP payload of 1273 bytes is too big.
Path MTU: 1300 bytes.
C:\Users\xxxx\Desktop>


¶ netsh interface ipv4 show subinterface is Microsoft Window OS command to check MTU of Interfaces.

C:\Users\xxxx\Desktop>netsh interface ipv4 show subinterface
   MTU  MediaSenseState   Bytes In  Bytes Out  Interface
------  ---------------  ---------  ---------  -------------
4294967295                1          0     222011  Loopback Pseudo-Interface 1
  1300                1  288300803   71953633  Wireless Network Connection
  1300                5          0          0  Local Area Connection
  1300                5          0     154816  Wireless Network Connection 2
  1500                5          0          0  Local Area Connection 6
C:\Users\xxxx\Desktop>


As you can see MTU size of system is 1300 bytes. Having run ping (ICMP Traffic) sending across public network with default MTU by sending buffer size 10000 with fragmentation bit 0.


C:\Users\xxxx>ping 4.2.2.2 -l 10000
Pinging 4.2.2.2 with 10000 bytes of data:
Reply from 4.2.2.2: bytes=10000 time=149ms TTL=53
Reply from 4.2.2.2: bytes=10000 time=149ms TTL=53
Reply from 4.2.2.2: bytes=10000 time=293ms TTL=53
Reply from 4.2.2.2: bytes=10000 time=540ms TTL=53
Ping statistics for 4.2.2.2:
    Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
    Minimum = 149ms, Maximum = 540ms, Average = 282ms

In the below test – sending buffer size less than 1300. Since existing MTU size on system is 1300.Configured DF (fragmentation bit 1) – do not fragment


C:\Users\xxxx>ping 4.2.2.2 -l 1273 -f
Pinging 4.2.2.2 with 1273 bytes of data:
Packet needs to be fragmented but DF set.
Packet needs to be fragmented but DF set.
Packet needs to be fragmented but DF set.
Packet needs to be fragmented but DF set.
Ping statistics for 4.2.2.2:
    Packets: Sent = 4, Received = 0, Lost = 4 (100% loss),

 

C:\Users\xxxx>ping 4.2.2.2 -l 1272 -f
Pinging 4.2.2.2 with 1272 bytes of data:
Reply from 4.2.2.2: bytes=1272 time=135ms TTL=53
Reply from 4.2.2.2: bytes=1272 time=133ms TTL=53
Reply from 4.2.2.2: bytes=1272 time=134ms TTL=53
Reply from 4.2.2.2: bytes=1272 time=133ms TTL=53
Ping statistics for 4.2.2.2:
    Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
    Minimum = 133ms, Maximum = 135ms, Average = 133ms

Author: Ronnie Singh

Your Feedback is Valuable for us. Pls do comments.