1834346 Members
2097 Online
110066 Solutions
New Discussion

Re: TCP time-out

 
gareth douglas
Occasional Contributor

TCP time-out


Hi ALL,
I've been asked to sort out a couple of problems with a HP-UX 11 box. One is a time-out error when connected via TCP. Connection seems to time out after 20 mins (using telnet), ie if a user kicks off a report remotely and there is no communication between their PC and the HP box for 20 mins while report is being compiled, the HP box closes connection.
OK I know it may be a router config issue but I thought I'd try the box first.
Anyone know how to change TCP parameters?
Cheers,
Gareth
How a ye?
6 REPLIES 6
Santosh Nair_1
Honored Contributor

Re: TCP time-out

The machine shouldn't log the user out unless you have something like the environment variable TMOUT set. You can use the ndd command to check the tcp settings...but not really sure which setting you'd be looking for. Try:

ndd -get /dev/ip ?
ndd -get /dev/tcp ?

to get a full listing of tcp and IP settings. Hope this helps.

-Santosh
Life is what's happening while you're busy making other plans
David Lodge
Trusted Contributor

Re: TCP time-out

Does this happen constantly?

There are a couple of things that can cause TCP to go for long waits, but generally it is either a resolving issue (ie check DNS)

Or, most likely, a routing issue - if you have a network card configured, but not connected with a route first in the routing table then all packets will attempt to go down there before timeing out and using a different route.

HTH

dave
Christopher Caldwell
Honored Contributor

Re: TCP time-out

Are your users going through a firewall - if so, look there. Firewalls can be configured to time users out after a certain interval.
Christopher McCray_1
Honored Contributor

Re: TCP time-out

you can run the following to get supported/unsupported commands for tcp and ip:

#ndd -h supported
#ndd -h unsupported

which displays examples of network parameters you can set with -set

#ndd -set value

and as Santosh said, use -get to display the current value.
It wasn't me!!!!
James R. Ferguson
Acclaimed Contributor

Re: TCP time-out

Hi Gareth:

One other possibility would fit this. If the TMOUT environmental variable is non-zero and for instance, you initiated a background process, then the shell would terminate if a command wasn't entered within $TMOUT seconds from the last PS1 prompt. Would this fit your situation?

Regards!

...JRF...
Stefan Farrelly
Honored Contributor

Re: TCP time-out

Heres an HP document on how to do this;

KBRC00006395
How To adjust the TCP timeouts on 11.X HP-UX?
Document Information Table
How To adjust the TCP timeouts on 11.X HP-UX? DocId: KBRC00006395 Updated:
4/4/01 4:37:00 AM

PROBLEM
How to shorten the time it takes for an application to be notified
that a TCP connection has timed out or that new connection cannot be made.

Is it possible to change the time it takes for TCP to give up when trying to
send data?

Is it possible to change how long it takes TCP to give up when trying to
make a
new connection?

RESOLUTION
The ndd command allows you to adjust both of these TCP timeouts on 11.X.

The relevent ndd tunables are:
see man ndd for more details
# /usr/bin/ndd -h tcp_ip_abort_interval

tcp_ip_abort_interval:

Second threshold timer for established connections.

When it must retransmit packets because a timer has expired,
TCP first compares the total time it has waited against two
thresholds, as described in RFC?1122, 4.2.3.5. If it has waited
longer than the second threshold, TCP terminates the connection.
[500,-] Default: 600000 (10 minutes)

# /usr/bin/ndd -h tcp_ip_abort_cinterval

tcp_ip_abort_cinterval:

Second threshold timer during connection establishment.

When it must retransmit the SYN packet because a timer has
expired, TCP first compares the total time it has waited
against two thresholds, as described in RFC?1122, 4.2.3.5.
If it has waited longer than the second threshold, TCP
terminates the connection. [1000,-]
Default: 75000 (75 seconds)

To set them use:

/usr/bin/ndd -set /dev/tcp tcp_ip_abort_interval 120000
/usr/bin/ndd -set /dev/tcp tcp_ip_abort_cinterval 25000


This will only impact connections made AFTER the change. It will not imapct
existing connections. To make the changes take place at boot edit:

/etc/rc.config.d/nddconf

This would look similar to:

TRANSPORT_NAME[0]=tcp
NDD_NAME[0]=tcp_ip_abort_interval
NDD_VALUE[0]=120000

TRANSPORT_NAME[1]=tcp
NDD_NAME[1]=tcp_ip_abort_cinterval
NDD_VALUE[1]=25000

BEWARE that setting these values too low may cause TCP to fail
to deliver data, or make new connections due to a busy or slow
network when it might succeed, given a bit more time. If you
experience connection problems, try restoring the settings to
their default values which should be optimal in most cases.
Im from Palmerston North, New Zealand, but somehow ended up in London...