By default, if a SYN packet is not responded within one second, linux sends another one under the assumption that the first one was dropped somewhere. Then another after two more seconds, then four, up to some limit.
How do I change the base from 1s to something higher, like 10s?
Reason
I have a high latency, low bandwidth (note: low bandwidth. This is not the classic bandwidth-delay product question). Since the channel is high latency under some configurations I'm not expecting an answer in less than a second. Since it's low bandwidth resending the SYN needlessly consumes precious bandwidth.
Specifically this is LoRa, and it can take over 5 seconds to transmit the SYN packet (depending on channel settings, which in turn depend on range, etc…). That means if I sent another one I'm holding the transmitter open for 5 seconds extra, and will quite possibly not even hear that the other end is replying, leading to even more retransmits.
What I've tried
iproute
I thought that I would be able to change this just like you can change the cwnd:
ip route change default via x.x.x.x initcwnd 20 initrwnd 20
So I changed rtt
, rttvar
, and rto_min
, to be much higher, but they had zero effect on the retransmission.
setsockopt / ioctl
I've not found any appropriate sockopt, but even if I did that would mean change to application code, right?
sysctl
Same here: Not only have I not found a setting, but also ideally this should not be system wide, since a node may have a normal internet connection too.
ip r change 192.0.2.2/32 dev lora0 rtt 20s rto_min 20s rttvar 5s
, and it comes back when listing asrtt 20s rttvar 5s rto_min lock 20s