What is MTU in the router settings. Detailed description of the MTU parameter value. Its meaning, setting

MTU in a router, what is it and why does the speed of your Internet connection depend on this parameter? Detailed description of the mtu network parameter, its features and properties.

The article provides instructions for correctly determining and changing mtu settings in a wi-fi router.

MTU (maximum transmission level in the network -maximum transmission unit (MTU)) is a link layer protocol that determines the largest number of “useful” blocks of bits in a single network packet.

As is known, the exchange of information between the server and the client (provider and user PC) is possible due to the transfer of individual data packets.

These packages form sets of useful blocks.

As a result of using a secure protocol, information in the packet is transmitted without fragmentation, which in turn allows for faster data exchange on the global network.

In simple words, MTU is necessary to ensure stable Internet operation on your computer.

By setting it to the correct value, you can achieve excellent speed with minimal disruption.

Why do you need to limit MTU?

This link layer protocol is subject to mandatory restrictions. This is done by assigning mtu a specific digital value.

This action is necessary to achieve the following goals:

  1. Rational load distribution between blocks for transmitting and receiving information in the network;
  2. Reducing the overall load. Thanks to this, the time for transmitting information will also decrease;
  3. Extensions of transmission channel functions. Thus, it can be used simultaneously by several applications, services and processes;
  4. Increased network response. As a result, the network will work more efficiently, and the likelihood of “broken” data packets (that have not recovered) is minimized.

Finding the correct MTU size for the network

Often, users of tp-link, d-link, asus and others routers have the wrong mtu value specified in the router settings. This may cause:

  • Problems with streaming video playback;
  • Errors while downloading files;
  • Expired security certificates for some sites;
  • Generally slow Internet performance.

Rice. 1 – problems with the Internet

If you have discovered that your network connection has recently become too slow and your usual sites no longer open or take forever to load, you need to configure mtu.

The client computer cannot open the site if the mtu value is greater than the maximum value of the data packet that is transmitted through the protocol.

Read more about setting up various routers in our material: How to enter router settings - TP-Link, D-Link, Asus, Zyxel Keenetic, Rostelecom

Each router can change the mtu number automatically. Sometimes this feature does not work in favor of network speed, so you can change the value manually.

You can determine the “ideal” mtu number using testing called Ping Test .

Ping (ping - delay) is the time it takes for one packet of data sent from your PC to travel to another PC (or server) and return it back to the computer from which it was sent.

You may also be interested in:

During the ping test, repeat requests should be sent, periodically reducing the size of the data packet.

This must be done until the packet fragmentation completely stops. As a result, you will find out the most accurate mtu number that is necessary for the fast operation of a particular network.

Testing process:

  • Go to the command line;
  • Enter the command shown in the figure below to connect to the domain;

Rice. 2 – connection to the testing domain

Notice! XXXX is the MTU value. During testing, change it from 1500 to 500 in 10 byte increments. A successful result is when the percentage of losses does not exceed 1%.

  • As a result of correctly executing the command, lines with ping statistics will appear (the number of sent and received packets, the approximate time of their transmission in milliseconds, the percentage of losses);

Rice. 3 – result of a successful team

  • Now you should repeat the same command again. Complete it by skipping one line;
  • Repeat the test each time with a new mtu value until you get the best packet transmission result with the minimum percentage of losses. Remember the mtu numbers - this is the value we will need in further mtu configuration.

Rice. 4 – the best value for MTU found as a result of testing

Changing the MTU in the router

Router users can independently change all connection settings and . To do this, go to the configuration menu.

Open any browser installed on your PC and enter the local IP address 192.168.0.1 in its address bar and press Enter.

If the authorization window does not appear, enter the address 192.168.1.1 in the line

In the dialog box that opens, a form will appear for entering the PC administrator login and password.

In both fields, write the word admin or other information to log into the network (you can read them in or ask your provider). Wait for authorization.

The settings window for each router model may have external differences, however, the structure of the fields is basically the same. First you need to decide on the final value of mtu.

