(E-Mail Removed) wrote:
> Hello,
>
> I changed the value of tcp_fin_timeout to 30 by issuing the command:
>
> echo 30 > /proc/sys/net/ipv4/tcp_fin_timeout
>
> I then restarted the network (it's a RH 9 system) with :
>
> service network restart
>
> I check the value in /proc/sys/net/ipv4/tcp_fin_timeout and it
contains
> 30.
>
> I then tried to measure this by issuing "netstat -a" commands and
> watching how long a connection remains in "TIME_WAIT". It looks like
> they still remain in "TIME_WAIT" for ~ 60 seconds.
>
> Is this a valid way of *measuing* the timeout value? Or are there
> other factors beyond the tcp_fin_timeout that would affect the amount
> of time that port is unavailable.
These settings/values are related but depend on which end issues the
first FIN.
CLOSE_WAIT
TCP; remote endpoint has shut down; the kernel is waiting for the
application [on out end] to close the socket
TIME_WAIT
TCP; socket is waiting after closing for any packets left on the
network [since IP is not reliable and TCP is meant to "correct" that in
case there are other/out of order packets]
FIN_WAIT2
TCP; the connection has been closed [by _us_, not the remote end]; our
socket is waiting for the remote endpoint to shut down
Ie., lower FIN_WAIT2 value shortens time we wait for the remote end to
acknowledge and close its end before we go ahead and release resources.
http://linux-ip.net/html/tools-netst...-socket-states
This link is generally useful together with lartc howto.
hth,
prg
email above disabled