MTU and MSS explained

From the archive: Rick wrote this for cablenut.com on February 27, 2001. It is reproduced from the Internet Archive with light edits for readability. Some tools and links it mentions no longer exist.

Editor’s note: later in 2001 CableNut shipped a small MTU Tool to set this without editing the registry. See Version History.

1. What is MTU?

MTU (Maximum Transmission Unit) is the largest amount of data that can be transferred in one frame.

2. What is MSS?

MSS (Maximum Segment Size) is the actual size of TCP data that can be sent in one segment.

3. What affects them?

  • MTU is affected by the network it is connected to.
  • MSS is affected by the MTU, the TCP options you have enabled, and third-party hardware such as routers.

4. How to determine your MTU

The true way to determine your MTU is with the ping command. Open a command prompt (Start → Run → command, or cmd on Windows 2000) and ping a host with the “don’t fragment” flag and a packet size:

ping www.yahoo.com -f -l 1472

The -f flag sets the Don’t Fragment bit, and -l sets the size of the data to send. If you see “Packet needs to be fragmented but DF set”, the packet is too big for your connection: lower the number and try again. 1472 is a good starting point. Use a host on or near your own network, such as your gateway.

Your MTU is the largest size that doesn’t fragment, plus 28 (20 bytes of IP header and 8 bytes of ICMP header). If 1472 goes through, 1472 + 28 = 1500.

Largest non-fragmented sizeYour MTUTypical connection
14721500DOCSIS cable
14641492PPPoE DSL (the largest any PPPoE system can use)
548576Dial-up

If you have set an MTU in the registry, recheck it first: it will affect your results. Routers and different PPPoE configurations can change the answer too. For example, my UGate 3200 router limited my MTU to 1476 after a firmware update. The easiest way to check without the command line is SpeedGuide.net’s TCP/IP analyzer.

5. How to determine your MSS

If you thought MTU was tricky, sit down. Many more things affect MSS. First, the TCP options Windows can request through Tcp1323Opts:

  • Window scaling allows receive windows (RWIN) larger than 65,535 bytes.
  • Selective acknowledgment (SackOpts) allows smarter retransmission after packet loss.
  • Timestamps tag segments for round-trip-time measurement (RTTM).

Setting Tcp1323Opts to 1 enables only window scaling, 2 enables only timestamps, and 3 enables both. Strictly speaking you are requesting these options: your PC offers them when the connection is set up, and the server decides whether to use them.

Window scaling and SACK only appear in that handshake. Timestamps are the only option that travels in every data packet, adding 12 bytes to the TCP header. So the usual formula changes:

Timestamps off:  MSS = MTU - 40
Timestamps on:   MSS = MTU - 52

Hardware matters as well. Some routers of the day, including Linksys and UGate models with newer firmware, clamped MTU/MSS. On cable that was a small loss; on PPPoE it could be significant. A packet sniffer is the most reliable way to see your real frame and segment sizes: in my case, 1476-byte frames carrying 1436 bytes of TCP data.

6. Adding it all up

MSS plays a big role in choosing a good RWIN. On PPPoE, account for the 8-byte PPPoE header, your router, and the timestamp option. On cable, account for the timestamp option and your router.

7. The Nut’s last words

Whether your connection is PPPoE, cable, T1 or something crazier, I hope you now know how to work out your MTU and MSS correctly. Thanks go to SpeedGuide.net, and to Dannjr for proofreading.

Rick (Cablenut)