dslreports logo
site
spacer

spacer
 
    «« DSL Hurdles Share Tool
spc

spacer




how-to block ads



The MTU setting controls the maximum ethernet packet size your PC will send (you did know the Internet works in packets, didn't you?). Why a limit? Because although larger packets can be constructed and sent, your ISP and Internet backbone routers and equipment will chop up (fragment) any packets larger than their limit. These parts are then reassembled by the target equipment before reading. This fragmentation and reassembly is not optimal.

MTU and Windows and Defaults
Unless otherwise set, Windows defaults MTU to 1500, or a lower value of 576 for external networks. 1500 is OK unless you are running PPPoE, want to use IPSec (Secure VPNs) or both, then it's too big. 576 is not efficient for the broadband/Internet; it's too small.

Finding the largest MTU, by EXPERIMENT
If your MTU is too low already, maybe 576, the following method will not be able to detect whether you can switch to an optimal size. So first follow "CHANGING MTU for PPPoE" to reset MTU to 1500, reboot and then come back to this!

The best value for MTU is that value just before your packets get fragmented. How do you find that out? By using Ping at an command prompt.


Windows 2000/XP users:

Go to Start/ Programs/ Accessories/ Command Prompt and type the following:

ping -f -l 1472 www.dslreports.com
(That is a dash lower case "L," not a dash "1." Also note the spaces in between the sections.)

Linux users:

ping -s 1472 www.dslreports.com

OS X users:

ping -D -s 1472 www.dslreports.com

Linux and OS X commands are case sensitive.

Press Enter. Then reduce 1472 by 10 until you no longer get the "packet needs to be fragmented" error message. Then increase by 1 until you are 1 less away from getting the "packet need to be fragmented" message again.

Add 28 more to this (since you specified ping packet size, not including IP/ICMP header of 28 bytes), and this is your MaxMTU.

Note:If you can ping through with the number at 1472, you are done! Stop right there. Add 28 and your MaxMTU is 1500.
~~~~~~~~~~~~~~~~~~~~~~~~~~~


For PPPoE, your MaxMTU should be no more than 1492 to allow space for the 8 byte PPPoE "wrapper," but again, experiment to find the optimal value. For PPPoE, the stakes are high: if you get your MTU wrong, you may not just be sub-optimal, things like UPLOADING or web pages may stall or not work at all!
~~~~~~~~~~~~~~~~~~~~~~~~~~~

(TCP, IP, MTU and MSS magic numbers)

40
1500The biggest-sized IP packet that can normally traverse the Internet without getting fragmented. Typical MTU for non-PPPoE, non-VPN connections.
1492The maximum MTU recommended for Internet PPPoE implementations.
1472The maximum ping data payload before fragmentation errors are received on non-PPPoE, non-VPN connections.
1460TCP Data size (MSS) when MTU is 1500 and not using PPPoE.
1464The maximum ping data payload before fragmentation errors are received when using a PPPoE-connected machine.
1452TCP Data size (MSS) when MTU is 1492 and using PPPoE.
576Typically recommended as the MTU for dial-up type applications, leaving 536 bytes of TCP data.
48The sum of IP, TCP and PPPoE headers.
The sum of IP and TCP headers.
28The sum of IP and ICMP headers.


Windows 98/98SE (or 95 with DUN 1.3) - CHANGING MTU
Use drTCP to change MTU.

MTU and other OS
For Linux, it is a matter of using the ifconfig command (read the main page for ifconfig).

For Macintosh, your PPPoE software (MacPOET) will set the MTU correctly.

Feedback received on this FAQ entry:
  • Very good and clear information!

    2014-02-18 13:37:00

  • The MTU tool posted in this thread is perfect! it doesn't need to be installed and is so simple yet so specific I had to reply. Thank you for the hard work! I had already tested my MTU on my system link and know the value. I ran the tool in my VM (no offense but I downloaded it off the net and we can never be to careful) after snapshoting. It found my exact MTU after going through a series of small checks. Thank you again for making life in technology just a little bit easier.

    2013-12-04 16:08:24

  • Some platforms (linux, Windows, Cisco etc) have a slightly other way of calculating the payload and MTU size. Some take the payload including 28 bit headers and info, like Cisco. With others you still need to add 28 bits to the maximum payload to get the correct MTU size. If you are looking for a way to do this from an external source to the outside of your router, automatically, you could try the following MTU test: http://www.letmecheck.it/MTU-test.php It will also check if the ‘divisible by 8′ rule is respected.

    2013-02-20 13:56:00

  • Very enlightening! DJB

    2010-10-20 14:53:12

  • Also, the ifconfig in linux has been deprecated for years. The command is now "ip".

    2010-05-18 17:10:33

  • In linux, add "-M do" to the parameters to ping to force the don't fragment bit on, otherwise ping will silently do mtu discovery and fragment for you. Eg: ping -s 1472 -M do www.dslreports.com

    2010-05-18 17:09:16

  • If you need to adjust your MTU permanently, do the following: sudo vim /etc/network/interfaces If you are using a static address then find the interface you need and simply add the MTU line: iface eth0 inet static address 192.168.0.1 network 192.168.0.0 gateway 192.168.0.254 netmask 255.255.255.0 mtu 1492 If you are using DHCP addresses then you need to set this before the interface comes up, by adding this line: iface eth0 inet dhcp pre-up /sbin/ifconfig $IFACE mtu 1492 Then release and renew (or up and down) the interface sudo ifdown eth0 sudo ifup eth0

    2009-09-22 23:50:55 (mdelatorre See Profile)

  • in macs running 10.3 and later , you just select the ethernet port you want to modify from the network pane, in system preferences. You then highlight your ethernet connection on the left hand side, then click on advanced on the bottom right corner. select the ethernet tab from the window that comes down, then set the first menu to manual. and there you go, change your mtu, your duplex settings and the connection speed.

    2009-07-15 13:58:41

  • If you ping with Linux you should specify the DF (don't fragment) flag with "-M do": ping -M do -s 1472 www.dslreports.com

    2009-05-04 09:11:13

  • hello, i did this ping at 1472 for x-p and had 4 sent recieved 1 loss 3 ??? also say's packet's need to be fragmented but DF set ?? it said this 3 time's what does that mean ? so then ran it at 1462 and said sent 4 rec. 4 loss 0 so did i fix something by doing this ? this is happening to me as well please help!

    2009-02-22 18:46:49 (mikeoe See Profile)

  • I have never seen a better article that explains MTU and how it relates to everything so well. This is awesome. Thank you.

    2008-12-06 21:34:28

  • For Vista: "You can change the MTU settings in vista using the following command from the command line as an admin... netsh interface ipv4 set subinterface "Local Area Connection" mtu=1300 store=persistent If you just want to see what your settings are you can run. netsh interface ipv4 show subinterfaces" PS: Instead of "Local Area Connection" you must put the suitable string of your connection, which you get using the last command above. For a wireless connections, you could have "Wireless Network Connection".

    2008-11-17 12:33:42 (ganiba See Profile)

  • On Linux (Ubuntu at least), a better MTU test: ping -c 10 -M do -s

    2008-09-19 01:22:01

  • Thanks for the information. I don't know the technical aspects of the actions I performed but this article worked for me. My problems started after upgrading to Comcast's "Speed Boost" up to 16Mbps. I had the 6Mbps service and should have stayed with my original service. Windows Vista Linksys - WRT350N (Firmware Version: v1.03.7 )

    2008-08-29 13:47:39

  • Thanks, this helped heaps

    2008-06-22 05:59:27

  • Hello! I wrote a little C# application that automates the MTU discovery process and prepares a nice little report which might enhance this FAQ and simplify MTU testing for your users (at least the ones the run Windows). The application uses the OS ping to do the work so it should be a bit more compatible then if I wrote an internal network ping (or so my thinking goes), it certainly appears to work reasonably well. You can review and download the tool for testing from my webpage here: http://qsextreme.com/mtutest Currently the tool pings my web server which is hosted at godaddy (secureserver.net) which should have more then adequate bandwidth to support any number of users testing with this tool. I look forward to your comments, thoughts and criticisms, all are very welcome. Sincerely, Kevin Ottalini quicksilver@qsextreme.com

    2008-05-10 21:00:26



Expand got feedback?

edited by redxii See Profile
last modified: 2008-01-25 09:51:45