When a network connection is initiated, the TCP 3 way handshake take place (explained here).

When the initial syn packet is sent, the initiator will wait for a response for a certain time before trying again. For the first packet this is around 2 seconds for RedHat Linux (the retry time is calculated based in the RTT - Round Trip Time, between the peers). After the second syn packet is sent, the retry time is doubled to 4 seconds, then 8 seconds for the next packet, and so on.

The number of retries is based on the value set for tcp_syn_retries (see /proc/sys/net/ipv4/tcp_syn_retries). For RedHat linux the default is 5.

To change this edit /etc/sysctl.conf adding:

 net.ipv4.tcp_syn_retries = x

where x is the number of retries.

Then sysctl -a to re-read the file.

Recent Changes