SUMM: TIME_WAIT state on sockets

From: <fargo_at_altavista.net>
Date: Thu, 12 Mar 1998 10:20:30 -0500 (EST)

Many thanks to:

Berry Kercheval
Steve VanDevender

Also received a message from mogul_at_actitis.pa.dec.com, but only with the words "In article" on it.

As both, Berry and Steve menctioned so interestant things, I decided to include their complete messages:

===========================================

It means the TCP connection is in the TIME_WAIT state. See any TCP protocol
description. I recommend Stevens' "TCP/IP Illustrated". Volume
1, page 241
shows the state. Basically, it means the socket has sent FIN to its peer,
received an ACK and FIN from the peer, ACKed the FIN and will now wait 2
maximum segment lifetimes (RFC793 says MSL is 2 min; common values used are
30
sec to 2 min) before the port can be reused. This allows any packets still
floating around the network to die before the connection is completely
terminated.

If the number of sockets sitting in TIME_WAIT is a problem, you can specify
the socket option SO_REUSEADDR to bypass the 2MSL wait.

  --berry

============================

It means a socket has been closed and is in a mandatory waiting
period (typically about two minutes) before it is completely
destroyed. The waiting period helps reduce the possibility that
a newly-created socket will receive delayed packets that were
originally intended for the previous instance of that socket.

For more information, I suggest consulting a copy of _TCP/IP
Illustrated, Volume I: The Protocols_ by W. Richard Stevens.
=======================================


Thanks for your wisdom
FaRgO
Received on Thu Mar 12 1998 - 16:25:07 NZDT

This archive was generated by hypermail 2.4.0 : Wed Nov 08 2023 - 11:53:37 NZDT