[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[SLUG] TCP keepalives



I have a problem where a remote telnet client gets turned off for some
reason, stupid user, lost telco connection, power outage, but the server
end doesn't know about it and so netstat still shows the connection as
ESTABLISHED.

I have looked around at keepalives and found some interesting parameters
in /proc/sys/net/ipv4:
/proc/sys/net/ipv4/tcp_keepalive_probes
/proc/sys/net/ipv4/tcp_keepalive_time
/proc/sys/net/ipv4/tcp_max_ka_probes                                                            

The default values are respectively 9, 7200, 5 which I read as being 5
probes sent every 2 hours, and when a total of 9 cycles has received no
response then the connection is determined to be down.

This means that it could take up to 18 hours to identify the loss of
connection.

I have changed the values to 5, 60, 5 so that a broken connection gets
noticed within 5 minutes.

I wonder if this is working though because the offending connections have
not gone down.

I would like to ask the kernel geeks out there these questions:

Do these existing connections use the values that existed when the
connection was established, and any new connections will have the new
values?

Does the setting of these values activate keepalives, or is there some
other boolean flag that I need to set in addition?

What are the implications of changing these values, apart from the
obvious?  Most long time connections to this server are telnet, imap or
ssh.

Am I on the correct track or did I miss a turning somewhere?

-- 
Howard.
______________________________________________________
LANNet Computing Associates <http://www.lannet.com.au>

--
SLUG - Sydney Linux Users Group Mailing List - http://www.slug.org.au
To unsubscribe send email to slug-request@nospam.slug.org.au with
unsubscribe in the text