none
Window registy: TCPMaxConnectRetransmissions

    Question

  • Dear All,

    According to the definition of TCPMaxConnectRetransmissions (Default value is 3 times and default 3 seconds delay  for the first retry), the time delay will be doubled for another successfuly connection retry. Therefore, the time delay of every single retry is as follow:

    1st - 3 seconds
    2nd - 6 seconds
    3rd - 12 seconds
    4th - 24 seconds
    5th - 48 seconds
    6th - 96 seconds
    7th - 192 seconds
    8th - 384 seconds
    9th - 768 seconds
    10th - 1536 seconds

    From the above list, it can be concluded that the total time wait for 10th connection retry is 3 + 6 + 12 + 24 + 48 + 96 + 192 + 384 + 768 + 1536 = 3072 seconds ( ~ 50 minutes). But I found that this cannot be applied to my server after adding this key and set value to 10 (decimal) in registry, the connection timeout was prompted after telnet to an unknown IP address for nearly 13 minutes. Even though I tried to connect to an unknown IP address via JAVA socket programming, same case was happened.

    Did I misunderstand the definition of TCPMaxConnectRetransmissions? Please kindly advise me if anybody know, thanks for your help!

    Cheers,
    oh_silly
    • Moved by Dusty Harper [MSFT] Tuesday, November 15, 2011 5:25 PM Not dev related (From:Windows Filtering Platform (WFP))
    Tuesday, March 17, 2009 10:37 AM

Answers

  • Hello,

    On windows 2003, the timout grows exponentially but it is capped by a limit of 120 secs. So when you set a TCPMaxConnectRetransmissions to a value of 10, the SYNs would set as follows. Note that when you set it to 10, a total of 11 SYNs would be sent. The reg key specifies how many SYN should be "retransmitted"

    1st - 0 seconds
    2nd - 3 seconds (diff =3 sec)
    3rd - 9 seconds (diff =6 sec)
    4th - 21 seconds (diff =12 sec)
    5th - 45 seconds (diff =24 sec)
    6th - 93 seconds (diff =48 sec)
    7th - 189 seconds (diff =96 sec)
    8th - 309 seconds (diff =120 sec)   >>>>>>>>>> This is where timeout is capped. Instead of 96*2 secs, it is set to 120sec.
    9th - 429 seconds (diff =120 sec)
    10th - 549 seconds (diff =120 sec)
    11th- 669 seconds (diff =120 sec)

    After 11th SYN is sent TCP/IP would wait for one more timeout i.e. 120 secs after which it would stop retrying further since it has already retried for TCPMaxConnectRetransmissions times.

    Thus total timeout would be 669+120 = 789 ~ 13 minutes that you observed.

    Hope it clarifies your doubt.

    -------------------------
    Mohit Garg
    Microsoft
    Windows Networking
    • Marked as answer by oh_silly Tuesday, July 14, 2009 3:01 AM
    • Unmarked as answer by oh_silly Tuesday, July 14, 2009 3:03 AM
    • Marked as answer by oh_silly Tuesday, July 14, 2009 3:03 AM
    Tuesday, May 05, 2009 6:29 AM

