I am using a linux machine.
I want to set the number of TCP retransmits to zero. I am using below command to modify:
sudo sysctl -w net.ipv4.tcp_syn_retries=0
The above command dont work and gives me below error:
error: "Invalid argument" setting key "net.ipv4.tcp_syn_retries"
However, this command works -> sudo sysctl -w net.ipv4.tcp_syn_retries=1
According to the documentation -> man tcp
:
tcp_syn_retries (integer; default: 5; since Linux 2.2) The maximum number of times initial SYNs for an active TCP connection attempt will be retransmitted. This value should not be higher than 255. The default value is 5, which corresponds to approximately 180 seconds.
Does setting sudo sysctl -w net.ipv4.tcp_syn_retries=0
means disabling syn or syn retries. I am unclear after reading the documentation.