From owner-freebsd-net@FreeBSD.ORG Wed Aug 30 08:00:23 2006 Return-Path: X-Original-To: freebsd-net@freebsd.org Delivered-To: freebsd-net@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 4E83616A4DA for ; Wed, 30 Aug 2006 08:00:23 +0000 (UTC) (envelope-from silby@silby.com) Received: from relay00.pair.com (relay00.pair.com [209.68.5.9]) by mx1.FreeBSD.org (Postfix) with SMTP id 9EFE543D46 for ; Wed, 30 Aug 2006 08:00:22 +0000 (GMT) (envelope-from silby@silby.com) Received: (qmail 83203 invoked from network); 30 Aug 2006 08:00:21 -0000 Received: from unknown (HELO localhost) (unknown) by unknown with SMTP; 30 Aug 2006 08:00:21 -0000 X-pair-Authenticated: 209.68.2.70 Date: Wed, 30 Aug 2006 03:00:54 -0500 (CDT) From: Mike Silbersack To: Chris In-Reply-To: <3aaaa3a0608172143l103dafe0hf4c0fbc8044b0d01@mail.gmail.com> Message-ID: <20060830025222.A86833@odysseus.silby.com> References: <44DD1909.40703@matteworld.com> <20060811203041.E44075@odysseus.silby.com> <3aaaa3a0608172143l103dafe0hf4c0fbc8044b0d01@mail.gmail.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: freebsd-net@freebsd.org Subject: Re: Long keepidle time X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 30 Aug 2006 08:00:23 -0000 On Fri, 18 Aug 2006, Chris wrote: > whats the point of keeping a connection alive (hung) to a dead network > for 2 hours tho? That I dont understand either. > > Chris I used to wonder that myself. From the perspective of minimizing the number of open sockets, it makes sense to kill connections to dead networks as quickly as possible. However, there are other things to consider: 1. Is it TCP's problem to care whether or not the connection is alive? Most applications that open a large number of connections (web servers, etc) are smart enough to notice that the other end of the connection has gone silent and automatically terminate the connection. 2. If your application tries to transmit data to the dead machine, the TCP retransmit timer will cause the connection to be terminated, so there is no need for keepalive to help in that case. 3. In the case of telnet / ssh sessions, you don't want keepalive being too active. When I go to bed, my ssh sessions will be idle for at least 6 hours. If my cable modem provider decides to do maintenance during that time, it would be nice if the ssh sessions survive. If keepalive was checking every 5 minutes, it might needlessly terminate the connection. So, in summary, there are many opinions about keepalives. That's why everything about them is tunable. :) Mike "Silby" Silbersack