> -----Original Message-----
> From: Garrett Wollman [mailto:[EMAIL PROTECTED]]
> Sent: 10 July 2001 18:12
> To: Richard Smith
> Cc: [EMAIL PROTECTED]
> Subject: sysctls keepidle and keepintvl
> 
> 
> <<On Mon, 9 Jul 2001 23:05:13 +0100, Richard Smith 
> <[EMAIL PROTECTED]> said:
> 
> > Looking at the comments in tcp_var.h, it should be 
> > keepintvl that sets this interval. Otherwise, why
> > have such a large value for keepidle?
> 
> FreeBSD contains a kluge wherein all TCP connections have a form of
> keepalive enabled by default.  This is supposed to be separate from
> the explicitly-requested SO_KEEPALIVE, but it's possible that
> something got broken along the way.  I think the intended behavior is
> as follows:
> 
> - If the connection is idle for more than `keepidle', then we always
> send a keepalive (unless this behavior is disabled).
> 
> - If SO_KEEPALIVE has been enabled on the socket, then send a
> keepalive every `keepintvl' of idle time.

Answering my own question almost: The SO_KEEPALIVE and the sysctl
net.inet.tcp.always_keepalive are logically ORed. The keepalive
is sent after 'keepidle' and thereafter at 'keepintvl' intervals
unless a response is received, in which case it goes back to
using 'keepidle'.

> The reason `keepidle' is so long is that it was a compromise between
> one group which wanted keepalives at very long intervals so that one
> could temporarily disconnect -- or even suspend -- one's system
> without getting all of one's connections killed, and another group
> which wanted short intervals to quickly flush broken connections
> resulting from unclean shutdown of Windows clients.

I understand, but 2 hours ??? :-)

Anyway, I have added my own value of 240s to sysctl.conf which is
sufficiently below the 300s value of net.inet.ip.fw.dyn_ack_lifetime
to serve my purposes.

Thanks,
Rich.

_____________________________________________________________________
This message has been checked for all known viruses by Star Internet
delivered through the MessageLabs Virus Scanning Service. For further
information visit http://www.star.net.uk/stats.asp or alternatively call
Star Internet for details on the Virus Scanning Service.

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-net" in the body of the message

Reply via email to