Take the result obtained during the testing process. In our case it is 1458 bits and add another 28 bytes. The extra bytes are space for the packet and request headers.

As a result, we get 1458+28 = 1486 bytes for mtu.

For TP-Link routers

To change mtu, click on the menu item “Network”. Then, on the right side of the window, find the mtu field and enter the required value, as shown in the figure:

Rice. 5 – change the value for TP-Link

Hello, dear visitors! Those who often read the site have probably already noticed that I write very often and a lot about solving various problems with routers, wireless networks and the like. It’s just that this topic is very relevant now and a lot of different questions arise when setting up Wi-Fi yourself. I even have one interesting idea about this, which I won’t tell you about yet, don’t even ask :).

I always analyze the comments that visitors leave on various articles and try to understand what problems and errors arise when setting up Wi-Fi routers. It happens that visitors share different solutions to a certain problem. For which we thank them very much! The information you share can help a lot.

There is one popular problem when some sites do not open through a Wi-Fi router, or open, but very slowly. Also, videos on the Internet may play slowly, with errors, or not play at all. For example on YouTube. The Internet may not work on mobile phones or tablets in different programs (very often these are Odnoklassniki, YouTube, VKontakte applications). But the sites open in the browser.

I have already written about similar problems in an article. In it, I advised simply changing the DNS in the router settings. Indeed, the above problems can also arise due to DNS.

But as it turns out, changing DNS does not always help. And to the article (link to which is above) Comments began to appear in which they wrote that these problems in some cases can be solved by changing the MTU parameter. Special thanks to Ivan, you can read his comments in the article, the link to which I left above.

But I decided to write this article in which I will talk in more detail about MTU. What is it, how to change it, why change it and what value to specify.

What is MTU and why change it?

I immediately decided to google it :). To be honest, I am not a strong expert in these subtleties. I found articles on the Internet that are simply full of different terms and complex advice on MTU. A person who simply has problems opening websites, etc. will only climb into these jungles and will not find anything useful there.

I will try to explain this whole matter in simple language.

MTU– this is the maximum size of a data block that can be transmitted by the protocol without dividing this block (if this doesn’t mean anything to you, then it’s okay :) You don’t need it).

We know one thing, that the incorrect value of this parameter specified in the router settings can lead to the problems that I listed above (but I would first of all advise changing the DNS).

What MTU value should I specify in the router settings?

For Dynamic IP And Static IP- most likely should be left 1500 (this is the default)

MTU for L2TP1460

PPPoE1420

