Method for setting MTU on Mac OS X and Windows
Summary:MTU, The full English name is Maximum Transmission Unit, which means the maximum packet value that can pass through a communication protocol layer in…
This book is available as an e-book in EPUB format
PayPal sponsors this website for any amount. I will send you an EPUB e-book via email. Please send me an email
Email: shuxueha@outlook.com
PayPal: https://paypal.me/zhipinglei
You can also scan the PayPal QR code below to sponsor
You can also purchase this book on Amazon: click to enter the Amazon official website
MTU, The full English name is Maximum Transmission Unit, which means the maximum packet value that can pass through a communication protocol layer in Chinese. If MTU is set properly, network performance can be optimized. On the contrary, improper settings may affect network speed and even some software and network usage. For example, issues such as inability to access websites or connect to VPN.
Due to the need to encapsulate existing IP or TCP/UDP data for VPN connections, the length of the data has been increased. If the VPN connection cannot access the internet, you can set the MTU to a smaller value, such as 1450. The specific setting method can refer to the following introduction.
In addition to MTU settings that may affect VPN connection usage, improper settings may also affect network connection quality. Under the commonly used Ethernet network, the default MTU value is 1500. If it exceeds this size, the data packet will be transmitted in segments. If the MTU is too small, it will increase the number of packet splitting transmissions, and the process of splitting and grouping packets will also waste time.
So, as mentioned above, is it best to set the maximum value? The answer is negative, because the maximum network MTU may vary in different network environments. For example, the MTU value of ADSL network is 1492 bytes. If it is forcibly set to 1500, because the maximum capacity of the network itself is only 1492, if it exceeds this limit, packet splitting and segmented transmission will be required before transmission, which wastes time and generates additional data packets.
So the MTU setting needs to be appropriate, neither too large nor too small. It can be set according to the maximum MTU transmission byte of the network itself. So how to check the maximum MTU value when using the network? The following will introduce the checking method (manually query under Windows, if you find it troublesome, you can also use the Simple MTU Test software to query).
1、 Method for detecting the maximum MTU value in a network
1. First, press the Win+R keys on the keyboard simultaneously to bring up the "Run" window. Enter "cmd. exe" and click OK.
2. Enter "ping - l 1472- f www.baidu. com" in the command line window and press Enter. Explain the purpose of this command:
Ping: Send a packet for detection;
-L (lowercase L): Specify the packet size;
1472: The packet size is 1472 bytes;
-f: Prohibit routers from splitting data packets;
Www.baidu.com: Use Baidu as the detection target;
3. After executing the above command, if the response is successful (as shown in the figure below), it means that your network MTU is at most 1500 bytes. At this point, set the MTU to 1500. (I have modified the detection data package to 1450 here for easy screenshot)
4. If a prompt is returned indicating that the packet needs to be split but with DF set, or that the Packer needs to be fragmented but with DF set, it indicates that the packet size exceeds the maximum MTU value of the network itself.
5. At this point, you can reduce the size of the sent data packet and try again, reducing it by 5 bytes in sequence until a correct response can be returned. After returning, gradually add 1 byte and check again to query the maximum MTU value of the network. For example, if the maximum MTU value of the network is 1452, then this is not the complete MTU value, and a 28 byte packet message (including the IP header but not the lower layer headers of the protocol stack) needs to be added. The complete MTU should be 1480 bytes.
6. After finding the maximum MTU value of the network, you can set it. If you want to set up a router, the setting method may vary depending on the router. It is recommended to refer to the instructions for setting up the router. For TP-LINK routers, it is usually done on the management page - Network Parameters - WAN Port Settings - Edit the network connection being used - WAN Port Advanced Settings.
7. Of course, in addition to setting up directly on the router, it can also be modified in the operating system. The following will introduce the methods for setting up each system.
2、 Windows System MTU Setting Method
In addition to the manual setting methods introduced below, some software also has auxiliary modification functions, such as Cube Optimization Master.
A. Vista, Win7, Win8 system setup methods
1. Open the system disk \ Windows \ System32 \ folder and find cmd.exe. Right click "Run as administrator";
2. Enter 'Netsh interface ipv4 show subinterfaces' in the' Command Prompt 'window and press enter to view the current MTU value;
3. Next, enter 'Netsh interface ipv4 set subinterface', 'Modified network connection name', 'MTU=maximum MTU value of the queried network, store=persistent', and press enter;
For example, 'Netsh interface IPv4 set subinterface' local connection 'MTU=1492 store=persistent'.
B. Windows XP System Settings Method
1. Press the Win+R key combination to bring up the "Run" window, enter regedit, and click OK;
2. Find the following registry keys one by one: "HKEYLocalnMachine - SYSTEM - CurrentControlSet - Services - Tcpip - Parameters - interface";
3. There may be many items in the interface, and you need to observe the key values one by one. There will be one item that matches your network card IP. Select that item;
4. Then right-click on the item, select "Edit - New - DWORValue", and name it "MTU" on the right side;
5. Right click on MTU, select "Modify", choose "Decimal" in the pop-up window, and set your query network MTU value.
6. After setting up, it is necessary to restart the computer application to take effect.
3、 Mac OS X MTU Setting Method
Open in sequence: System Preferences - Network - Ethernet (if using a wireless network, modify the wireless network) - Advanced Settings. Under the "Hardware" tab, select "Configure" and choose "Manual" to set MTU
| High-speed VPN | Fast VPN | Preferred Accelerator VPN | Reliable VPN |
| High quality VPN | Old fashioned VPN | Stable VPN(Recommend) | Smooth VPN |

