From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <96078701111411.tru64-unix-managers.marc@archive.invalid> From: fargo () altavista ! net Date: Thu, 12 Mar 1998 15:20:30 +0000 To: tru64-unix-managers Subject: SUMM: TIME_WAIT state on sockets X-MARC-Message: https://marc.info/?l=tru64-unix-managers&m=96078701111411 Many thanks to: Berry Kercheval Steve VanDevender Also received a message from mogul@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