HOME
TOPICS
SEARCH
ABOUT ME
MAIL

 
Windows tips: How to set up Windows to make your cable connection faster. You could see a big improvement.
  technofile
Al Fasoldt's reviews and commentaries, continuously available online since 1983

Setting TCP parameters for cable modems in Windows 95 and 98


June 24, 1998

By Al Fasoldt
Copyright © 1998, Al Fasoldt

   Windows 95 and Windows 98 allow extensive customization of the settings for the TCP protocol, the standard method used to send data back and forth on the Internet. The settings that need to be tweaked for cable-modem connections are the Maximum Transmission Unit (MaxMTU), the Maximum Segment Size (MSS), the Default Receive Window (DefaultRcvWindow), and the Default Time to Live (DefaultTTL). These are changed in the Windows Registry.
   MaxMTU (yes, it's a redundant term!) is expressed in bytes and is the amount of data your computer would like to place in a single packet. (TCP is a packet protocol, sending and receiving blocks, or packets, of data rather than streams of data.) The computer does not always get the MTU packet size it asks for, but setting MTU to an appropriate size for the speed and quality of the connection is always a good idea. A large MTU normally works better than a small one for cable modem connections. The default is 1500 bytes -- expressed, as are all number values, without a comma or other delimiter for the thousands designation -- which is the right setting for a cable-modem connection. Do not set it higher or lower.
   (You may need to enter 1500 because you may have changed it to a smaller number, intentionally or not. Many utilities automatically alter this setting because a small number works better with a dialup connection.)
   The Maximum Segment Size is the largest amount of data (again, in bytes) your computer would like to handle in a single burst. If segments do not fit into the MTU size, the leftover bytes from these overly large segments are sent separately in their own segments, slowing everything down. Complicating matters are the bytes that must be sent along with each segment to keep track of the data, so in actual use the segment size has to be smaller than the MTU by a specified number of bytes. This number has to be the MTU size (1500) minus the number of overhead bytes (40), or 1460.
   The Default Receive Window is also expressed in bytes and is the size of the buffer where packets are held before your computer checks to see if all the packets (and their contents) have arrived intact. A large buffer is not always better than a small one, but it is usually more efficient during high-speed communications because the computer does not have to stop and check for acknowledgments as often. This reduces overhead. For utmost efficiency, the Default Receive Window must be an even multiple of the Maximum Segment Size (1460 X 16, 1460 X 32, 1460 X 40 and so on). The maximum possible efficient size of the Default Receive Window, given an MSS of 1460, is 64240. Setting this to a size larger than 65536, as one particular (and possibly bogus) cable-modem utility does, forces the Default Receive Window to assume a size of 65536. This guarantees that segments will be fragmented in all systems in which the MSS is 1460. (If 64240, the size recommended below, does not seem to help, try the following alternate sizes: 35040, 43800 or 52560.)
   The Default Time to Live is the number of separately relayed connections, or hops, that are allowed in the transmission of data. A higher number keeps the computer from giving up too early when the Internet is congested.
   The settings for these values are all located in (or need to be added to) the Windows Registry. If you have never edited the Registry before, make sure you read the cautions in the next paragraph very carefully. If you are an old hand at editing the Registry, you can skip the cautions.
   The Registry is edited using REGEDIT or any substitute Registry editor. I use the Registry Editor Extensions by DC Software, which contains a history list of areas of the Registry you have previously edited so you can return to them instantly. Before you edit the Registry, make a backup copy of the two files that the Registry is assembled from. Those files are USER.DAT and SYSTEM.DAT, located in the Windows folder. (The name of the folder may be something else on your system; if that's the case, look for them in whatever folder is used for the main Windows folder, such as "Win95.") If you have User Profiles on your PC, your own USER.DAT will be located elsewhere, in a folder named for your username in C:\Windows\Profiles.
   Copy these files to USER.BAK and SYSTEM.BAK, respectively.
   Note well: If you mess everything up when you edit the Registry, shut down Windows and boot up in DOS mode, then make sure you have the two files USER.BAK and SYSTEM.BAK in the Windows folder. If they are there, remove all attributes from USER.DAT and USER.BAK and from SYSTEM.DAT and SYSTEM.BAK by typing these commands: ATTRIB -a -s -h -r USER.* and ATTRIB -a -s -h -r SYSTEM.*. Then delete the bad files (DEL USER.DAT and DEL SYSTEM.DAT) and rename the good ones (REN USER.BAK *.DAT and REN SYSTEM.BAK *.DAT).
   To start editing the Registry, type REGEDIT in the Run line of the Start Menu and hit the Enter key.
   Run REGEDIT from the Run line of the Start Menu. Use the Find function and look for this key:
   HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\VxD\MSTCP
   Then do the following:

       Add or edit the DefaultMSS value. (To add the value, click once in the right pane and choose New, then String Value, and name it DefaultMSS.) Change the Value data to 1460.
       Add or edit the DefaultRcvWindow value. To create it, choose New, then String Value, and change the Value data to 64240.
       Add or edit the DefaultTTL value. To create it, choose New, then String Value, and change the Value data to 128.

   Now look for this key:
   HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\Class\NetTrans
   This key probably will have two or more subkeys, probably numbered (such as 0001, 0002 and so on). Each subkey is associated with a different TCP binding. Find the subkey that refers to the network card that communicates with the cable modem before you make any changes. To do this, look at the values in each key.
   If you can't figure out which key is the right one, do this:
   Close REGEDIT and open the Network applet in the Control Panel. (An easy way is to right click Network Neighborhood and choose Properties.) Find the TCP stack that's bound to (associated with) the network card that talks to the cable modem, open the DNS Configuration tab, write down what the current settings are, then click Enable DNS (if it's not already enabled) and put 192.168.0.255 in the DNS Server Search Order. Click OK twice, then reboot. These changes are being made just to help you find the card's TCP stack in the Registry. DON'T FORGET TO CHANGE THE SETTINGS BACK TO WHAT THEY WERE AFTER YOU EDIT THE REGISTRY.
   Run REGEDIT again and go back to the NetTrans key. Find 192.168.0.255 in one of the subkeys; it's the subkey you want to modify.
   Then do the following:

       Add or edit the MaxMTU value. To create it, choose New, then String Value, and change the Value data to 1500.

   Close REGEDIT. If you had changed the TCP settings in order to locate the correct TCP stack, open the Network applet and put the settings for that TCP stack back to what they were.
   Reboot, and you should be done.