From owner-freebsd-net Tue Jul 10 10:12:24 2001 Delivered-To: freebsd-net@freebsd.org Received: from khavrinen.lcs.mit.edu (khavrinen.lcs.mit.edu [18.24.4.193]) by hub.freebsd.org (Postfix) with ESMTP id 61E1037B403 for ; Tue, 10 Jul 2001 10:12:20 -0700 (PDT) (envelope-from wollman@khavrinen.lcs.mit.edu) Received: (from wollman@localhost) by khavrinen.lcs.mit.edu (8.11.4/8.11.4) id f6AHC7503088; Tue, 10 Jul 2001 13:12:07 -0400 (EDT) (envelope-from wollman) Date: Tue, 10 Jul 2001 13:12:07 -0400 (EDT) From: Garrett Wollman Message-Id: <200107101712.f6AHC7503088@khavrinen.lcs.mit.edu> To: Richard Smith Cc: net@FreeBSD.ORG Subject: sysctls keepidle and keepintvl In-Reply-To: <20010709230512.A918@gaia.home.rdls.net> References: <20010709230512.A918@gaia.home.rdls.net> 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 < 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. 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. -GAWollman To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-net" in the body of the message