From owner-freebsd-net@FreeBSD.ORG Tue Mar 16 23:40:00 2004 Return-Path: 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 8DC8E16A4CE for ; Tue, 16 Mar 2004 23:40:00 -0800 (PST) Received: from sccrmhc12.comcast.net (sccrmhc12.comcast.net [204.127.202.56]) by mx1.FreeBSD.org (Postfix) with ESMTP id 01EE743D2D for ; Tue, 16 Mar 2004 23:40:00 -0800 (PST) (envelope-from cristjc@comcast.net) Received: from blossom.cjclark.org (c-67-169-127-171.client.comcast.net[67.169.127.171]) by comcast.net (sccrmhc12) with ESMTP id <2004031707395801200n7qeme>; Wed, 17 Mar 2004 07:39:58 +0000 Received: from blossom.cjclark.org (localhost. [127.0.0.1]) by blossom.cjclark.org (8.12.9p2/8.12.8) with ESMTP id i2H7du0m052803; Tue, 16 Mar 2004 23:39:57 -0800 (PST) (envelope-from cristjc@comcast.net) Received: (from cjc@localhost) by blossom.cjclark.org (8.12.9p2/8.12.9/Submit) id i2H7dueJ052802; Tue, 16 Mar 2004 23:39:56 -0800 (PST) (envelope-from cristjc@comcast.net) X-Authentication-Warning: blossom.cjclark.org: cjc set sender to cristjc@comcast.net using -f Date: Tue, 16 Mar 2004 23:39:56 -0800 From: "Crist J. Clark" To: Zherdev Anatoly Message-ID: <20040317073956.GA52536@blossom.cjclark.org> References: <20040316125335.5f64cac5@dwarf.demos.su> <20040317000611.GA51156@blossom.cjclark.org> <20040317101453.5fcdaa82@dwarf.demos.su> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20040317101453.5fcdaa82@dwarf.demos.su> User-Agent: Mutt/1.4.1i X-URL: http://people.freebsd.org/~cjc/ cc: freebsd-net@freebsd.org cc: cristjc@comcast.net Subject: Re: Problem with closing tcp session between cisco and freebsd X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: cjclark@alum.mit.edu List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Mar 2004 07:40:00 -0000 On Wed, Mar 17, 2004 at 10:14:53AM +0300, Zherdev Anatoly wrote: > On Tue, 16 Mar 2004 16:06:11 -0800 > "Crist J. Clark" wrote: > > > [Skip...] > ^ > > The zero window-size tells me the TCP buffer on the FreeBSD side is > > full. The Cisco is trying to send that last byte of data and the FIN, > > but the FreeBSD side cannot accept it since the buffer is full. This > > usually means the application on the FreeBSD side is not reading the > > data out of the socket. > > > > What's the 'netstat -an' for this connection on the FreeBSD side? > > There is netstat -an for this session > > tcp4 57352 0 FREEBSD.513 CISCO.990 ESTABLISHED ^^^^^ This is the Recv-Q. That value wouldn't happen to coincide with the value of, $ sysctl net.inet.tcp.recvspace But it looks like my guess is probably correct. The receive buffer at the FreeBSD end is full. When it receives more TCP data, it cannot accept it so it ACKs up to whatever it has in the buffer and not what the sender sent in the last segment. It also sends a window size of zero to tell the sender it's not accepting more data at the moment. You need to flush the buffer at the FreeBSD end. The program receiving on that socket needs to read the data. If the process is frozen, kill it and things should clear up. -- Crist J. Clark | cjclark@alum.mit.edu | cjclark@jhu.edu http://people.freebsd.org/~cjc/ | cjc@freebsd.org