For Intertelecom, in the settings I installed 1476 (this value is suitable for all 3G networks, if I'm not mistaken).

The best way is to call your provider's support and ask which MTU to use. Even with the values ​​I wrote above, there may be problems. It's best to ask your provider!

If you have already learned what value to specify in the router parameters, now I will show you how and where to change the MTU.

First of all, we need to go to the router settings. Just open the address in your browser 192.168.1.1 , or 192.168.0.1 . The default login and password are admin and admin (you can see the address, login and password at the bottom of the router). If you can’t get into the settings, then see the article.

Routers TP-Link

In TP-Link routers, go to the tab NetworkWAN and enter the required value in the field MTU Size (by the way, MTU is indicated in bytes).

Save the settings and reboot the router.

In Asus routers

Go to the tab "Additional settings""WAN", or "Internet".

By the way, Asus has its own features that I didn’t even know about. There, the MTU field appears only when selecting some connections.

If this field is not present, then the MTU must be specified in the field. In this field we write the following line MTU 1460 MRU 1460 (don't forget to change the value).

If you have another router, for example D-Link, or ZyXEL, then look for the MTU parameter on the tab where you set the parameters for connecting to the Internet. This is usually the WAN tab.

If my advice does not help you solve problems with Internet access, then report it in the comments. And don’t forget to write about how you solved everything. Well, ask questions too, where would we be without them :).

All the best and stable WiFi!

Also on the site:

What is MTU? How to change MTU in router settings? [problems with loading some sites, playing videos] updated: February 7, 2018 by: admin

In computer networks, the term maximum transmission unit (MTU) means the maximum size of a useful data block of one packet (English payload), which can be transmitted by a protocol without fragmentation. Typically, protocol headers are not included in the MTU, but on some systems, some protocols may include headers. When people talk about MTU, they usually mean the link layer protocol of the OSI network model.

However, this term can also be applied to other levels:

L1 - media mtu (full L2 frame);

L2 - mtu, hw mtu, system mtu;

L3 - ip mtu (ip header is taken into account), mtu routing;

L4 - tcp mss Non-system: tunnel mtu, vlan mtu, mpls mtu.

The maximum frame size is limited for several reasons:

To reduce retransmission time in the event of packet loss or irreparable corruption. The probability of loss increases with packet length.

So that when operating in half-duplex mode, the host does not occupy the channel for a long time (the interframe gap is also used for this purpose).

The larger the packet sent, the longer the wait for other packets to be sent, especially on serial interfaces. Therefore, a small MTU was relevant in times of slow dial-up connections.

Small size and speed of network buffers for incoming and outgoing packets. However, too large buffers also degrade performance.

The MTU value is determined by the standard of the corresponding protocol, but can be overridden automatically for a specific flow (by the PMTUD protocol) or manually for the desired interface. On some interfaces the default MTU may be set lower than the maximum possible. The MTU value is usually limited below by the minimum allowable frame length.

For a high-performance network, the reasons that caused the initial MTU limits are obsolete. In this regard, a standard for Jumbo frames with an increased MTU was developed for Ethernet.

The host knows the MTU value for its own (and possibly its neighbors) interface, but the minimum MTU value for all network nodes is usually unknown. Another potential problem is that higher-level protocols may produce larger packet sizes that are not supported by other nodes on the network.

Passage of large packets through a network with fragmentation. To overcome these problems, IP supports fragmentation, which allows a datagram to be broken into smaller pieces, each small enough to pass smoothly through the node causing the fragmentation. Packet fragments are marked so that the IP of the target host can reassemble the fragments into the original datagram. The disadvantages of packet fragmentation are speed.

Although fragmentation solves the problem of packet size and MTU mismatch, it significantly reduces the performance of network devices. In this regard, an alternative technology called Path MTU discovery (RFC 1191) was proposed in 1988. The essence of the technology is that when two hosts connect, the DF (don’t fragment) parameter is set, which prohibits packet fragmentation. This causes a host whose MTU value is less than the packet size to reject the packet and send an ICMP "fragmentation required but disable flag (DF)" message. The sending host reduces the packet size and resends it. This operation continues until the packet is small enough to reach the destination host without fragmentation.

However, this technology also has potential problems. Some routers are configured by administrators to block ICMP packets completely (this is not very smart, but can be the simplest solution to several security problems). As a result, if the packet size does not match the MTU value in a certain region, the packet is discarded, and the sending host cannot obtain information about the MTU value and does not resend the packet. Therefore, no connection is established between hosts. The problem was called MTU Discovery Black Hole (RFC 2923), and the protocol was modified to detect such routers.

Since Windows (XP, 7, 8) automatically selects the best MTU (PMTU), in our case we just need to make sure that this connection is not set to some other than optimal fixed value. By the way, this optimal value is quite easy to find out by conducting a simple experiment. Open the cmd.exe console and enter the command in it:

PING -f -l 1472 xxx.xxx.xxx.xxx

where xxx.xxx.xxx.xxx is the IP address of your provider’s gateway,

F disables packet fragmentation,

L sets the packet size.

If you receive in response something like “Reply from xxx.xxx.xxx.xxx: bytes=1472 time=144ms TTL=10”, then this will mean that MTU=1500 (28 bytes of the header are not taken into account). If the answer is “Packet needs to be fragmented but DF set”, then decrease the value of 1472 until you get the packet passed - this value plus 28 bytes of the header and will be equal to the required MTU.

The resulting value (+28 header bytes) must be compared with the MTU value used by the system, which can be determined using the command on the same command line:

netsh interface ipv4 show subinterfaces

(As a result, the MTU value for ipv4 network interfaces will be displayed).

You can change the MTU value in Windows (XP, 7, 8) using the command

(It is advisable to perform the action of changing the settings only by an experienced user, since an incorrect value will affect the operation of the network for the worse!!!):

netsh interface ipv4 set subinterface “ХХХХХХХХ” mtu=1500 store=persistent

Where ХХХХХХХХ is the name of the network interface (By default - “Local Area Connection”, for convenience you can rename it, for example, to Lan1 in the “Network Connections” folder in the “Control Panel”).

Unlike Windows OS, most routers (Wi-Fi Home routers) use a static MTU setting specified in the router settings. The default MTU value is 1500.

The Triolan provider ensures the transmission of Ethernet packets of the maximum usable size, which corresponds to the MTU 1500 setting.

There are providers whose network settings limit the MTU size to values ​​less than 1500. This is often due to the use of additional encapsulation protocols (PPPoE, L2P, etc.). In this case, Windows OS configures the required MTU value using the PMTU protocol, but if problems arise, the settings described above may be required. More often, problems with MTU are associated specifically with routers in which the MTU value is configured incorrectly. For Triolan networks this value is 1500, for other networks it can be determined using the command line, as described above.

Many Internet users, to connect to which they use secure connections from providers, may feel discomfort in their work due to the inability to open some Internet resources. Fixing the problem is sometimes solved radically - the router or provider is changed, but there is a high probability of correcting the situation yourself by adjusting just one parameter called MTU in the router. What it is, how to find it and configure it correctly - questions that are discussed in this article.

Bringing clarity

To increase Internet speed, packet data transfer is used. After all, there is no point in sending and receiving information for each bit while loading the channel. Therefore, a technology was created that allows collecting the data stream into a special package that is transmitted over distances. When the destination computer receives a package, it simply unpacks it and receives the original data. While using such a system, limitations were identified that led to a loss of speed as the packet size increased. Thanks to this, a corresponding standard was introduced - the maximum transmitted packet for equipment (Maximum Transmission Unit), or MTU for short, in a router. That this is clear, it remains to identify the reasons why this standard does not work correctly.

Paranoia or security

Naturally, any standard provides for solving problems in For MTU, special fragmentation was developed, which made it possible to change the packet size at a low level at the request of the end computer on the network. The request itself was carried out at the TCP transport layer using the ICMP protocol, whose task is to transmit service messages. Link layer protocols, if it is impossible to receive a packet, send a message stating that this is impossible. The sender reduces the size of the parcel and resends it. However, this doesn't always work. After all, very often Internet resources are managed by very lazy administrators who, instead of fine-tuning the security system, take the easy way out, disabling, in their opinion, unnecessary protocols. Naturally, ICMP is one of them. But if there is no message, there is no problem; the end user, due to someone else’s fault, does not use the paid service in full.

Excellent ping indicator

And in order for the doubts that the technical support service of any provider puts in the user’s mind to disappear forever, you need to know an important fact - the ping command is not an indicator. Since its primary task is to check the availability of the resource, but not the quality of the communication channel. You can verify this yourself by running ping ya.ru on the command line. The end server's response will indicate that the 32 byte packet was received. What if you send a packet set by the standard at 1500 bytes? The command will look like this: ping ya.ru -f -l 1500. Where l is the size of the packet, and f is the fragmentation prohibition. Problems may arise, ranging from the impossibility of reception to losses on the channel. Taking into account that all information received from the Internet is transmitted in large packets, it is not advisable to trust the channel check. In this case, the packet size is nothing more than the MTU value, editing which can improve the Internet performance.

Provider capabilities

First of all, you need to understand what Maximum Transmission Unit parameter is set by the provider. If the Internet service is provided via a twisted pair cable, without any network settings, there will be no problems. But in cases of using secure PPPoE channels, you need to be prepared that you cannot do without setting up the router and computer. There are a lot of options for determining the correct packet size, as well as fixing the problem, and attention will be paid to several of the most effective methods. Naturally, you can try to find out the MTU parameter from the provider over the phone and register it on the router, but this is too simple and, most likely, impossible due to the low competence of the operator.

Maybe the problem is somewhere else

It is possible that the inaccessibility of some Internet pages is not due to incorrect MTU settings in the router, and that this fix will not solve the problem. You need to know exactly which direction to move. To do this, the user needs to go into the settings of their router and lower the default MTU to 1400 bytes. After saving and rebooting, try accessing the desired resource again. If the problem persists, return the settings to their original position and start looking for a solution in a different direction. However, according to reviews from many users, changing the maximum package size downward gives a positive result and all resources, including online games, are available. However, another problem arises - the speed of opening pages and downloading files decreases. You need to open the router settings and fine-tune the MTU.

From words to deeds

In order to go to the settings, you need to enter the router address in the address bar of any browser and, once in the authorization window, enter your login and password. Naturally, if the configuration was carried out by an administrator from the provider’s side, it is also within his competence to eliminate problems in working with the Internet. But other users know the actual password and login for the access point. In any case, without authorization the problem cannot be resolved, because the router settings will be unavailable.

Ultimately, there are no hopeless situations. You can find out the network settings from your provider, reset the router to factory settings and connect yourself. There are enough instructions in the media for setting up the required hardware, not to mention branded guides from the manufacturer, which can be found on the official websites of the seller.

How to find MTU in a router

The D-Link router is considered the most popular in Russia, so all fine-tuning examples will be described based on its functionality, which is not very different from other routers. Once in the main device settings menu, you need to turn your attention to the WAN item in the “Network” section. This item is responsible for building a communication channel between the router and the provider’s equipment; its presence is mandatory in any network device. Once in the desired menu, the user can detect several connections that have the “connected” status. Preference should be given to the one that has the “default gateway” flag. Place the cursor on the selected connection. By clicking the “change” button (or “add” - each version has its own name), the user will be taken to the fine-tuning menu. Find the desired item labeled MTU. Change the parameter by clicking on the pencil image in the selected field. Set the desired size. Save the settings and reboot the router.

The right ones always bear fruit

Setting the MTU in the router, as practice shows, is key for many channels built on virtual private networks. However, few people know that fine-tuning a high-quality connection depends on two more points, which are always located next to the MTU field. Correctly configuring all parameters always solves problems in networks that have D-Link, Zuxel, Cisco, Linksys and some other devices automatically fill in important parameters. In such cases, you should not change the parameter without a special desire.

  1. Keep Alive. The created virtual network is constantly supported by the router, from the moment it is turned on until the power is turned off.
  2. LCP interval. The parameter is specified in seconds and sets the frequency of requests from the router to the provider’s equipment to check the functionality of the channel.
  3. LCP failures. A parameter that allows you to disconnect from the provider’s equipment in order to establish a new, higher-quality communication channel in the event of non-return of several previously sent packets.

Private Network Standards

If you do not want to experiment on your own, determining the required MTU size, you can use the technical data specified in the standards.

  1. Each transmitted packet is accompanied by its own security data, which is commonly called a header. This header takes 8 bytes from each packet, leaving the channel able to transmit 1492 bytes. ADSL is based on this technology; therefore, to configure modems, changing the MTU is mandatory.
  2. Private VPN and PPP networks. Here MTU largely depends on the hardware of the server to which the connection is made. After all, in addition to the provider, the connection can be used to connect to a workplace in an enterprise using a remote connection. The 1400 byte parameter is considered optimal, but fine tuning is not prohibited.

Software to help

You can also determine the required MTU size without experimenting with the router using software. For example, the TCP Optimizer program performs independent calculations on the communication channel and provides the result to the user with a complete description of the problem. Quite convenient, but resource-intensive. After all, you need to find the program, download it, install it, and understand its functionality. And having figured it out, any user will find that the application uses a banal ping of some resource on the Internet. It turns out that you can determine the MTU from the command line? It’s easy, you just need to reduce the packet size by one until the server response is positive - ping ya.ru -f -l 1499.

Many software products for setting up networks offer fine-tuning by editing the system registry, registering special keys for network equipment. This functionality was in demand in systems of the last century, however, modern operating systems are able to adapt themselves to the created communication channel and sometimes, after fine-tuning the router, you need to restart the computer to operate more efficiently.

Finally

Having received information about the MTU in the router, what it is and how to fine-tune the equipment, you can proceed to direct actions aimed at improving the performance of the communication channel. However, before you start, you need to know that not all routers allow you to change their characteristics. For example, ZTE, known for its 3G modems, considered that setting the MTU violated some internal security rules. Accordingly, it will not be possible to change the necessary parameters manually. Experts recommend installing equipment purchased from a provider, or at least agreeing on the choice with your Internet provider before purchasing.

At the moment when the host must transmit data through the interface, it refers to the maximum payload size for a single packet Maximum Transmission Unit, to determine how much data it can fit in each packet. For example, Ethernet interfaces have a default MTU of 1500 bytes, not including the Ethernet header or trailer. This means that a host that needs to send data over TCP will typically use the first 20 of these 1500 bytes for the IP header, the next 20 for the TCP header, and the remaining 1460 bytes for the payload. Encapsulating data into maximum-size packets like this allows for the most efficient use of bandwidth while minimizing the use of data protocol overhead. The optimal MTU size is the key to efficient use of network data transmission channels and reducing the load on network equipment.

Unfortunately, not all devices on the Internet have the same maximum MTU size. The MTU may vary depending on the physical media type or the encapsulation configured (for example, GRE tunneling or IPsec encryption). When a router decides to forward an IPv4 packet over an interface and determines that the packet size exceeds the interface MTU, the router must split the packet so that it is sent as two (or more) separate parts, each of which does not exceed the MTU size limit of the link between subscribers. Fragmentation is quite expensive, both in router resources and bandwidth usage. New headers must be created and attached to each fragment. In the IPv6 protocol specification, packet fragmentation is completely removed from the router, but this is a topic for another discussion.

Determining the optimal MTU size of a data packet

To use the link most efficiently, hosts must determine the optimal MTU size - this is the minimum MTU among all nodes on the path between the hosts. For example, for two hosts whose path between them consists of 3 routers with different maximum possible packet sizes: 1500, 800 and 1200 bytes, each of the end hosts should accept the smallest packet size of 800 bytes to avoid fragmentation.

Do not Fragment and Destination Unreachable, Fragmentation Needed

Packets can travel arbitrarily across networks, and it is impossible to calculate in advance all the routes and the maximum packet size for each connection. RFC 1191 specifies the methodology for determining the MTU size. The process by which a host for a particular connection can detect a smaller MTU size than its own network interface supports. Two components are key: the Do not Fragment (DF) bit of the IP header and the subcode of the ICMP Destination Unreachable, Fragmentation Needed message.

Setting the DF bit in an IP packet prevents the router from performing fragmentation when it detects an MTU smaller than the packet size. Instead, the packet is discarded and a message is sent to the sender via ICMP indicating that the packets need to be fragmented. Essentially, the router is indicating that it needs to break the packet into pieces in order to forward it further, but the Don’t Fragment (DF) flag prevents this from happening. RFC 1191 extends the ICMP fragmentation request message to include the MTU size for the current connection.

Now that the maximum packet size for a connection has been detected, the host can cache this value and generate subsequent ones of the appropriate size. Note that discovering the maximum packet size for a particular connection is an ongoing process. When dynamic routing is used and the route between the sender and receiver is rebuilt, the host periodically continues to try to set the DF flag to detect further reduction in packet size. RFC 1191 also allows you to periodically test the ability to increase the maximum packet size for each route, sometimes attempting to transmit a larger packet than the cached one. If the packet is transmitted successfully, the packet size limit is increased.