From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <96078609810389.tru64-unix-managers.marc@archive.invalid> From: "Sawyer Curtis" Date: Fri, 14 Mar 1997 07:51:00 +0000 To: tru64-unix-managers Subject: SUMMARY: TCP CLOSE_WAIT Adjustment, how? X-MARC-Message: https://marc.info/?l=tru64-unix-managers&m=96078609810389 My original question was: > I need to adjust the time that a TCP CLOSE_WAIT state will hang > around. Under Solaris, I would use the following command to reconfigure > the time-out value to 1 minute: > > ndd -set /dev/tcp tcp_close_wait_interval 60000 > > How would I do this under Digital UNIX 3.2c? (Before you tell me to > RTFM, I am 7 miles from the building with the system and its > documentation, and I do not have quick access to an X terminal with which > to read man pages.) My thanks to all the help provided by Dejan Muhamedagic. The answer, as provided by Dejan and quoted below, appears to be: According to books, there are two timers concerning closing the connection. One is 2MSL (2 mean segment life) used after the connection is closed and FIN_WAIT_2 (tcp_maxidle) timer used if final FIN segment does not arrive. The first one is usually set to 60 secs and for that time a socket pair cannot be used for the next connection. However, socket on your side can be reused if SO_REUSEADDR socket option is set. ... According to a TCP state transition diagram, the CLOSE_WAIT state is the one server is found in after receiving FIN segment from the client. Then, the server should send FIN too and close the connection. The application controlling the connection at the server side should issue a close system call. ... RFC states that the connections should remain in CLOSE_WAIT and FIN_WAIT2 states forever, but this is violated in most implementations. This situation is also known as "tcp half-close", i.e. only one side has closed the connection but data can still flow in the other direction. The fix is: It seems that you'll have to use dbx to change these params. Like this: cat <