MTU and MSS

MTU and MSS

Dial-Up and Home Networking
Troubleshooting Reference
Last Update 06 December, 2009
Maintained by Lynn Larrow

Note: If you are looking for a basic TCP/IP Troubleshooting Guide for Windows, start with the Microsoft first:  How to troubleshoot TCP/IP connectivity with Windows XP or How to Troubleshoot TCP/IP Connectivity with Windows 2000 or Windows NT

What do I do first?

There is no free lunch or magic bullet to increase your throughput.  Be wary of quick fixes.  In most cases, the default settings that come with your OS should be sufficient. That said, the best way to determine fact from fiction is to:

(1) Measure your throughput before and after you make any changes.  DSL Reports provides some good speed measurement tools for example.  If you are getting close to your billed maximum access rate, stop here!  You’ll always be a little under your maximum subscription speed, because there is a lot of load and router hops on the Internet.  Also, for example if you are a using DSL, your distance from the CO is a factor.  The closer you are to the CO the better.

(2) If you are using PPPoE and your measured throughput is a lot lower than you would expect, you need to make sure that your MTU is set to 1492.  See Cisco – Troubleshooting MTU Size in PPPoE Dialin Connectivity.  This guide includes detailed instructions on how to change your MTU.  If your MTU is set correctly, I would check with your ISP so that they can do more troubleshooting of your problem.

Also, you can double check the references and evidence provided by the DSL or cable modem FAQs via Wikipedia, Google or Bing, I have a few listed on my (old)  Modem, Networking and Communications Links

What are  the Optimum Windows values for MTU and MSS?

AcronymFull NameSample Analog
Modem Value
<128 Kbps
Sample DSL,
Cable Modem
Values
MTUMaximum Transmission Unit576
(A)
1492
(B)
MSSMaximum Segment Size (MTU – 40 bytes
for IP and TCP headers)
5361452
“RWIN”TCP Receive Window (Buffer)
or DefaultRcvWindow
8192
(C)
32768
(D)

The table above shows common used values for different TCP/IP connection types.  (A)  Microsoft Automatic Mode settingDescription of the Internet Protocol Packet Size Settingfor Windows 98/ME for connections < 128 Kbps (B) Automatic Mode setting for connection speeds > 128 Kbps.   (C) default buffer size or DefaultRcvWindow in Windows 98/ME and (D) buffer size recommended by the tireless John Navas, seeNavas Cable Modem/DSL Tuning Guidefor more details.   If you really want a good low level description of how this works under the covers in UNIX, seeSolaris – Tuning Your TCP/IP Stack.  Of course serious students of TCP/IP, need to purchase a book like Richard Steven’s (TCP/IP Illustrated: Volume 1, 1994).

Question: What is the optimum MTU value?

Answer: There  is no universal optimum MTU value. Performance will vary depending on the purpose of your TCP/IP application.

However, there are RFC specifications that specify default  MTU values for standard protocols. These default values are where you should begin your quest for an “optimum” setting and vary depending on the protocol implementation you are using. Below are some sample RFC’s for MTU.

MTUProtocolRFC
576Default879
1500PPP default1134
296PPP (low relay)1144
1500Ethernet895
1006SLIP1055
1492PPPOE2516

The default MTU specification was made in 1983 to help vendor implementations of devices like routers to insure interoperability. Most modern router implementations now support MTUs of 1500, but there are some older, e.g., international routers out there that do not support 1500. In fact, Richard Steven’s (TCP/IP Illustrated: Volume 1, 1994, p 154) found a transatlantic router with an MTU set at 572!

Question Do you know any good resources on TCP Receive Window or Buffer Size?

Answer:    If you are looking for a good technical introduction to this topic, check out Solaris – Tuning Your TCP/IP Stack or better yet this Alternative Site pointed out by Tim Kelly CEO, President, Redneck King of Funk Solaris – Tuning Your TCP/IP Stack Alternative.  This FAQ references RFC1326.   For detailed information on how to change your buffer size for DSL/Cable Modems, see the Navas Cable Modem/DSL Tuning Guidefor more details.

IP Fragmentation

The main reason one would be concerned with changing a default MTU value is the problem of IP fragmentation. IP fragmentation occurs when you pass through a router with an MTU less than the MTU you are using. If your TCP/IP stack is set to a MTU of 1500 and you hit a router with a MTU set to 576. The router will fragment your packets down to 576. When you finally reach your destination, those datagrams will have to be re-assembled and this will slow down your throughput, e.g, download time.  You can check on fragmentation and other errors by using the netstat -s (use netstat -s | more to stop the scroll and netstat -x to see the options available to you) command and checking the IP statistics.   Note the Datagram is the MTU.

