From owner-freebsd-net@FreeBSD.ORG Sat Oct 18 11:16:20 2003 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 F1C9A16A4B3 for ; Sat, 18 Oct 2003 11:16:20 -0700 (PDT) Received: from mtiwmhc12.worldnet.att.net (mtiwmhc12.worldnet.att.net [204.127.131.116]) by mx1.FreeBSD.org (Postfix) with ESMTP id 12DB943FAF for ; Sat, 18 Oct 2003 11:16:20 -0700 (PDT) (envelope-from cmascott@att.net) Received: from callisto.local (64.cambridge-01rh15rt.ma.dial-access.att.net[12.91.16.64]) by worldnet.att.net (mtiwmhc12) with ESMTP id <2003101818161811200ijc6ce>; Sat, 18 Oct 2003 18:16:18 +0000 Received: from callisto.local (localhost.local [127.0.0.1]) by callisto.local (8.12.8p1/8.12.8) with ESMTP id h9IIGGTb000363; Sat, 18 Oct 2003 14:16:16 -0400 (EDT) (envelope-from cmascott@callisto.local) Received: (from cmascott@localhost) by callisto.local (8.12.8p1/8.12.8/Submit) id h9IIGFjO000362; Sat, 18 Oct 2003 14:16:15 -0400 (EDT) Date: Sat, 18 Oct 2003 14:16:15 -0400 (EDT) From: Carl Mascott Message-Id: <200310181816.h9IIGFjO000362@callisto.local> To: vlm@netli.com In-Reply-To: <3F907152.3080706@netli.com> cc: freebsd-net@freebsd.org Subject: Re: TCP window size issues X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 18 Oct 2003 18:16:21 -0000 Sorry, but you are mistaken, and I can e-mail you the tcpdump output to prove it. As I said, I'm running 4.8-R with the PR 11966 patch backed out. With this kernel, and with any stock FreeBSD 4.6-R or earlier, the TCP implementation _will_ shrink the receive window after the connection is established _if_ a routing table pipesize entry tells it to. See tcp_input.c:tcp_mss() from 4.6-R or earlier. The following statements in ppp.conf set recvpipe 4096 set sendpipe 4096 result in the following default route route to: default destination: default mask: default gateway: 10.0.0.2 interface: tun0 flags: recvpipe sendpipe ssthresh rtt,msec rttvar hopcount mtu expire 4096 4096 0 0 0 0 1500 0 This causes tcp_mss() to shrink the receive window after a connection using the default route is established, as long as the kernel default recv window size is > 4096 (slight simplification here). Lev Walkin wrote: > Carl Mascott wrote: > > I have a few TCP window size issues. > [skip] > > 3. RFC 793 (TCP) says that shrinking the receive window after > > connection is established is "strongly discouraged". I'm > > currently shrinking the receive window on my default route > > (PPP link) from 32 KB to 4 KB with settings in > > /etc/ppp/ppp.conf. (Had to back out patch in PR 11966.) > > [skip] > > > How likely am I to get into trouble by shrinking the TCP > > receive window? Likely enough that I should make the > > RFC793 has nothing to do with the defaults you're setting in ppp.conf. > RFC merely says that the TCP implementation _itself_ should not shrink > window after establishing a TCP connection. If the default dictates 4k, > the TCP implementation will use 4k and will not advertise a much smaller > window without having accepted that much data.