Subject: Re: Why do some network connections get stuck forever?
To: None <tech-net@NetBSD.org>
From: Steven M. Bellovin <smb@cs.columbia.edu>
List: tech-net
Date: 10/25/2005 18:06:33
In message <m1EUVmu-000gd3C@most.weird.com>, "Greg A. Woods" writes:
>--Multipart_Tue_Oct_25_16:52:46_2005-1
>Content-Type: text/plain; charset=US-ASCII
>
>At Mon, 24 Oct 2005 19:46:33 -0400,
>Steven M. Bellovin wrote:
>> 
>> In message <djjlgd$iu8$1@serpens.de>, Michael van Elst writes:
>> >woods@weird.com ("Greg A. Woods") writes:
>> >
>> >>Why do some network connections get stuck forever?
>> >
>> >I would guess that this is a feature of TCP.
>>
>> In particular, if you don't have keep-alives enabled that behavior is 
>> in fact correct.
>
>Indeed.
>
>I'm not sure that these connections do have keep-alives enabled, and now
>I'm guessing that they don't, especially since I can't find any use of
>SO_KEEPALIVE in the source.  :-)
>

You have a lot of good questions to which I have no answers, save a 
partial answer to this one...  At least on 2.0 (I have no older 
machines),

	sysctl -a|fgrep .tcp.keep

will display several variables related to TCP keepalives:

	net.inet.tcp.keepidle = 14400
	net.inet.tcp.keepintvl = 150
	net.inet.tcp.keepcnt = 8

These are the settings on a 3.99.9 machine.

		--Steven M. Bellovin, http://www.cs.columbia.edu/~smb