Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to use the ping command to have the best MTU

2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/01 Report--

This article mainly introduces how to use the ping command to have the best MTU, the article is very detailed, has a certain reference value, interested friends must read it!

What is MTU?

The full name of MTU is Maximum Transmission Unit in English, which means the largest transmission unit in Chinese. MTU refers to the maximum big data packet size (in bytes) that can be passed above a certain layer of a communication protocol. The parameter of maximum transmission unit is usually related to the communication interface (network interface card, serial port, etc.).

When do I change the MTU value?

For general router devices, the best MTU value is usually the default value. Sometimes, changing the MTU value can improve the performance of the device. It's easy to do, but in fact, doing so often leads to other problems. It is best to keep the MTU unchanged unless the following occurs:

When the ISP is not connected or other Internet services are not available, and their technical support staff recommends that the MTU value be changed.

When you use × ×, you can consider changing MTU when you encounter performance problems.

In order to improve some of the performance of the network, applications that optimize MTU values are used, which causes connectivity and other performance problems.

When a packet is sent to a device with a low MTU value, it will be broken down into several small blocks. In theory, the MTU value should be set to the same size on all computers, switches, routers, and all devices on the Internet that you can access. But you cannot control the MTU value on the Internet, and in fact the best MTU value in a local area network depends on hardware, software, wireless interface, and so on.

Changing the size of the MTU in one case makes the device work well, but in other ways it can cause performance and connectivity problems.

When devices with different MTU values communicate with each other, packets are divided into multiple packets so that they can be transmitted to the device with the lowest MTU value.

Windows XP automatically sets up MTU, in other words, it optimizes MTU's overall performance for a variety of applications. The Microsoft article explains why broadband users using Windows XP cannot connect to ISP.

Once a network device decomposes a packet, the packet remains decomposed until it reaches its destination.

The best MTU value for various applications

Setting the MTU size is a process of trial and error: it starts to decrease from a maximum of 1500 until the problem is solved. Some problems caused by MTU values may be resolved by using one of the following values:

1500: is the maximum and default value for Ethernet packets. It is a typical setting without PPPoE and network connection. Is the default setting for some routers, network adapters, and switches.

1492: is the best value for PPPoE.

1472: is the maximum value for using ping (packets larger than this value will be decomposed first).

1468: is the best value for DHCP.

1430: it is the best value of × × and PPTP.

576: is the standard value for dial-up connection to ISP.

How to use Ping command to test the best local MTU value

Test idea: on the wide area network, packets whose size exceeds the ISP requirements will not be transmitted, while the router will automatically subpackage the data that does not meet the requirements according to the local MTU value before transmission, so we can check whether the packet can be transmitted normally by sending a fixed-length packet to a host on the Internet and not allowing the router to change its size If the packet is less than or equal to the ISP MTU value, the transmission can proceed normally, and if the packet sent is greater than the MTU value used by the ISP, the transmission will fail, so that we can get the MTU size of the ISP side by constantly sending packets of different sizes, and this data plus 28 bytes of packet header information is the final MTU value we need.

Test steps:

1. Connect to the network and open the start menu → program → attachment → command prompt.

two。 Enter the command "ping-l 14xx-f www.google.com", and here we explain the meaning of the command parameters:

*-l 14xx parameter: send a fixed-length packet. 14xx is the size of the packet to be tested. As mentioned earlier, the MTU of ADSL is usually between 1450 and 1492. This value will be changed every time in step 3. In the above command,-l is the lowercase of the letter L.

*-f parameter: notifies the router that the packet size cannot be changed privately.

* www.google.com: hosts on any Internet can also use other hostnames or IP addresses.

Observe the feedback results and judge the MTU value of ISP.

1) send the test package for the first time, with a length of 1492

It is suggested that the packet is too large and needs to be subpackaged, so it is judged that the value (1492) is greater than the MTU of ISP, and the packet size should be reduced.

2) send the test package for the second time, with a length of 1480

Reducing the packet size to 1480 indicates that the packet is too large, so it is judged that the value (1480) is still greater than the MTU of ISP and should continue to decrease.

Let's continue to observe.

3) send the test package for the third time, with a length of 1470

Reducing the packet size to 1470 indicates that the packet can be transmitted normally, so it is determined that the MTU value of the ISP is between 1470 and 1480.

4) send the test package for the fourth time, with a length of 1475

Increasing the packet size to 1475 indicates that the packet is too large, so the MTU value is determined to be between 1470 and 1475.

5) send the test package for the fifth time, with a length of 1472

Increasing the packet size to 1472 indicates normal transmission, so the MTU value is estimated to be between 1472 and 1475.

6) send a packet for the sixth time, with a packet length of 1473

The packet size increases to 1473, indicating that the packet is too large to be transmitted, so it is determined that the MTU value of the ISP is 1472.

Modify the MTU value of the router

The MTU value obtained above cannot be used directly for local settings, and 28 (packet header size 28 bytes) should be added to it, so the MTU size is eventually modified to 1500 on the WAN settings page.

The above is all the contents of the article "how to use the ping command to have the best MTU". Thank you for reading! Hope to share the content to help you, more related knowledge, welcome to follow the industry information channel!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report