From owner-freebsd-hackers Tue Sep 21 18:31:40 1999 Delivered-To: freebsd-hackers@freebsd.org Received: from smtp6.mindspring.com (smtp6.mindspring.com [207.69.200.74]) by hub.freebsd.org (Postfix) with ESMTP id 991DA154C6 for ; Tue, 21 Sep 1999 18:31:37 -0700 (PDT) (envelope-from brdean@mindspring.com) Received: from vger.foo.com (user-2ivf2f7.dialup.mindspring.com [165.247.137.231]) by smtp6.mindspring.com (8.8.5/8.8.5) with ESMTP id VAA20874; Tue, 21 Sep 1999 21:31:50 -0400 (EDT) Received: (from bsd@localhost) by vger.foo.com (8.9.3/8.9.3) id VAA04990; Tue, 21 Sep 1999 21:30:35 -0400 (EDT) (envelope-from bsd) From: Brian Dean Message-Id: <199909220130.VAA04990@vger.foo.com> Subject: Re: how to shut down a TCP connection In-Reply-To: <199909220027.RAA09627@apollo.backplane.com> from Matthew Dillon at "Sep 21, 1999 05:27:16 pm" To: Matthew Dillon Date: Tue, 21 Sep 1999 21:30:35 -0400 (EDT) Cc: freebsd-hackers@freebsd.org X-Mailer: ELM [version 2.4ME+ PL61 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG > :Does anyone know how I can manually shutdown the above connection on > :'vger' short of waiting a really long time or rebooting? > : > :Thanks, > :-Brian > :-- > :Brian Dean brdean@mindspring.com > > Turn on keepalives and set the parameters really low so the connection > times out after a couple of minutes. Experiment. Remember that the > below will effect all your TCP connections, so don't make the timeout > too low. > > sysctl -w net.inet.tcp.always_keepalive=1 > sysctl -w net.inet.tcp.keepintvl=60 > sysctl -w net.inet.tcp.keepinit=60 > sysctl -w net.inet.tcp.keepidle=300 > > If the FreeBSD side is still in the ESTABLISHED state, it is not > getting a FIN or not getting a proper FIN. > > -Matt > Matthew Dillon > The above settings did some odd things to my existing connections but I get the idea. I think the values for some of those parameters are expected in milliseconds, but I think you intended seconds. I will adjust them accordingly and experiment as needed. Thanks for the idea. Too bad we don't have a command, though, that would do something like: inetadm shutdown tcp:5000 which would initiate a shutdown of tcp port 5000. I know ... patches :) Thanks again, -Brian -- Brian Dean brdean@mindspring.com To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message