What is tcp_keepalive_probes ?


the number of unacknowledged probes to send before considering the connection
dead and notifying the application layer

source : www.tldp.org
$cat /proc/sys/net/ipv4/tcp_keepalive_probes

trunk/os/ip/tcp.c - 7 identical
  2436:   /* Compute usable segment based on offered window and limit
  2437:    * window probes to one
  2438:    */
  3064:           return tcphangup(c);
  30100:   if(n >= 1 && strcmp(f[0], "keepalive") == 0)
  3066:           return tcpstartka(c, f, n);
inferno-os.googlecode.com/svn - MIT - C

Taken from Research Paper.

TCP Keep-alives

The TCP speci?cation does not include a mecha-
nism for probing idle connections. In theory, if a host
crashes after establishing a connection to another host,
the second machine will continue to hold the idle con-
nection forever. Some TCP implementations include a
mechanism that tests an idle connection and releases it
if the remote host has crashed. Called TCP keep-alive,
the mechanism periodically sends a probe segment to
elicit response from the peer. If the peer responds to
the probe by sending an ACK, the connection is alive.
If the peer TCP fails to respond to probe segments for
longer than a ?xed threshold,the connection is declared
down and the connection is closed.

Probing TCP Implementations