Well, how does one workaround this issue? Setting the keep alive probe down to 50 seconds and then resending it every 10 seconds seems to do the trick for me. I also tweaked the TCP settings so that if no ACK response is received for 5 consecutive times, the connection is marked as broken. Here's the quick one-liner fix:
sudo sysctl -w net.ipv4.tcp_keepalive_time=50 \
net.ipv4.tcp_keepalive_intvl=10 \
net.ipv4.tcp_keepalive_probes=5
Of course, to make these settings persistent across reboots, add them to /etc/sysctl.conf
I'm not sure if these settings are "optimal", but they do the trick. You're mileage may vary.
Do what I did, plug your old router into the eth port beside the coax cable and flick the hub over to modem only mode no more issues with unreliability fixed, I think popey had to do the same thing so he could use his sip phone.
ReplyDeleteMy older router had different "reliability" issues and also I don't really want to have another piece of old legacy kit running - I'm trying to save power :-)
DeleteI've had exactly the same problem and ended up adding
ReplyDeleteClientAliveInterval 60
to the sshd config files on the servers I ssh into. But your solution seems better.