Fix for slow ICS on Windows 2000
Posted: 11/3/2002 1:22:18 PM
By: Comfortably Anonymous
Times Read: 8,632
0 Dislikes: 0
Topic: Windows Administration
When using Internet Connection Sharing to connect through a Windows 2000 machine from a Windows 2000 machine (I've only tested this problem using a Windows 2000 machine as a client, other versions of Windows used for a client may also have the same problem, I don't know.) it will probably go pretty slow with the default settings, as the Message Transfer Unit (MTU) sizes do not match for some reason. When the client MTU is larger than the Host ICS MTU, packets will get silently dropped, causing your connection to be excruciatingly slow.

To fix this requires a bit of simple experimentation to find the proper MTU size. I found the maximum working MTU size on my machine is 1344. Your mileage may vary.

On the client machine, open a command prompt. I started with 1500 and worked my way through it.

The command to use is ping, with some extra flags. Assuming your host machine is 192.168.0.1 try the following:

ping -f -l (MTU Size) (Host Address)

Such as:

ping -f -l 1500 192.168.0.1

With a value of 1500, you will either get no response or a message about "Packet needs to be fragmented but DF set." depending. When you get no response, try a lower number.

I tried 1200 to start:

ping -f -l 1200 192.168.0.1

Which gave me a normal ping response like:

---------------------------------------------------
Pinging 192.168.0.1 with 1200 bytes of data:

Reply from 192.168.0.1: bytes=1200 time=10ms TTL=128
Reply from 192.168.0.1: bytes=1200 time<10ms TTL=128
Reply from 192.168.0.1: bytes=1200 time<10ms TTL=128
Reply from 192.168.0.1: bytes=1200 time<10ms TTL=128

Ping statistics for 192.168.0.1:
    Packets: Sent = 4, Received = 4, Lost = 0 (0% lo
Approximate round trip times in milli-seconds:
    Minimum = 0ms, Maximum =  10ms, Average =  2ms
----------------------------------------------------

This means that an MTU size of 1200 works, but the bigger the MTU, the faster data can be transmitted, so now we start increasing the size. I try 1300 next:

ping -f -l 1300 192.168.0.1

Once again I get a good response. So I try 1400 for the MTU size:

ping -f -l 1400 192.168.0.1

This time I get a bad response, this means an MTU size of 1400 is too big, so I cut the difference to 1450 and try again, still no response, still too big.

I try 1325 and get a good response. I then kept increasing the size until I could not get a response (1345 didn't work for me, but 1344 did, so I went with that as the best size.)

Now, what to do with this magic value?

Open regedit, and open HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters\Interfaces - Underneath Interfaces, you'll see one or more cryptic entries like {1B2709BD-B617-44B0-9386-B508EE40F17B}. This is Windows obscure way of refering to the network card settings. If there is only one, you know which is the correct entry. If there is more than one (and assuming you have only one NIC in your client machine), then click on each one individually and look at the values underneath it. Find the entry that has the IP address of the ICS host machine for the DHCPDefaultGateway and DHCPServer entries. The other entries will probably be 0.0.0.0 for same settings.

Once you have located the correct entry, right-click on that entry and select "New DWORD Value". Type "MTU" (In uppercase, no quotes) for the new name and hit Enter. Next, double-click on the new MTU entry to bring up the dialog to set the actual value. Select the radio button for a Decimal Base, and enter the MTU value you figured out with the ping command above, then click OK. Close Regedit.

The last step is to Right-Click on My Network Places, then select Properties from the menu that appears. This will bring up your Network and Dialup Connections. You should have an entry called "Local Area Connection" - right-click on it and select Disable. Once it is disabled, right-click on Local Area Connection again and select Enable. This restarts the network connection with the new correct MTU value.

Open your web browser and connect to somewhere, you should see a massive increase in speed and feel happy for the rest of your life!
Rating: (You must be logged in to vote)
Discussion View:
Replies:

Fix for slow ICS on Windows 2000
Posted: 11/3/2002 1:22:18 PM
By: Comfortably Anonymous
Times Read: 8,632
0 Dislikes: 0
Topic: Windows Administration
I experimented with another network connected with a LinkSys router. The magic MTU size with it turned out to be 1472. Experiment to make sure with your setup.
Rating: (You must be logged in to vote)

Fix for slow ICS on Windows 2000
Posted: 11/3/2002 1:22:18 PM
By: Comfortably Anonymous
Times Read: 8,632
0 Dislikes: 0
Topic: Windows Administration
I am so glad that someone else has had this problem - and has found a way of resolving this. I looked in vain for ages, until finally finding a little utility called DrTCP, which makes chaging verious TCP setting easy without getting into the registry.

I am currently having issues with a dialup connection using an aironet GPRS modem card which although it should attain approx 117kbps seems to be slower than using and old 9600kbps GSM card under windows 95.  I am hoping this may be a similar problem but i have yet to resolve this.

Anyone know of a fix?  
Clintski2@aol.com

Rating: (You must be logged in to vote)

Fix for slow ICS on Windows 2000
Posted: 11/3/2002 1:22:18 PM
By: Comfortably Anonymous
Times Read: 8,632
0 Dislikes: 0
Topic: Windows Administration
Thanks a lot Klom Dark for this post!

After enabling Internet sharing on my main server, my DSL speed decreased dramatically (worse than 56k).  I had done internet sharing  a TON of times before (thru ICS, RRAS, 3rd party software, etc.) and never encountered any problem. But, for some reason, this problem came up with a new installation of win2k pro.  I was troubleshooting the problem for about 5 hours without a solution. I tried a bunch of tweaks/registry tricks to increase speed.
Then, I stumbled upon your post, tried it and kaboomm!!! problem solved!
Now everything works great, and Internet is FAST AS A LIGHTNING.

Thank you SOOOOOO MUCH for sharing this information and helping out.

-sincerely,

win2kuser :)
Rating: (You must be logged in to vote)

Fix for slow ICS on Windows 2000
Posted: 11/3/2002 1:22:18 PM
By: Comfortably Anonymous
Times Read: 8,632
0 Dislikes: 0
Topic: Windows Administration
Klom Dark,

Thank you so much. I cannot even begin to explain how much this has helped me. I was searching for hours and hours about what the problem could be. I was about to completely give up hope, I'm so happy I ran into this.

Thank you, thank you, THANK YOU!!

A Dhaliwal
Rating: (You must be logged in to vote)

Fix for slow ICS on Windows 2000
Posted: 11/3/2002 1:22:18 PM
By: Comfortably Anonymous
Times Read: 8,632
0 Dislikes: 0
Topic: Windows Administration
Man!  For over a year I've suffered with this.  You're a life saver Klom dark :)
Rating: (You must be logged in to vote)

Fix for slow ICS on Windows 2000
Posted: 11/3/2002 1:22:18 PM
By: Comfortably Anonymous
Times Read: 8,632
0 Dislikes: 0
Topic: Windows Administration
Dude... You're the man...  I found many sites explaining how to change the MTU size on WIN2K, but yours is the first that is comprehensible.  Thanks for taking time out.  It makes a difference.  

Rating: (You must be logged in to vote)