• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 486
  • Last Modified:

tcp/ip keepalive

Can someone explain how tcp/ip keepalives work for an application and the os?
Do you know what the following values are
[test@testbox ipv4]$ cat tcp_retries1
3
[test@testbox ipv4]$ cat tcp_retries2
15
Are there any values worthwhile increasing to get around these tcp/ip timeouts?
What is the effect of increasing the default tcp_keepalive timeout from the default vallue of 7200?

0
lolaferrari
Asked:
lolaferrari
  • 2
2 Solutions
 
farzanjCommented:
Both of these are kernel parameters to set the following:
tcp_retries1:
The tcp_retries1 variable tells the kernel how many times it should retry to get to a host beforereaching a decision that something is wrong and that it should report the suspected problem tothe network layer.

tcp_retries2:
The tcp_retries2 value tells the kernel how many times to retry before killing an alive TCPconnection.
0
 
gheistCommented:
http://www.cymru.com/Documents/ip-stack-tuning.html

Normally you should not touch keepalive parameters (connections are in CLOSE_WAIT for 2 days, and you should fix the other end unless that is IE from the internet). Retries are not keepalives. Parameters you mention will help on lossy links, namely having 50% loss on the wire.
0
 
gheistCommented:
There is some practical use for intense keepalives. (sysctl -a | grep keep) for more info on what to write into /etc/sysctl.conf  - they can trick broken firewall which drops (ftp) connection into thinking it is alive, but sometimes it is not enough.. But normally you would first try to fix that broke firewall.
0

Featured Post

A Cyber Security RX to Protect Your Organization

Join us on December 13th for a webinar to learn how medical providers can defend against malware with a cyber security "Rx" that supports a healthy technology adoption plan for every healthcare organization.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now