TCP Connect Timeout (Server Side)
Introduction
The tcp_synack_retries
variable. Since Linux 2.2.
The maximum number of times a SYN
/ACK
segment for a passive TCP connection will be retransmitted.
This number should not be higher than 255
.
See tcp_synack_retries
- Debian Manpages
OS Configuration
$ cat /proc/sys/net/ipv4/tcp_synack_retries
5
$ sysctl net.ipv4.tcp_synack_retries
net.ipv4.tcp_synack_retries = 5
sysctl -w net.ipv4.tcp_synack_retries = 2
// linux kernel 2.6.32
icsk->icsk_rto = min(icsk->icsk_rto << 1, TCP_RTO_MAX)
timeout = 1
while tcp_synack_retries:
tcp_synack_retries -= 1
timeout += 2 ** (tcp_synack_retries - r)
return timeout