Make your own free website on Tripod.com

FindMTU

People asked me if there is a way for detecting the best MaxMTU value for their connection. I can answer this with a full yes. It's very simple. Windows 95/98 installs ping.exe. Ping sends a packet to a host and times how fast it comes back. But that's not all. It can also check if the packet must be fragmented because of a low MaxMTU.

Here's how it works:

Start Ping.exe from a dos window with the following command line: ping www.netscape.com -f -l 1500

It sends a packet of 1500 bytes (-l 1500) to www.netscape.com and it checks if it gets fragmented on the route (-f). If it gets fragmented, lower the packet size and try again. Repeat this until you find the highest packet that doesn't get fragmented. That's your best MaxMTU (in theory).

But hey Rob, that's a lot of work! Can you write a program that does this for me?

Okay but I want to make a nice program, so I won't use the ping.exe wich runs in a dos box (Other ugly programs use this. Rename ping.exe to dosping.exe and try the option again)

After a couple of hours, here's the result:

Screenshot

Some questions:

Why should I set the MaxMTU to the default?

If you ping with a larger packet than the MaxMTU, the packet will always be fragmented. So you won't get reiliable results.

Why does FindMTU find a packet size 28 bytes smaller than MaxMTU?

FindMTU searches for the largest data packet it can send without fragmenting. This is without the the ping header (28 bytes). For the nerds: (Type: 1 byte, code: 1 byte, checksum: 2 bytes, identifier: 2 bytes, sequence no: 2 bytes, original header: 12 bytes and 8 bytes not used). PING.EXE does the same. FindMTU now gives you both the results (with and without the 28 bytes).

FindMTU finds a MaxMTU of 1500. Is this good?

Some servers doesn't honour the don't fragment bit so they will fragment the packet. FindMTU gives back 1472+28=1500. The best thing to do is to try the benchmark with different settings for MaxMTU.

Why did you make a benchmark?

Some servers doesn't honour the don't fragment bit so they will fragment the packet. FindMTU gives back 1472+28=1500. The best thing to do is to try the benchmark with different settings for MaxMTU.