1833166 Members
3425 Online
110051 Solutions
New Discussion

TCP KeepAlive

 
SOLVED
Go to solution
Chuck Lackey
Advisor

TCP KeepAlive

OK, Folks. Here's a new one.

Our consultants have been told by a hardware input device vendor that in order to solve a problem, we need to TURN OFF KeepAlive packets from our HP server.

I have found all kinds of info on tuning the parameters that effect KeepAlive, but have not found if those tunings support turning the packets off completely, i.e. is

ndd -set /dev/tcp tcp_keepalive_interval 0

or something like this valid?

Many Thanks,

Chuck Lackey
5 REPLIES 5
steven Burgess_2
Honored Contributor

Re: TCP KeepAlive

Hi

Have a look at this doc for ndd settings

http://www2.itrc.hp.com/service/cki/docDisplay.do?docLocale=en_US&docId=200000063236682

HTH

Steve
take your time and think things through
Kellogg Unix Team
Trusted Contributor

Re: TCP KeepAlive

Hello,

You might want to go back to vendor and ask what he means by 'turning off' this parameter. Does he want the system to keep the channel open indefinitely or its something else?

I found a good doc about it on ITRC -
http://www2.itrc.hp.com/service/cki/docDisplay.do?docLocale=en_US&docId=200000063236682

...Manjeet
work is fun ! (my manager is standing behind me!!)
Chuck Lackey
Advisor

Re: TCP KeepAlive

Yep. Saw that.

What I don't know is if the number in brackets are the minimum - maximum values for each parameter. If so, this seems to suggest that ndd cannot turn it off (10000 minimum).

What they are trying to accomplish is to keep the connection open indefinitely and stop all KeepAlive packets completely. Apparently the RF device in question does not answer them and the connection terminates.

Thanks...
Ron Kinner
Honored Contributor

Re: TCP KeepAlive

The numbers in the brackets are the min and max. If you set it to the maximum, which is 10 days, that would be pretty close to turning it off.

There is another ndd parameter:

tcp_keepalives_kill - Types of keep-alive probe to use

but it is not documented and not supported at least on my version of 11.0 and I'm not sure what it does.

From Sybase:

http://www.isug.com/Sybase_FAQ/ASE/Section10/5/Q10.5.8.html

HP-UX 11.0

*Parameter wait time before probing the connection:tcp_time_wait_interval

*Parameter interval between probes: tcp_keepalive_interval

*Parameter maximum time or tries to probe connection before dropping:
tcp_keepalives_kill

*Unit of measure: milliseconds

The first one can only be set to a max of 10 minutes if I counted up the zeroes correctly.

Ron
rick jones
Honored Contributor
Solution

Re: TCP KeepAlive

Sounds like a pretty lame device if it cannot deal with TCP keepalives. They have been around for years. Just what do TCP keepalives do to this hardware input device? Or does it ignore them?

There is no global on/off switch for keepalives. TCP keepalives are enabled/disabled on an application by application basis when those apps call setsockopt() with SO_KEEPALIVE.

If an application calls setsockopt(SO_KEEPALIVE) then the ndd keepalive settings are used to control the timing and behaviour of the keepalive messages.

(The one exception to this would be the tcp_keepalive_detached_interval, which is enabled automagically once a TCP connection enters a "detatched" (no socket/process) state - typically this would be a TCP endpoint in the FIN_WAIT_2 state)

It is intriguing that Sybase would be calling-out unsupported ndd settings :) in a nutshell the tcp_keepalives_kill only controls whether or not lack of response to a keepalive probe(s) will cause the connection to be killed. It should probably only be used under the close personal supervision of HP Support Persons.

So, one can stop keepalives on established connections by not having the application enable them in the first place.
there is no rest for the wicked yet the virtuous have no pillows