How can I use the ping command to obtain the best MTU?

Source: Internet
Author: User

How can I use the ping command to obtain the best MTU?
What is MTU? MTU is called Maximum Transmission Unit in English. MTU refers to the maximum data packet size (in bytes) that can be passed over a layer of communication protocols ). The maximum transmission unit parameter is usually related to the communication interface (network interface card, serial port, etc ). When can 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 is easy to do, but in fact, doing so often leads to other problems. It is best to keep the MTU unchanged unless the following situations occur: · when the ISP cannot be connected or other Internet services are not available, and their technical support staff suggest changing the MTU value. · When Using VPN, you can consider changing MTU in case of performance problems. · To improve some network performance, applications that can optimize MTU value are used, which causes connectivity and other performance problems. When an information packet is sent to a device with a smaller MTU value, it is divided into several small pieces. Theoretically, the MTU value on all computers, switches, routers, and all devices on the Internet that you can access should be set to the same size. However, you cannot control the MTU value on the Internet. In fact, the optimal MTU value in a LAN depends on hardware, software, and wireless interfaces. · In one case, modifying the MTU size can make the device work well, but it may cause performance and connectivity problems in other aspects. · When devices with different MTU values communicate with each other, the information package will be divided into multiple devices for transmission to devices with the smallest MTU value. · In Windows XP, MTU is automatically set. In other words, MTU optimizes the overall performance of various applications. Microsoft's article explains why broadband users using Windows XP cannot connect to the ISP. · Once a network device breaks down an information package, the package remains in the state of decomposition until it reaches its destination. Setting the MTU size for the optimal MTU value for various applications is a process of repeated tests: the maximum value is 1500, and the problem is solved. Using one of the following values may solve some problems caused by the MTU value: · 1500: the maximum value of the Ethernet information package, which is also the default value. Is a typical setting of network connections without PPPoE and VPN. Is the default settings for some routers, network adapters, and switches. · 1492: The best value for PPPoE. · 1472: the maximum value of ping (information packets greater than this value are first decomposed ). · 1468: The best value for DHCP. · 1430: The best value for VPN and PPTP. · 576: the standard value for a dial-up connection to the ISP. How to Use the Ping command to test the local optimal MTU value: on the Wide Area Network, packets exceeding the ISP's requirements cannot be transmitted, the vro will automatically subcontract the data that does not meet the requirements based on the MTU value of the local machine and then transmit the data, therefore, we can send a fixed-length packet to a host on the Internet, and do not allow the router to change its size to check whether the packet can be transmitted normally, if the data packet is smaller than or equal to the ISP's MTU value, the transmission can proceed normally. If the sent data packet is greater than the ISP's MTU value, the transmission will fail, in this way, we can get the MTU size of the ISP end by continuously sending data packets of different sizes, and this data plus 28 bytes of header information is the final MTU value we need. Test procedure: 1. access the network and open the "Start" menu → "program → attachment → command prompt ". 2. enter the command "ping-l 14xx-f www.google.com". Here we will explain the meaning of the command parameter: *-l 14xx parameter: Send a fixed-length data packet, 14xx is the package size to be tested. As mentioned above, the MTU of ADSL is generally between 1450 and 1492, and this value will be changed every time in step 1. In the preceding command,-l is the lowercase letter of the English letter L. *-F parameter: notifies the router not to change the data packet size without authorization. * Www.google.com: Any host on the Internet can also use other host names or IP addresses. Observe the feedback results and determine the MTU value of the ISP. 1) when a test packet is sent for the first time, the packet length of 1492 indicates that the packet is too large and needs to be subcontracted. Therefore, the packet size should be reduced if the value (1492) is greater than the MTU of the ISP. 2) When the test packet is sent for the second time, the packet length is 1480 and the packet size is reduced to 1480, prompting that the packet is too large. Therefore, the value (1480) is determined to be greater than the MTU of the ISP. Next, observe 3) Send the test packet for the third time. If the packet length is 1470, the packet size is reduced to 1470, prompting that the packet can be transmitted normally. Therefore, determine whether the MTU value of the ISP is between 1470 and ~ In the range of 1480. 4) when the test packet is sent for the fourth time and the packet length is 1475, the packet size is increased to 1475, prompting that the packet is too large. Therefore, the MTU value is determined to be between 1470 and ~ In the range of 1475. 5) The fifth time the test packet is sent, the packet length is 1472, and the packet size is increased to 1472, prompting normal transmission. Therefore, it is determined that the MTU value is between 1472 and ~ In the range of 1475. 6) when the packet is sent for the sixth time and the packet length is 1473, the packet size is increased to 1473, prompting that the data packet cannot be transmitted because of the large data packet size. Therefore, the MTU value of the ISP is determined to be 1472. The MTU value obtained by modifying the mtu value of the vro cannot be directly used for local settings. You must add 28 (28 bytes of data packet header size) to the MTU value ), therefore, the MTU size is modified to 1500 on the WAN settings page. Conclusion: It can improve the routing performance and cause negative problems. Tested, by modifying the mtu value in the vro, you can successfully resolve the problem of "cannot open web pages on QQ", "cannot open some websites or links", and "cannot log on to MSN" After accessing the Internet through the vro. (set MTU 1500) and "Email attachments cannot be sent. However, if the network is a single-layer Routing Structure, after the MTU value is changed, the data packets are directly forwarded from the WAN port to the LAN port. The operating system can also perform automatic processing. However, if there is a routing network structure that goes down, it will lead to slow connection speed or packet loss on your underlying route. We recommend that you modify the MTU value in the router whenever necessary.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.