View Light

Fix for slow ICS on Windows 2000

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!
Reply
Replies:
- Linksys Router [Read 1183]
Comfortably Anonymous
11/3/2002 1:40:20 PM
Comfortably Anonymous
12/3/2002 11:43:57 AM
Comfortably Anonymous
3/7/2003 8:47:48 PM
Comfortably Anonymous
3/14/2006 4:37:46 AM
Comfortably Anonymous
4/2/2003 2:37:25 AM
Comfortably Anonymous
5/9/2003 12:15:44 AM
Comfortably Anonymous
6/17/2003 7:45:26 AM
Comfortably Anonymous
6/25/2003 10:27:09 PM
This site contains copyrighted material the use of which has not always been specifically authorized by the copyright owner. We are making such material available in our efforts to advance understanding of environmental, political, human rights, economic, democracy, scientific, and social justice issues, etc. We believe this constitutes a 'fair use' of any such copyrighted material as provided for in section 107 of the US Copyright Law. In accordance with Title 17 U.S.C. Section 107, the material on this site is distributed without profit to those who have expressed a prior interest in receiving the included information for research and educational purposes. For more information go to: http://www.law.cornell.edu/uscode/17/107.shtml . If you wish to use copyrighted material from this site for purposes of your own that go beyond 'fair use', you must obtain permission from the copyright owner.