Date: Tue, 21 Sep 1999 21:30:35 -0400 (EDT) From: Brian Dean <brdean@mindspring.com> To: Matthew Dillon <dillon@apollo.backplane.com> Cc: freebsd-hackers@freebsd.org Subject: Re: how to shut down a TCP connection Message-ID: <199909220130.VAA04990@vger.foo.com> In-Reply-To: <199909220027.RAA09627@apollo.backplane.com> from Matthew Dillon at "Sep 21, 1999 05:27:16 pm"
next in thread | previous in thread | raw e-mail | index | archive | help
> :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 > <dillon@backplane.com> 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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199909220130.VAA04990>