1834156 Members
2842 Online
110064 Solutions
New Discussion

tcp/ip timeout

 
SOLVED
Go to solution
Shivkumar
Super Advisor

tcp/ip timeout

Hi,

How do i know that sockets has been closed due to TCP time out and also interested to know the
TCP time out of the system ?

Thanks,
Shiv
5 REPLIES 5
Jeff Schussele
Honored Contributor
Solution

Re: tcp/ip timeout

Hi Shiv,

Use ndd to see these:

ndd -get /dev/ip|tcp xxxxxxxx
where xxxxxxx=:

ip_def_ttl
ip_fragment_timeout
tcp_ip_ttl
tcp_keep_alive_interval
tcp_rexmit_interval_initial
tcp_rexmit_interval_max
tcp_time_wait_interval

HTH,
Jeff
PERSEVERANCE -- Remember, whatever does not kill you only makes you stronger!
Steven E. Protter
Exalted Contributor

Re: tcp/ip timeout

Shalom Shiv,

On Linux Systems I've altered this timeout to speed cluster failover:
tcp_keep_alive_interval

We've changed it to 15 without negative results. The default should be 60.

I suggest thorough testing however to avoid negative results.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
rick jones
Honored Contributor

Re: tcp/ip timeout

To see the number of TCP connections that have been dropped (and presumably then the number of sockets closed) after "timeouts" (there are a few different timeouts) you would look at the netstat statistics:

netstat -p tcp

There are a number of timeout parameters specified already, you can also look at:

ftp://ftp.cup.hp.com/dist/networking/briefs/annotated_ndd.txt

As for setting the tcp_keepalive_interval down to as low as 15 seconds, whether that is "OK" or not depends entirely on how many TCP connections one has and how "active" they are. If they on their own send packets less often than once every 15 seconds, you will have more PPS for keepalive than for "real work"

I would have expected software doing failover to have had some higher-level heartbeat mechanism that could be configured rather than depending on tcp_keepalive_interval et al.
there is no rest for the wicked yet the virtuous have no pillows
Raj D.
Honored Contributor

Re: tcp/ip timeout

Hi Shiv ,

The recomended value is 60,

You can do it with


# ndd -set /dev/tcp tcp_time_wait_interval 60000

# to check established connections use:
# netstat -an | grep EST

cheers,
Raj.
" If u think u can , If u think u cannot , - You are always Right . "
Raj D.
Honored Contributor

Re: tcp/ip timeout

Shiv (again),

You can Check this good document for tcp/ip stack hardening:

http://www.cromwell-intl.com/SECURITY/security-stack-hardening.html


Cheers,
Raj.
" If u think u can , If u think u cannot , - You are always Right . "