Search
Close this search box.

Home

What is MTU Size? How to Set it?

If you are setting up a new internet connection or upgrading to the latest optical fiber connection, then there is very little you need to do in terms of any settings or configuration. Most of the time, you simply plug-in the cable/optical fiber/RJ-45 Cable from your ISP (Internet Service Provider) into respective equipment (Modem/Router) and it just works. But sometimes, very rarely, you might face network speed issues or complete lack of connectivity. In situations like these, the problem will usually be from the ISP side (their server side or equipment) and they will fix it after you complain. Other times, the problem may be due to settings in your router and you have to tweak a little bit with its configuration settings. One such parameter is the MTU Size. But what is MTU? Why do we need to specify its size? We will find answers to all MTU Size related questions in this guide.

What is MTU Size?

The Maximum Transmission Unit or MTU for short, is the largest data packet size that can be transmitted in the network. We measure MTU Size in Bytes. The value of MTU varies depending on the configuration and characteristics of the network interface.

Technically, the computer calculates the MTU value for an interface based on the maximum size of the data that the network can transmit in the data-link frame. For example, in case of ethernet, the MTU Size is 1500. This number does not include the ethernet header or other overhead but only the data.

If the packet is longer then the maximum MTU Size, then routers cannot transmit this packet on a network interface. What routers usually do in such situations is that they fragment the packets into much smaller packets. We call this process as Fragmentation.

MTU Size Does Matter

In case of MTU, size does matter. A larger MTU value means fewer number of large packets must be transmitted in the network. While this is efficient in terms of network utilization, the problem is larger packets can slow down the transmitting link.

In case of an error and you need to re-transmit the packets and you need to send the entire large packet once again.

While a smaller packet size usually means that you can transmit a greater number of such smaller packets in the network. The problem with small packet sizes is that network need to process the header data more frequently (with each packet).

When to Adjust Your MTU Size?

Chances are you actually never need to adjust the MTU size at all as most high bandwidth network supports a relatively high data throughput. Hence, the maximum theoretical limit in case of ethernet i.e., 1500 will be the default is most cases.

But if for some reason you are facing any network speed issues such as low download and upload speeds than what your ISP Plan subscription offers. In this case, you might want to modify the MTU values in your router’s configuration settings.

How to Find Out MTU and Adjust it?

First, we will see what is the maximum MTU for each network interface of your computer. We will use a Windows machine as a reference but you can find similar settings for other operating systems as well.

To determine the maximum MTU in Windows, open command prompt with administrator rights and enter the following command

netsh interface ipv4 show interface

This will list out all the network interfaces present in your computer, their state (connected to disconnected), their ID Numbers and also the maximum MTU Value.

Now, to set the MTU value, start by subtracting the overhead bytes from the maximum i.e., 28Bytes from 1500 which is 1472. To set this, you can use the following command.

ping www.google.com -f -l 1472

If the packet is too large, you will get a message as “Packet needs to be fragmented but DF set”. In the above command, the URL can be anything that you want to connect to and test the connectivity speed.

You can further decrease the MTU value, say to 1400. Use the same command as previous one but now with MTU value 1400.

Once you get to an optimum value, you will get a reply as “Reply from xxx.xxx.xx.xxx: bytes=xxx time=xms TTL=xxx”.

All the computers in your network must have the same MTU value for an efficient and fragmentation free transmission.

Conclusion

Modern network infrastructure is very robust with support for very high bandwidth communication at crazy high speeds. 99% of the time, you don’t even have to configure the router or any other network configurations as once the system is setup, it will work automatically. But there are some situations where you might face low internet speeds and this might be due to a server issue with your ISP or due to a configuration setting in your router. One such popular settings is MTU Size. We saw what it is, how to determine the maximum possible value for any network interface and also how to adjust it.

One Response

Leave a Reply

Your email address will not be published. Required fields are marked *