All replies

  •  TCPMaxConnectRetransmissions has been removed from Vista/Win7. So end user doesn't have control on TCP handshake behavior on these two OS. Which OS/build are you running? Could you please share network capture with us?

    Thanks
    Carl
    Thursday, March 26, 2009 9:48 PM
  • Hi Carl,

    Thanks for your information. My query was based on windows server 2003. And I just found the answer from web.

    My founding was based on http://tools.ietf.org/html/rfc2988
    As the retransmission timeout (RTO) value will be doubled for each connection retranmission (with refer section 5.5 of the above link), the value of RTO will be listed as below:

    1st - 3 seconds
    2nd - 6 seconds
    3rd - 12 seconds
    4th - 24 seconds
    5th - 48 seconds
    6th - 96 seconds
    7th - 192 seconds
    8th - 384 seconds
    9th - 768 seconds
    10th - 1536 seconds

    But with this doubling operation, the RTO value will increase exponentially. According section 2.5 of the above link, there will be an upper bound value for limiting the RTO (when RTO > 60s). As a result, start from 6th retransmission, the RTO value will be bounded by RTO_MAX instead of doubling the preivous RTO value. The RTO value will be now as follow:

    1st - 3 seconds
    2nd - 6 seconds
    3rd - 12 seconds
    4th - 24 seconds
    5th - 48 seconds
    6th - RTO_MAX seconds
    7th - RTO_MAX seconds
    8th - RTO_MAX seconds
    9th - RTO_MAX seconds
    10th - RTO_MAX seconds

    In window server 2003, the RTO_MAX value is set as default 120 seconds. Therefore, the total time to wait TCP timeout should be 93 + 5*RTO_MAX = 693 seconds

    Please kindly clarify for any mis-intepretation.

    Cheers,
    oh_silly
    Monday, April 06, 2009 2:41 PM
  • Hello,
    If I understand correctly, you are concerned about retransmissions during connection establishment. On Windows Server 2003, the default number of retransmissions during connection establishment is two. See http://technet.microsoft.com/en-us/library/cc758896.aspx. In the default case, the TCP will abort the connection establishment attempt after 21 seconds (= 3 + 6 + 12) if it has not completed by then.

    Remember that RTO will remain the default value until a round-trip time measurement has been made (RFC 2988, section 2.1). Unless timestamps are enabled, the TCP won't be able to determine which of its SYN transmissions triggered a received acknowledgement. Thus, if any retransmissions are necessary during connection establishment and timestamps are not enabled, the RTO will be three seconds. If no retransmissions happen during connection establishment, the RTO will be calculated as per RFC 2988.

    --
    Aaron Schrader
    Windows Networking
    Saturday, May 02, 2009 2:58 AM
  • Hello,

    On windows 2003, the timout grows exponentially but it is capped by a limit of 120 secs. So when you set a TCPMaxConnectRetransmissions to a value of 10, the SYNs would set as follows. Note that when you set it to 10, a total of 11 SYNs would be sent. The reg key specifies how many SYN should be "retransmitted"

    1st - 0 seconds
    2nd - 3 seconds (diff =3 sec)
    3rd - 9 seconds (diff =6 sec)
    4th - 21 seconds (diff =12 sec)
    5th - 45 seconds (diff =24 sec)
    6th - 93 seconds (diff =48 sec)
    7th - 189 seconds (diff =96 sec)
    8th - 309 seconds (diff =120 sec)   >>>>>>>>>> This is where timeout is capped. Instead of 96*2 secs, it is set to 120sec.
    9th - 429 seconds (diff =120 sec)
    10th - 549 seconds (diff =120 sec)
    11th- 669 seconds (diff =120 sec)

    After 11th SYN is sent TCP/IP would wait for one more timeout i.e. 120 secs after which it would stop retrying further since it has already retried for TCPMaxConnectRetransmissions times.

    Thus total timeout would be 669+120 = 789 ~ 13 minutes that you observed.

    Hope it clarifies your doubt.

    -------------------------
    Mohit Garg
    Microsoft
    Windows Networking
    • Marked as answer by oh_silly Tuesday, July 14, 2009 3:01 AM
    • Unmarked as answer by oh_silly Tuesday, July 14, 2009 3:03 AM
    • Marked as answer by oh_silly Tuesday, July 14, 2009 3:03 AM
    Tuesday, May 05, 2009 6:29 AM
  • Thanks for your kind attentions! I get what I need from this forum, thanks!

    Cheers,
    oh_silly
    Tuesday, May 05, 2009 5:47 PM
  • Hi Mohit,

    Thanks for your clarification and the total time waiting of retransmissions (1st transmission + 10 retransmission) collected from Windows Server 2003 is exactly matched with the time you concluded.

    Cheers,
    Van
    Tuesday, July 14, 2009 3:05 AM
  •  TCPMaxConnectRetransmissions has been removed from Vista/Win7. So end user doesn't have control on TCP handshake behavior on these two OS. Which OS/build are you running? Could you please share network capture with us?

    Thanks
    Carl


    Hi!

    Is there a way to increase max. connect retransmissions on Vista? I am currently limited to 21 seconds, but my remote server connects in about 30 seconds...

    Mark

    Tuesday, June 29, 2010 10:51 AM
  • Dear Carl,

    Can you please share any link from MSDN or from Microsoft Knowledge-base, which shows that the "TCPMaxConnectRetransmissions" parameter is removed from Win7?

    Also I'll appreciate if you can guide how we can modify this Parameter alternatively (if possible).

    Thanks,

    Ankit Jalota

     


    • Edited by AnkitJalota Tuesday, November 15, 2011 12:13 PM
    Tuesday, November 15, 2011 12:10 PM
  • Hi Ankit, Carl:

    I am trying to find the same information and came across this post. Has the  TCPMaxConnectRetransmissions Registry entry been deprecated in Win7? Is there an alternative? My use case is that I want to initiate a Remote Desktop Connection to a server, and that connection sometimes succeeds, but sometimes it times out at around 21seconds which is bacially pointing to the fact that the default setup in my Win7 machine is 3 retries (3s, 6s, 12s => total=21s). I'd like to increase the number of Retransmissions, and have tried to add a new TCPMaxConnectRetransmissions entry to the registry and set it to 7, but that does not work.

    thanks!

    Thursday, December 15, 2011 12:12 AM
  • Me too having the same problem, here is my code snipit

    1.WSAStratup()

    2. Socket()

    3. bind this socket to the IP protocol

    4. WSAConnet()

    5. Select() with 3 second (timedwait)

    The reomte server is unavailable, so the select call returns after 21 seconds(3+6+12=21). I could not found any registry setting/nesh commands to modify the default value.



    • Edited by rarulselvan Friday, February 10, 2012 7:08 AM
    Friday, February 10, 2012 7:06 AM