Windows XP TCP Tuning
Increase Keep-Alive Time-Out for safety connection
The default TCP keepalive timer in Windows is 7200000 ms or 2 hours. This can cause problems if a connection goes down unexpectedly, the Windows PC may wait between 4 and 6 hours before dropping it’s side of the connection so it can be re-established.
A more standard value for the keepalive is 60000 ms or 1 minute. This can be changed by modifying a value in the Windows registry.
To edit the NT/2000/XP registry to set the TCP Keepalive timeout to 60 seconds use the following procedure:
HKEY_LOCAL_MACHINESYSTEMCurrentControlSetServicesTCPIPParameters
1. If one of the keys is not KeepAliveTime, in the Edit menu choose New>DWORD Value
2. Name the new key KeepAliveTime
3. Double click on the new KeepAliveTime DWORD entry
4. Enter the Value data ea60 (Hex) or 60000 (Decimal) and click OK
5. Exit regedit
6. Reboot the PC
This will set the TCP keepalive value to 60000 milliseconds, 1 minute. The hex value ea60 and the decimal value 60000 are equivalent.
KeepAliveTime 60 (seconds)
This can cause problems if a connection goes down unexpectedly, the Windows PC may wait between 4 and 6 hours before dropping it’s side of the connection so it can be re-established.
TcpMaxDataRetranmission 5 (seconds)
This key determines how many times TCP retransmits an unacknowledged data segment on an existing connection.
KeepAliveInterval 1 (second)
This key determines how often TCP repeats keep-alive transmissions when no response is received.
DefaultTTL = 128
The TTL value in the registry specifies the number of hops that a TCP/IP request can travel through before timing out. The default TTL is 32. If you ever have trouble connecting to a host that is more than 32 hops away, you can try increasing the TTL to 128.
EnablePMTUDiscovery
Enabling the setting causes TCP to attempt to discover the Maximum Transmission Unit (MTU or largest packet size) over the path to a remote host. By discovering the Path MTU and limiting TCP segments to this size, TCP can eliminate fragmentation at routers along the path that connect networks with different MTUs.
System Key: [HKEY_LOCAL_MACHINESystemCurrentControlSetServicesTcpipParameters]
Value Name: EnablePMTUDiscovery
Data Type: REG_DWORD (DWORD Value)
Value Data: (0 = false, 1 = true)
TcpMaxDupAcks
This parameter determines the number of duplicate ACKs that must be received for the same sequence number of sent data before “fast retransmit” is triggered to resend the segment that has been dropped in transit.
HKLMSYSTEMCurrentControlSetServicesTcpipParameters
TcpMaxDupAcks=”2″ (DWORD – range 1-3, recommended setting is 2).
MTU = 1500
This parameter specifies the Maximum Transmission Unit (MTU) for a network interface. By optimizing the MTU setting you can gain substantial network performance increases, especially when using dial-up modem connections.
MTU stands for Maximum Transmission Unit and in basic terms, it defines the maximum size of a packet that can be transferred in one frame over a network.
Create a new DWORD value, or modify the existing value, called “MTU” and set it to equal the required MTU size in decimal.
Recommended Values
•576 – Dial-up Connections
•1492 – PPPoE Broadband Connections
•1500 – Ethernet, DSL and Cable Broadband Connections
Restart Windows for the change to take effect.
Web-Browsing:
KeepAliveTimeout 120 (seconds)
By default, IE will reuse an HTTP connection unless it’s been idle for longer than 1 minute. You can adjust this keep-alive timeout setting by performing the following steps:
1.Start a registry editor (e.g., regedit.exe).
2.Navigate to the HKEY_CURRENT_USERSoftwareMicrosoftWindowsCurrentVersionInternet Settings registry subkey.
3.From the Edit menu, select New, DWORD Value.
4.Enter the name KeepAliveTimeout, then press Enter.
5.Double-click the new value, set it to the number of milliseconds in the new timeout, then click OK.
6.Close the registry editor.
7.Restart the computer for the changes to take effect.