From owner-freebsd-net Tue Jul 10 11: 9:35 2001 Delivered-To: freebsd-net@freebsd.org Received: from mail17.messagelabs.com (mail17.messagelabs.com [62.231.131.67]) by hub.freebsd.org (Postfix) with SMTP id 480C537B405 for ; Tue, 10 Jul 2001 11:09:29 -0700 (PDT) (envelope-from rdls@satamatics.com) X-VirusChecked: Checked Received: (qmail 27060 invoked from network); 10 Jul 2001 17:58:21 -0000 Received: from smtp-5.star.net.uk (212.125.75.74) by server-8.tower-17.messagelabs.com with SMTP; 10 Jul 2001 17:58:21 -0000 Received: (qmail 10968 invoked from network); 10 Jul 2001 18:09:27 -0000 Received: from unallocated.star.net.uk (HELO dns.hq.satamatics.net) (62.231.144.3) by smtp-5.star.net.uk with SMTP; 10 Jul 2001 18:09:27 -0000 Received: from matrix.satamatics.net (matrix.satamatics.net [10.24.1.1]) by dns.hq.satamatics.net (8.11.3/8.11.3) with ESMTP id f6AJC9E37167 for ; Tue, 10 Jul 2001 19:12:09 GMT (envelope-from rdls@satamatics.com) Subject: RE: sysctls keepidle and keepintvl Date: Tue, 10 Jul 2001 19:06:31 +0100 Message-ID: <703AB71471B6024CB86D219058DB64FB02E143@matrix.satamatics.net> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: sysctls keepidle and keepintvl X-MimeOLE: Produced By Microsoft Exchange V6.0.4417.0 Thread-Index: AcEJYxkh6RLcEV53TNuxoynD3z2JBQABrliw content-class: urn:content-classes:message From: "Richard Smith" To: "Garrett Wollman" Cc: Sender: owner-freebsd-net@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org > -----Original Message----- > From: Garrett Wollman [mailto:wollman@khavrinen.lcs.mit.edu] > Sent: 10 July 2001 18:12 > To: Richard Smith > Cc: net@FreeBSD.ORG > Subject: sysctls keepidle and keepintvl >=20 >=20 > < said: >=20 > > Looking at the comments in tcp_var.h, it should be=20 > > keepintvl that sets this interval. Otherwise, why > > have such a large value for keepidle? >=20 > 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: >=20 > - If the connection is idle for more than `keepidle', then we always > send a keepalive (unless this behavior is disabled). >=20 > - 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 majordomo@FreeBSD.org with "unsubscribe freebsd-net" in the body of the message