Operating System - HP-UX
1833294 Members
3170 Online
110051 Solutions
New Discussion

Re: How to Disconnect idle remote client

 
Ferdie Banu
Occasional Contributor

How to Disconnect idle remote client

a)I would like to know how will i disconnect an idle remote user connected via tcp/ip?
b)Will it solve if i'm going to use?
c)Where and how to configure socket keepalive in HPUX?

Thanks in advance

Ferdie Banu
4 REPLIES 4
Lee Tae-kyung
Regular Advisor

Re: How to Disconnect idle remote client

Hi Ferdie,

a) You can do it to do the next command.
For example)
#ndd -get /dev/tcp tcp_status
#ndd -set /dev/tcp tcp_discon 0x010203404

b) skip

c) #ndd -h | grep keep
tcp_keepalive_detached_interval - Send Keepalive probes for detached TCP
tcp_keepalive_interval - Interval for sending keepalive probes
tcp_keepalives_kill - Types of keep-alive probe to use

This command will show the tcp parameters relating to keepalive.

I hope it help you..

Good day~~

Tae Kyung Lee
From Korea

I think I am a specialist in IT Korea^^. I am a programmer and SE and DBA
Ferdie Banu
Occasional Contributor

Re: How to Disconnect idle remote client

I would like to clarify #2 question,

b)Will it solve if i'm going to use socket keepalive?
Lee Tae-kyung
Regular Advisor

Re: How to Disconnect idle remote client

Hi Ferdie,
Refer to this document..
I think it help you.

Taekyung Lee,
From Korea.

- Refer to this -
My application program is causing a large number of sockets to
stay closed in the TIME_WAIT state.

How can I shorten the time a socket stays in this state?

Configuration Info

Operating System - HP-UX
Version - 11.0
Hardware System - HP9000
Series - K370

Solution

You can control it with ndd -h tcp_time_wait_interval.

Definition of tcp_time_wait_interval:

Amount of time TCP endpoints persist in TCPS_TIME_WAIT state.
[1000,600000] Default: 60000 (60 seconds)

Note: This capability is only available in HP-UX 10.30 and greater.

Look at the value with this command:

ndd -get /dev/tcp tcp_time_wait_interval
60000

Set the value with this command:

ndd -set /dev/tcp tcp_time_wait_interval xxxxx

where xxxxx is the desired number of milliseconds. This setting
does not persist across a root, so will need to be added to a startup
script.

Important: Be careful with the tcp_time_wait_interval setting
for the reason described below.

This timer is in place and is part of the TCP Protocol Specification
to prevent a particular problem. A TCP connection is made unique by
these four numbers:

local IP + local TCP port + remote IP + remote TCP port

If a packet is sent out into the network with these four numbers and
the user then tears down the connection and REUSES the same 4-tupple
for a NEW connection, then when the packet from the old connection comes
in off the wire, it will overwrite the new connection. Thus, we have the
TIME_WAIT state to prevent old connection numbers from being reused
before all data is 'flushed' off the network.

I think I am a specialist in IT Korea^^. I am a programmer and SE and DBA
T G Manikandan
Honored Contributor

Re: How to Disconnect idle remote client