IP Statistics

Packets Received                   = 152113
Received Header Errors             = 0
Received Address Errors            = 0
Datagrams Forwarded                = 0
Unknown Protocols Received         = 0
Received Packets Discarded         = 0
Received Packets Delivered         = 152113
Output Requests                    = 122510
Routing Discards                   = 0
Discarded Output Packets           = 0
Output Packet No Route             = 0
Reassembly Required                = 0
Reassembly Successful              = 0
Reassembly Failures                = 0
Datagrams Successfully Fragmented  = 0
Datagrams Failing Fragmentation    = 0
Fragments Created                  = 0

Segments Retransmitted

Another problem to check out is whether or not you are having excessive retransmissions.  The lower your retransmit rate (Segments Sent/Segments Retransmitted) the better.  Sun has an interesting FAQ on this subject Tips for TCP/IP monitoring and tuning to make your network sing.  If you have a retransmit rate in Windows, check Microsoft there are some patches can fix this type of problem. In this example (using netstat -s), my rate was about 1.5%.  Not bad for Napster 😉  Note the Segment is the MSS.

TCP Statistics

Active Opens                = 476
Passive Opens               = 22
Failed Connection Attempts  = 27
Reset Connections           = 219
Current Connections         = 10
Segments Received           = 149817
egments Sent               = 117832
Segments Retransmitted      = 1820

Rules of Thumb for changing your MTU values for general Internet usage.

Big Grain of Salt: I have not had to fiddle with any of these settings for Windows XP or Vista.  I just use the default settings. I also have a good DSL connection close to the CO

  • If you have Windows 98/ME/XP/Vista/Windows 7 or later with Automatic Mode, you shouldn’t have to fiddle with MTU at all.
  • If you are on a LAN at work, do not change your  MTU without consulting with your help desk personnel first.
  • In general if you have a high speed connection like ADSL, use the default MTU of 1500.   A major exception to this rule is PPPOE connections which require a smaller MTU of 1492.  See Cisco – Troubleshooting MTU Size in PPPoE Dialin Connectivity. or rfc2516 – Method for Transmitting PPP Over Ethernet (PPPoE). (Thanks Nathan.)
  • Create a baseline of throughput in kbps for FTP and HTTP downloads during non-peak hours.
  • Use the value recommended by the vendor who sold you your TCP/IP stack. Microsoft sets Automatic Mode to an MTU 576 in Windows 98 so use that if you tweak 95 for lower speed connections <128kbs.
  • Consult with your ISP on which MTU value you should use.
  • Backup your Windows flavor registry!!!
  • Use a tool like DR TCP, a program recommended by Cisco (Includes Instructions), from dslreports.com to modify your registry for MaxMTU only.
  • Calibrate your new settings by downloading the same file from the Internet or the same http site you used in your baseline during the same non-peak hours.
  • Or just get Linux and get rid of Bill Gates completely ;-)!

In Windows 98 with Automatic Mode, Microsoft sets the MTU size of 576 for with connection speeds under 128K.   Windows 95 does not have Automatic mode.    So if you want to change this setting, you can do it yourself  See Q158474 – Windows TCP/IP Registry Entries or use a program like DR TCP  for modifying Windows 95 MaxMTU setting.

Windows 98/ME has an Automatic mode setting that will set the default MTU to the Internet Standard Maximum Size (RFC879) of 576 for PPP rates below 128 kbs Description of the Internet Protocol Packet Size Setting. .

If you are using Windows 95, the default MTU is 1500. Unless you have some overriding need (e.g., excessive fragmentation, ISP requirement, Internet Mail/News Hangs), I would not recommend the average user to try and modify their registry to change the MTU or other PMTUDiscovery (See RFC1144) values. If you are bold, here are the instructions from Microsoft

For Diagnosing Windows NT fragmentation problems and other MTU related information, here is an excellent Microsoft reference, which contains several related links: Diagnoses and Treatment of Black Hole Routers

More MTU defaults

Here is (according to Microsoft) the Default MTU Size for Different Network Topology

A more complete MTU listing is available in RFC1191

 

 

Zeen is a next generation WordPress theme. It’s powerful, beautifully designed and comes with everything you need to engage your visitors and increase conversions.