Improve TCP/IP performance in W2K registry
Published: 08 Oct 2002 14:24 BST
Other MTU-related registry keys
Once you've set the MTU value for a PC or server, you may want to tweak some other MTU-related registry keys.
EnablePMTUDiscovery
Remote networks also have an MTU value, which is almost always different from that of the local network. Enabling this registry key tells TCP/IP to try to automatically detect the MTU for all networks along the path to a remote host. Once TCP/IP knows the MTU for all networks along a path, it can avoid using MTU values that that are too high, thus avoiding packet fragmentation and the performance problems that come with it.
The EnablePMTUDiscovery key doesn't exist in the registry unless you create it. However, this feature is enabled by default, so you would normally create this registry key only if you wanted to disable path MTU detection or experiment with turning path MTU detection on and off.
You would create the EnablePMTUDiscovery key at:
HKEY_LOCAL_MACHINE\SYSTEM\
CurrentControlSet\Services \Tcpip\Parameters
If you decide to create the EnablePMTUDiscovery key, the key must be a DWORD key, which is assigned a Boolean value. Assigning the key a value of 1 enables path MTU discovery, while assigning the key a 0 disables it.
If you choose to disable path MTU discovery, TCP/IP uses a default MTU size of 576 bytes for all communications across remote networks. While 576 bytes certainly isn't an optimal packet size, at least you won't have to worry about packet fragmentation. I personally recommend leaving the path MTU discovery feature enabled unless you're having problems reaching remote hosts.
EnablePMTUBHDetect
If you're having remote communication trouble, the problem could be related to a black hole router. Black hole routers are configured not to return the Destination Host Unreachable messages that are used by path MTU discovery. Normally, when TCP/IP performs path MTU discovery, the process works by sending out a packet of data with the DF (Don't Fragment) bit set. If the PC sending out the packet receives a Destination Host Unreachable message, it means that the MTU for that particular network may be too high; in this case, TCP/IP will try to use a lower value.
If you want TCP/IP to detect black hole routers, you must create a registry key called EnablePMTUBHDetect beneath:
HKEY_LOCAL_MACHINE\SYSTEM\
CurrentControlSet\Services\Tcpip\Parameters
The key must be a DWORD key with a Boolean value. Setting the key to 1 enables black hole detection, while setting the key to 0 disables black hole detection.
Black hole detection is disabled by default because enabling it increases the number of transmission retries when communicating with a host. This means that a lot of bandwidth can be consumed during the early phases of path MTU detection, and the initial connection to a host may be slower than normal.
The router packet queue
Windows NT, 2000, and XP can each function as routers between networks. By default, the routing function is disabled for security reasons. You can enable packet routing by navigating through the registry to:
HKEY_LOCAL_MACHINE\SYSTEM\
CurrentControlSet\Services\Tcpip\Parameters
and setting the IPEnableRouter key to a Boolean value of 1.
If you choose to enable packet routing, there are several ways to optimise the routing process. The Windows implementation of TCP/IP has a built-in router cache and queue that are active only when the routing function has been enabled.





