Summary
TCP starts a retransmission timer when each outbound segment is handed down to IP. If no acknowledgment has been received for the data in a given segment before the timer expires, the segment is retransmitted, up to the TcpMaxDataRetransmissions value. The default value for this parameter is 5.
The retransmission timer is initialized to three seconds when a TCP connection is established. However, it's adjusted on the fly to match the characteristics of the connection by using Smoothed Round Trip Time (SRTT) calculations as described in RFC793. The timer for a given segment is doubled after each retransmission of that segment. By using this algorithm, TCP tunes itself to the normal delay of a connection. TCP connections that are made over high-delay links take longer to time out than those that are made over low-delay links.
By default, after the retransmission timer hits 240 seconds, it uses that value for retransmission of any segment that has to be retransmitted. This can cause long delays for a client to time-out on a slow link.
More information
Important: This section, method, or task contains steps that tell you how to modify the registry. However, serious problems might occur if you modify the registry incorrectly. Therefore, make sure that you follow these steps carefully. For protection, back up the registry before you modify it so that you can restore it if a problem occurs. For more information about how to back up and restore the registry, see How to back up and restore the registry in Windows.
The TcpMaxDataRetransmissions registry value controls the number of times that TCP retransmits an individual data segment before it aborts the connection. This value isn't configured by default, but it can be entered to change the default number of retries.
Change the following subkey in Windows:
HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\Tcpip\Parameters
Value Name: TcpMaxDataRetransmissions
Data Type: REG_DWORD - Number
Valid Range: 0 - 0xFFFFFFFF
Default: 5
Description: This parameter controls the number of times TCP retransmits an individual data segment (non connect segment) before aborting the connection. The retransmission time-out is doubled with each successive retransmission on a connection. It's reset when responses resume. The base time-out value is dynamically determined by the measured round-trip time on the connection.
Windows provides a mechanism to control the initial retransmit time, and the retransmit time is then dynamically self-tuned. To change the initial retransmit time, modify the following registry values.
Change the following subkey in Windows:
HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\Tcpip\Parameters\Interfaces\ID for Adapter
Value Name: TCPInitialRtt
Data Type: REG_DWORD
Valid Range: 300-65535 (milliseconds in decimal)
Default: 0xBB8 (3,000 milliseconds expressed in hexadecimal)
Description: This parameter controls the initial retransmission time-out that is used by TCP on each new connection. It applies to the connection request (SYN) and to the first data segments that is sent on each connection. For example, the value data of "5000 decimal" sets the initial retransmit time to five seconds.
Note: You can increase the value only for the initial time-out. Decreasing the value isn't supported.
Change the following key in Windows:
HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\Tcpip\Parameters
Value Name: InitialRttData
Type: REG_DWORD
Valid Range: 0-65535 (decimal)
Default: 0xBB8 (3000 decimal)
Description: This parameter controls the initial retransmission time-out used by TCP on each new connection. It applies to the connection request (SYN) and to the first data segment(s) sent on each connection.
For example, the value data of "5000 decimal" sets the initial retransmit time to five seconds.
The Initial RTO in Windows can be controlled by using the netsh command by initialRTO.
For prerequisites and more information, see You can't customize some TCP configurations by using the netsh command in Windows Server 2008 R2.
For more information, search the web for "RFC 793 (Section 3.7) TCP Protocol Specification."
Source: Microsoft Learn / IT Pro troubleshooting by Microsoft and contributors. Documentation licensed CC BY 4.0. Code samples are covered by the MIT License. Converted from Markdown, with links normalized and embedded media omitted.
