From owner-freebsd-ipfw@FreeBSD.ORG Sun Mar 6 10:41:08 2005 Return-Path: Delivered-To: freebsd-ipfw@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 7A7F316A4CE for ; Sun, 6 Mar 2005 10:41:08 +0000 (GMT) Received: from flock1.newmail.ru (morda.newmail.ru [212.48.140.150]) by mx1.FreeBSD.org (Postfix) with SMTP id 6C48B43D31 for ; Sun, 6 Mar 2005 10:41:07 +0000 (GMT) (envelope-from bsdaemon@nm.ru) Received: (qmail 8314 invoked from network); 6 Mar 2005 10:25:06 -0000 Received: from unknown (HELO 80.252.137.109) (bsdaemon@nm.ru@80.252.137.109) by smtpd.newmail.ru with SMTP; 6 Mar 2005 10:25:06 -0000 Date: Sun, 6 Mar 2005 13:41:04 +0300 From: MH X-Mailer: The Bat! (v2.01) Organization: Wellcom ISP X-Priority: 3 (Normal) Message-ID: <1206132828.20050306134104@nm.ru> To: freebsd-ipfw@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Subject: How to rewrite ToS in IP packets? X-BeenThere: freebsd-ipfw@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: MH List-Id: IPFW Technical Discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 06 Mar 2005 10:41:08 -0000 Hi, I have a couple routers based on 5.3-REL so i need to rewrite ToS in VPN packets(tcp1723 & gre) for next prioritization by smart switches. Can I do this trick with ipfw?(pf,ipf) Thanks. -- Best regards, MH From owner-freebsd-ipfw@FreeBSD.ORG Sun Mar 6 10:46:40 2005 Return-Path: Delivered-To: freebsd-ipfw@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 995D616A4CE for ; Sun, 6 Mar 2005 10:46:40 +0000 (GMT) Received: from flock1.newmail.ru (morda.newmail.ru [212.48.140.150]) by mx1.FreeBSD.org (Postfix) with SMTP id ED1C243D53 for ; Sun, 6 Mar 2005 10:46:39 +0000 (GMT) (envelope-from bsdaemon@nm.ru) Received: (qmail 19636 invoked from network); 6 Mar 2005 10:30:40 -0000 Received: from unknown (HELO 80.252.137.109) (bsdaemon@nm.ru@80.252.137.109) by smtpd.newmail.ru with SMTP; 6 Mar 2005 10:30:40 -0000 Date: Sun, 6 Mar 2005 13:46:37 +0300 From: MH X-Mailer: The Bat! (v2.01) Organization: Wellcom ISP X-Priority: 3 (Normal) Message-ID: <1606466678.20050306134637@nm.ru> To: freebsd-ipfw@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Subject: How to rewrite ToS in IP packets? X-BeenThere: freebsd-ipfw@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: MH List-Id: IPFW Technical Discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 06 Mar 2005 10:46:40 -0000 Hi, I have a couple routers based on 5.3-REL so i need to rewrite ToS in VPN packets(tcp1723 & gre) for next prioritization by smart switches. Can I do this trick with ipfw?(pf,ipf) Thanks. -- Best regards, MH mailto:bsdaemon@nm.ru From owner-freebsd-ipfw@FreeBSD.ORG Mon Mar 7 11:02:05 2005 Return-Path: Delivered-To: freebsd-ipfw@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id D44DB16A4CE for ; Mon, 7 Mar 2005 11:02:05 +0000 (GMT) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id BA23043D1D for ; Mon, 7 Mar 2005 11:02:05 +0000 (GMT) (envelope-from owner-bugmaster@freebsd.org) Received: from freefall.freebsd.org (peter@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.3/8.13.3) with ESMTP id j27B25nq037691 for ; Mon, 7 Mar 2005 11:02:05 GMT (envelope-from owner-bugmaster@freebsd.org) Received: (from peter@localhost) by freefall.freebsd.org (8.13.3/8.13.1/Submit) id j27B246f037685 for ipfw@freebsd.org; Mon, 7 Mar 2005 11:02:04 GMT (envelope-from owner-bugmaster@freebsd.org) Date: Mon, 7 Mar 2005 11:02:04 GMT Message-Id: <200503071102.j27B246f037685@freefall.freebsd.org> X-Authentication-Warning: freefall.freebsd.org: peter set sender to owner-bugmaster@freebsd.org using -f From: FreeBSD bugmaster To: ipfw@FreeBSD.org Subject: Current problem reports assigned to you X-BeenThere: freebsd-ipfw@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: IPFW Technical Discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 07 Mar 2005 11:02:06 -0000 Current FreeBSD problem reports Critical problems Serious problems S Submitted Tracker Resp. Description ------------------------------------------------------------------------------- o [2003/04/22] kern/51274 ipfw ipfw2 create dynamic rules with parent nu f [2003/04/24] kern/51341 ipfw ipfw rule 'deny icmp from any to any icmp o [2003/12/11] kern/60154 ipfw ipfw core (crash) o [2004/03/03] kern/63724 ipfw IPFW2 Queues dont t work f [2004/03/25] kern/64694 ipfw [ipfw] UID/GID matching in ipfw non-funct o [2004/11/13] kern/73910 ipfw [ipfw] serious bug on forwarding of packe o [2004/11/19] kern/74104 ipfw ipfw2/1 conflict not detected or reported o [2004/12/25] i386/75483 ipfw ipfw count does not count 8 problems total. Non-critical problems S Submitted Tracker Resp. Description ------------------------------------------------------------------------------- a [2001/04/13] kern/26534 ipfw Add an option to ipfw to log gid/uid of w o [2002/12/10] kern/46159 ipfw ipfw dynamic rules lifetime feature o [2003/02/11] kern/48172 ipfw ipfw does not log size and flags o [2003/03/10] kern/49086 ipfw [patch] Make ipfw2 log to different syslo o [2003/04/09] bin/50749 ipfw ipfw2 incorrectly parses ports and port r o [2003/08/26] kern/55984 ipfw [patch] time based firewalling support fo o [2003/12/30] kern/60719 ipfw ipfw: Headerless fragments generate cryp o [2004/08/03] kern/69963 ipfw ipfw: install_state warning about already o [2004/09/04] kern/71366 ipfw "ipfw fwd" sometimes rewrites destination 9 problems total. From owner-freebsd-ipfw@FreeBSD.ORG Wed Mar 9 14:20:13 2005 Return-Path: Delivered-To: freebsd-ipfw@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 96BE716A4CE for ; Wed, 9 Mar 2005 14:20:13 +0000 (GMT) Received: from smtp-md2.infolink.com.br (smtp-md2.infolink.com.br [200.187.64.93]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1F29843D62 for ; Wed, 9 Mar 2005 14:20:13 +0000 (GMT) (envelope-from r2@infolinks.com.br) Received: from md2.infolink.com.br (md2.infolink.com.br [200.187.64.90]) by smtp-md2.infolink.com.br (Postfix) with ESMTP id 0E4FB158E8F for ; Wed, 9 Mar 2005 11:20:08 -0300 (EST) Received: from [192.168.1.66] ([192.168.1.66]) by md2.infolink.com.br ; Wed, 09 Mar 2005 11:20:07 -0300 BRT Message-ID: <422F0625.8080908@infolinks.com.br> Date: Wed, 09 Mar 2005 11:20:21 -0300 From: R2 User-Agent: Mozilla/5.0 (X11; U; Linux i686; pt-BR; rv:1.7.5) Gecko/20050105 Debian/1.7.5-1 X-Accept-Language: pt-br, pt MIME-Version: 1.0 To: freebsd-ipfw@freebsd.org References: <1206132828.20050306134104@nm.ru> In-Reply-To: <1206132828.20050306134104@nm.ru> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Rcpt-To: Subject: Re: How to rewrite ToS in IP packets? X-BeenThere: freebsd-ipfw@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: IPFW Technical Discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 09 Mar 2005 14:20:13 -0000 You can use Altq to rewrite our mark this package. Altq is builtin in the kernel with pf. MH escreveu: >Hi, > >I have a couple routers based on 5.3-REL >so i need to rewrite ToS in VPN packets(tcp1723 & gre) >for next prioritization by smart switches. > >Can I do this trick with ipfw?(pf,ipf) > >Thanks. > > > From owner-freebsd-ipfw@FreeBSD.ORG Fri Mar 11 04:03:02 2005 Return-Path: Delivered-To: freebsd-ipfw@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id DD24616A4CE for ; Fri, 11 Mar 2005 04:03:02 +0000 (GMT) Received: from wproxy.gmail.com (wproxy.gmail.com [64.233.184.204]) by mx1.FreeBSD.org (Postfix) with ESMTP id 74BC743D48 for ; Fri, 11 Mar 2005 04:03:02 +0000 (GMT) (envelope-from jingmin.song@gmail.com) Received: by wproxy.gmail.com with SMTP id 70so829708wra for ; Thu, 10 Mar 2005 20:03:02 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:reply-to:to:subject:mime-version:content-type:content-transfer-encoding; b=IxAGyUG3b28Ey9rBdupBtGJhgTICo64NMFGD5WB8YKeBYq0G1CDnEHMhWnq6quDvE/seN010kX5iYpV3iyCBQm6m9gqaOteoP55hbcTCOFTdrJcmqbDCGaq9egMstrS8GbhhMJbflsjQ5voE3cTg2/b7Xb6DzYNLWWVM+OmVq4E= Received: by 10.54.36.37 with SMTP id j37mr2248141wrj; Thu, 10 Mar 2005 20:03:01 -0800 (PST) Received: by 10.54.15.8 with HTTP; Thu, 10 Mar 2005 20:03:01 -0800 (PST) Message-ID: Date: Fri, 11 Mar 2005 12:03:01 +0800 From: jim song To: freebsd-ipfw@freebsd.org Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: why my dummynet queue not work? X-BeenThere: freebsd-ipfw@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: jim song List-Id: IPFW Technical Discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 11 Mar 2005 04:03:03 -0000 Hi, I encounter a problem when using dummynet to test tcp throughputs. I used a freebsd box running dummynet as an router. And all my testing machines are attached to giga switch. On the router, I use dummynet to emulate a long-fat network which has high bandwidth but long delays. The setting is as attached. I have modified related configuration and source files and reinstall the kernel. The problem is that the tcp throughput through this router could not reach reasonable value. I can only get 5Mbps throughputs. (I have set the tcp window to 5MBytes already). It seems like that the queue parameter doesnot work. Because if it works, the throughputs will go up to the bandwidth limitation. Could somebody tell me why? Thanks, --Jim -------------------------------------------------- ipfw -f -q flush ipfw -f -q pipe flush ipfw add pipe 1 ip from any to any in recv em0 ipfw add pipe 2 ip from any to any out xmit em0 ipfw pipe 1 config bw 200Mbit/s delay 25ms queue 1000 ipfw pipe 2 config bw 200Mbit/s delay 25ms queue 1000 # 1. compiling Kernel Options # options IPFIREWALL # options IPFIREWALL_DEFAULT_TO_ACCEPT # options DUMMYNET # options HZ=1000 # options NMBCLUSTERS=131072 # options DEVICE_POLLING # 2. Add the following lines into /etc/sysctl.conf # kern.polling.enable=1 # kern.polling.user_frac=5 # kern.polling.burst_max=400 # kern.polling.each_burst=15 # net.inet.ip.intr_queue_maxlen=3000 # 3. Modify source code of ipfw and dummynet to support larger queue size # 4. Increase NIC buffer by setting EM_MAX_RXD to 4096 in /usr/src/sys/dev/em/if_em.h -------------------------------------------------------------------- From owner-freebsd-ipfw@FreeBSD.ORG Fri Mar 11 04:39:36 2005 Return-Path: Delivered-To: freebsd-ipfw@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id DC74B16A4CE for ; Fri, 11 Mar 2005 04:39:35 +0000 (GMT) Received: from odin.ac.hmc.edu (Odin.AC.HMC.Edu [134.173.32.75]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9E5C143D2D for ; Fri, 11 Mar 2005 04:39:34 +0000 (GMT) (envelope-from brdavis@odin.ac.hmc.edu) Received: from odin.ac.hmc.edu (localhost.localdomain [127.0.0.1]) by odin.ac.hmc.edu (8.13.0/8.13.0) with ESMTP id j2B4dYdm030590; Thu, 10 Mar 2005 20:39:34 -0800 Received: (from brdavis@localhost) by odin.ac.hmc.edu (8.13.0/8.13.0/Submit) id j2B4dYWP030589; Thu, 10 Mar 2005 20:39:34 -0800 Date: Thu, 10 Mar 2005 20:39:33 -0800 From: Brooks Davis To: jim song Message-ID: <20050311043933.GA28686@odin.ac.hmc.edu> References: Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="HlL+5n6rz5pIUxbD" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.1i X-Virus-Scanned: by amavisd-new X-Spam-Status: No, hits=0.0 required=8.0 tests=none autolearn=no version=2.63 X-Spam-Checker-Version: SpamAssassin 2.63 (2004-01-11) on odin.ac.hmc.edu cc: freebsd-ipfw@freebsd.org Subject: Re: why my dummynet queue not work? X-BeenThere: freebsd-ipfw@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: IPFW Technical Discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 11 Mar 2005 04:39:36 -0000 --HlL+5n6rz5pIUxbD Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Mar 11, 2005 at 12:03:01PM +0800, jim song wrote: > Hi,=20 > I encounter a problem when using dummynet to test tcp throughputs. >=20 > I used a freebsd box running dummynet as an router. And all my testing > machines are attached to giga switch. >=20 > On the router, I use dummynet to emulate a long-fat network which has=20 > high bandwidth but long delays. The setting is as attached. I have modifi= ed > related configuration and source files and reinstall the kernel. >=20 > The problem is that the tcp throughput through this router could not=20 > reach reasonable value. I can only get 5Mbps throughputs. (I have set the= tcp > window to 5MBytes already). It seems like that the queue parameter > doesnot work. Because if it works, the throughputs will go up to the=20 > bandwidth limitation. Why are you using the queue parameter at all? If you just want to emulate a pipe there is usually no need to do that. Have you adjusted your socket buffers in addition to your max TCP window size? -- Brooks > Could somebody tell me why? >=20 > Thanks, > --Jim >=20 >=20 >=20 > -------------------------------------------------- > ipfw -f -q flush > ipfw -f -q pipe flush > ipfw add pipe 1 ip from any to any in recv em0 > ipfw add pipe 2 ip from any to any out xmit em0 > ipfw pipe 1 config bw 200Mbit/s delay 25ms queue 1000 > ipfw pipe 2 config bw 200Mbit/s delay 25ms queue 1000 >=20 > # 1. compiling Kernel Options > # options IPFIREWALL > # options IPFIREWALL_DEFAULT_TO_ACCEPT > # options DUMMYNET > # options HZ=3D1000 > # options NMBCLUSTERS=3D131072 > # options DEVICE_POLLING >=20 > # 2. Add the following lines into /etc/sysctl.conf > # kern.polling.enable=3D1 > # kern.polling.user_frac=3D5 > # kern.polling.burst_max=3D400 > # kern.polling.each_burst=3D15 > # net.inet.ip.intr_queue_maxlen=3D3000 >=20 > # 3. Modify source code of ipfw and dummynet to support larger queue size >=20 > # 4. Increase NIC buffer by setting EM_MAX_RXD to 4096 in > /usr/src/sys/dev/em/if_em.h >=20 > -------------------------------------------------------------------- > _______________________________________________ > freebsd-ipfw@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-ipfw > To unsubscribe, send any mail to "freebsd-ipfw-unsubscribe@freebsd.org" --=20 Any statement of the form "X is the one, true Y" is FALSE. PGP fingerprint 655D 519C 26A7 82E7 2529 9BF0 5D8E 8BE9 F238 1AD4 --HlL+5n6rz5pIUxbD Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.1 (GNU/Linux) iD8DBQFCMSEFXY6L6fI4GtQRAjBQAJ4rXKZqzNH59uNEyAOCns//crx0NACg0jrz kGEUzzaVKQx3K6DlAcTsEb4= =/lNG -----END PGP SIGNATURE----- --HlL+5n6rz5pIUxbD-- From owner-freebsd-ipfw@FreeBSD.ORG Fri Mar 11 05:34:11 2005 Return-Path: Delivered-To: freebsd-ipfw@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 5A82816A4CE for ; Fri, 11 Mar 2005 05:34:11 +0000 (GMT) Received: from wproxy.gmail.com (wproxy.gmail.com [64.233.184.201]) by mx1.FreeBSD.org (Postfix) with ESMTP id E034943D46 for ; Fri, 11 Mar 2005 05:34:10 +0000 (GMT) (envelope-from jingmin.song@gmail.com) Received: by wproxy.gmail.com with SMTP id 68so904680wri for ; Thu, 10 Mar 2005 21:34:10 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:reply-to:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:references; b=TOkyefQCV+iv1KHP1TdBa8cE0+47s4B9OMww8kBHSxsjpwVlAPZI5a9AhWfjwywuTgVXZfAll9m1EpJuNHKt2JX+3stHU2IXssBmS+LqhfMaXCrNorv7ze54skdGvqCtyiaea+MP2s1yEVQZ91QwkeOUhKnBoXVNiEKlBqUu9yY= Received: by 10.54.10.39 with SMTP id 39mr2335640wrj; Thu, 10 Mar 2005 21:34:10 -0800 (PST) Received: by 10.54.15.8 with HTTP; Thu, 10 Mar 2005 21:34:10 -0800 (PST) Message-ID: Date: Fri, 11 Mar 2005 13:34:10 +0800 From: jim song To: freebsd-ipfw@freebsd.org In-Reply-To: <20050311043933.GA28686@odin.ac.hmc.edu> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit References: <20050311043933.GA28686@odin.ac.hmc.edu> cc: Brooks Davis Subject: Re: why my dummynet queue not work? X-BeenThere: freebsd-ipfw@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: jim song List-Id: IPFW Technical Discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 11 Mar 2005 05:34:11 -0000 Brooks, Actually I use the freebsd box as an router. I set the tcp window in another two windows box running iperf (iperf -w 5M). Before I add in the pipes, the throughputs could reach 300M, but after I config in the two pipes(200M bandwidth, 25ms delay), the throughput degrade to about 5M. BTW, is there some limitations to tcp connections passing through a router? Thanks, --Jingmin On Thu, 10 Mar 2005 20:39:33 -0800, Brooks Davis wrote: > > Why are you using the queue parameter at all? If you just want to > emulate a pipe there is usually no need to do that. Have you adjusted > your socket buffers in addition to your max TCP window size? > > -- Brooks > From owner-freebsd-ipfw@FreeBSD.ORG Fri Mar 11 05:52:50 2005 Return-Path: Delivered-To: freebsd-ipfw@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id E11CB16A4CE for ; Fri, 11 Mar 2005 05:52:50 +0000 (GMT) Received: from xorpc.icir.org (xorpc.icir.org [192.150.187.68]) by mx1.FreeBSD.org (Postfix) with ESMTP id B833C43D48 for ; Fri, 11 Mar 2005 05:52:50 +0000 (GMT) (envelope-from rizzo@icir.org) Received: from xorpc.icir.org (localhost [127.0.0.1]) by xorpc.icir.org (8.12.11/8.12.8) with ESMTP id j2B5qoB0065165; Thu, 10 Mar 2005 21:52:50 -0800 (PST) (envelope-from rizzo@xorpc.icir.org) Received: (from rizzo@localhost) by xorpc.icir.org (8.12.11/8.12.3/Submit) id j2B5qoxR065164; Thu, 10 Mar 2005 21:52:50 -0800 (PST) (envelope-from rizzo) Date: Thu, 10 Mar 2005 21:52:50 -0800 From: Luigi Rizzo To: jim song Message-ID: <20050310215250.A65126@xorpc.icir.org> References: <20050311043933.GA28686@odin.ac.hmc.edu> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5.1i In-Reply-To: ; from jingmin.song@gmail.com on Fri, Mar 11, 2005 at 01:34:10PM +0800 cc: Brooks Davis cc: freebsd-ipfw@freebsd.org Subject: Re: why my dummynet queue not work? X-BeenThere: freebsd-ipfw@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: IPFW Technical Discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 11 Mar 2005 05:52:51 -0000 On Fri, Mar 11, 2005 at 01:34:10PM +0800, jim song wrote: > Brooks, > > Actually I use the freebsd box as an router. I set the tcp window in > another two windows box running iperf (iperf -w 5M). > > Before I add in the pipes, the throughputs could reach 300M, but after > I config in the two pipes(200M bandwidth, 25ms delay), the throughput > degrade to about 5M. but the bandwidth is at most 1 window/RTT, where the window is min(sockbuf_size, TCP_window). With your pipe setting you have 50-100ms RTT, so the above would suggest that your effective window is around 500kbit or roughly 64KBytes. all consistent with an improper window setting luigi > BTW, is there some limitations to tcp connections passing through a > router? > > Thanks, > --Jingmin > > On Thu, 10 Mar 2005 20:39:33 -0800, Brooks Davis > wrote: > > > > Why are you using the queue parameter at all? If you just want to > > emulate a pipe there is usually no need to do that. Have you adjusted > > your socket buffers in addition to your max TCP window size? > > > > -- Brooks > > > _______________________________________________ > freebsd-ipfw@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-ipfw > To unsubscribe, send any mail to "freebsd-ipfw-unsubscribe@freebsd.org" From owner-freebsd-ipfw@FreeBSD.ORG Fri Mar 11 06:06:04 2005 Return-Path: Delivered-To: freebsd-ipfw@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 8336416A4CE for ; Fri, 11 Mar 2005 06:06:04 +0000 (GMT) Received: from wproxy.gmail.com (wproxy.gmail.com [64.233.184.202]) by mx1.FreeBSD.org (Postfix) with ESMTP id 10B9243D1D for ; Fri, 11 Mar 2005 06:06:04 +0000 (GMT) (envelope-from jingmin.song@gmail.com) Received: by wproxy.gmail.com with SMTP id 68so910842wri for ; Thu, 10 Mar 2005 22:06:03 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:reply-to:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:references; b=ECN+W/VdFbLSCa2REh1diGdQRbipJOPVP7wEySLc1eeU3XEmVT7dnzUBGDl4FmY5sh5aGSeqsQCIlNCYCwaNj61946iD5V4Q/rLS59hcs2ZrOFxGKQ38dTy185GB5C8OruSFEmLeCb65zz7zMfNCoF9NJy0ij2aJMtJdkjH+kts= Received: by 10.54.10.39 with SMTP id 39mr2346688wrj; Thu, 10 Mar 2005 22:06:02 -0800 (PST) Received: by 10.54.15.8 with HTTP; Thu, 10 Mar 2005 22:06:02 -0800 (PST) Message-ID: Date: Fri, 11 Mar 2005 14:06:02 +0800 From: jim song To: Luigi Rizzo In-Reply-To: <20050310215250.A65126@xorpc.icir.org> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit References: <20050311043933.GA28686@odin.ac.hmc.edu> <20050310215250.A65126@xorpc.icir.org> cc: Brooks Davis cc: freebsd-ipfw@freebsd.org Subject: Re: why my dummynet queue not work? X-BeenThere: freebsd-ipfw@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: jim song List-Id: IPFW Technical Discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 11 Mar 2005 06:06:04 -0000 Luigi, I think what you said is the working window. It could be different to the initial window I set for the tcp stream. Tcp should get full bandwidth throughput in such circumstance. But in my testing, tcp window has retreated from 5M window to 640K. That is the problem. Am I right? Thanks, --Jim From owner-freebsd-ipfw@FreeBSD.ORG Fri Mar 11 09:24:38 2005 Return-Path: Delivered-To: freebsd-ipfw@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 8421716A4CE for ; Fri, 11 Mar 2005 09:24:38 +0000 (GMT) Received: from xorpc.icir.org (xorpc.icir.org [192.150.187.68]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4F9CF43D46 for ; Fri, 11 Mar 2005 09:24:38 +0000 (GMT) (envelope-from rizzo@icir.org) Received: from xorpc.icir.org (localhost [127.0.0.1]) by xorpc.icir.org (8.12.11/8.12.8) with ESMTP id j2B9Ocef066883; Fri, 11 Mar 2005 01:24:38 -0800 (PST) (envelope-from rizzo@xorpc.icir.org) Received: (from rizzo@localhost) by xorpc.icir.org (8.12.11/8.12.3/Submit) id j2B9OXew066882; Fri, 11 Mar 2005 01:24:33 -0800 (PST) (envelope-from rizzo) Date: Fri, 11 Mar 2005 01:24:33 -0800 From: Luigi Rizzo To: jim song Message-ID: <20050311012433.C66627@xorpc.icir.org> References: <20050311043933.GA28686@odin.ac.hmc.edu> <20050310215250.A65126@xorpc.icir.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5.1i In-Reply-To: ; from jingmin.song@gmail.com on Fri, Mar 11, 2005 at 02:06:02PM +0800 cc: Brooks Davis cc: freebsd-ipfw@freebsd.org Subject: Re: why my dummynet queue not work? X-BeenThere: freebsd-ipfw@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: IPFW Technical Discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 11 Mar 2005 09:24:38 -0000 On Fri, Mar 11, 2005 at 02:06:02PM +0800, jim song wrote: > Luigi, > > I think what you said is the working window. It could be different to > the initial window I set for the tcp stream. Tcp should get full bandwidth > throughput in such circumstance. > > But in my testing, tcp window has retreated from 5M window to 640K. > That is the problem. > > Am I right? i think you are just being lazy :) seriously, i don't mean to be rude but brooks and i and possibly others already suggested that it is likely a window problem (as we have already been hit by that). What you should do is do your homework and run a few experiments with different delay settings, taking note of the actual delays (with a PING measurement e.g) and bandwidths, and figure out if there is a window/rtt pattern and in case determine what window is in use. then there are (as we already said) multiple parameters that cap the window: the TCP window, the socket buffer, window scale options etc on both sender and receiver. cheers luigi > Thanks, > --Jim > _______________________________________________ > freebsd-ipfw@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-ipfw > To unsubscribe, send any mail to "freebsd-ipfw-unsubscribe@freebsd.org" From owner-freebsd-ipfw@FreeBSD.ORG Fri Mar 11 16:49:05 2005 Return-Path: Delivered-To: freebsd-ipfw@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 681DD16A4CE for ; Fri, 11 Mar 2005 16:49:05 +0000 (GMT) Received: from odin.ac.hmc.edu (Odin.AC.HMC.Edu [134.173.32.75]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3288B43D2F for ; Fri, 11 Mar 2005 16:49:05 +0000 (GMT) (envelope-from brdavis@odin.ac.hmc.edu) Received: from odin.ac.hmc.edu (localhost.localdomain [127.0.0.1]) by odin.ac.hmc.edu (8.13.0/8.13.0) with ESMTP id j2BGn4Tg030076; Fri, 11 Mar 2005 08:49:04 -0800 Received: (from brdavis@localhost) by odin.ac.hmc.edu (8.13.0/8.13.0/Submit) id j2BGn4MZ030075; Fri, 11 Mar 2005 08:49:04 -0800 Date: Fri, 11 Mar 2005 08:49:04 -0800 From: Brooks Davis To: jim song Message-ID: <20050311164904.GA29287@odin.ac.hmc.edu> References: <20050311043933.GA28686@odin.ac.hmc.edu> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="PEIAKu/WMn1b1Hv9" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.1i X-Virus-Scanned: by amavisd-new X-Spam-Status: No, hits=0.0 required=8.0 tests=none autolearn=no version=2.63 X-Spam-Checker-Version: SpamAssassin 2.63 (2004-01-11) on odin.ac.hmc.edu cc: Brooks Davis cc: freebsd-ipfw@freebsd.org Subject: Re: why my dummynet queue not work? X-BeenThere: freebsd-ipfw@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: IPFW Technical Discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 11 Mar 2005 16:49:05 -0000 --PEIAKu/WMn1b1Hv9 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable [Please don't top-post.] On Fri, Mar 11, 2005 at 01:34:10PM +0800, jim song wrote: > Brooks, >=20 > Actually I use the freebsd box as an router. I set the tcp window in=20 > another two windows box running iperf (iperf -w 5M). I'm pretty sure iperf only really sets the socket buffer size, not the tcp window size. In fact, that's what the help entry says: -w, --window #[KM] TCP window size (socket buffer size) =20 At least on FreeBSD the maximum window size is controlled by a global variable. You need to make sure you are setting both. If you want to use windows end-hosts, you'll need to ask a windows list what you need to do there. > Before I add in the pipes, the throughputs could reach 300M, but after > I config in the two pipes(200M bandwidth, 25ms delay), the throughput > degrade to about 5M.=20 That's expected. > BTW, is there some limitations to tcp connections passing through a=20 > router? No, dummynet doesn't know anything about TCP. -- Brooks > On Thu, 10 Mar 2005 20:39:33 -0800, Brooks Davis > wrote: > >=20 > > Why are you using the queue parameter at all? If you just want to > > emulate a pipe there is usually no need to do that. Have you adjusted > > your socket buffers in addition to your max TCP window size? > >=20 > > -- Brooks > > --=20 Any statement of the form "X is the one, true Y" is FALSE. PGP fingerprint 655D 519C 26A7 82E7 2529 9BF0 5D8E 8BE9 F238 1AD4 --PEIAKu/WMn1b1Hv9 Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.1 (GNU/Linux) iD8DBQFCMcwAXY6L6fI4GtQRAvgbAKDQI1jGzYdfKVhJu2u5g5I1kbSJaACghhwu e4oTZgw1nDE2PNev3tuGM/Q= =0Zwd -----END PGP SIGNATURE----- --PEIAKu/WMn1b1Hv9-- From owner-freebsd-ipfw@FreeBSD.ORG Sat Mar 12 10:40:09 2005 Return-Path: Delivered-To: freebsd-ipfw@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id A5A2D16A4CE for ; Sat, 12 Mar 2005 10:40:09 +0000 (GMT) Received: from wproxy.gmail.com (wproxy.gmail.com [64.233.184.200]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3E77743D58 for ; Sat, 12 Mar 2005 10:40:09 +0000 (GMT) (envelope-from jingmin.song@gmail.com) Received: by wproxy.gmail.com with SMTP id 70so1205865wra for ; Sat, 12 Mar 2005 02:40:08 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:reply-to:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:references; b=i/frDlWBQ1ZkOvbZAQ9jW6gP0MDSz4aAQ7ksWDTTtjbIbDLAYiFHkIy/MfpmkiFeGCvvtk81N/yi8/IOlGuCkVnF6ip4hQxjTODFv09nM6W8gtziMVwLTo9nci9QbMOrs1Or+2gfyLUPaYiyXsWZEcprQWjdi+g8gtczrLFWezw= Received: by 10.54.71.17 with SMTP id t17mr3373581wra; Sat, 12 Mar 2005 02:40:08 -0800 (PST) Received: by 10.54.15.8 with HTTP; Sat, 12 Mar 2005 02:40:07 -0800 (PST) Message-ID: Date: Sat, 12 Mar 2005 18:40:07 +0800 From: jim song To: Brooks Davis In-Reply-To: <20050311164904.GA29287@odin.ac.hmc.edu> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit References: <20050311043933.GA28686@odin.ac.hmc.edu> <20050311164904.GA29287@odin.ac.hmc.edu> cc: freebsd-ipfw@freebsd.org Subject: Re: why my dummynet queue not work? X-BeenThere: freebsd-ipfw@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: jim song List-Id: IPFW Technical Discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 12 Mar 2005 10:40:09 -0000 Brooks, Luigi, Finally it is solved! I found I have run to the false direction. Because I am a newbie with dummynet, I am not confident with my setting at the begining. :) Actually, the low throughput is caused by 1323 option not enabled on the end host. The setting is as below: --------------------------------- [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters] "Tcp1323Opts"=dword:00000003 Thanks for your helps! --Jim From owner-freebsd-ipfw@FreeBSD.ORG Sat Mar 12 12:49:24 2005 Return-Path: Delivered-To: freebsd-ipfw@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 1633616A4CE for ; Sat, 12 Mar 2005 12:49:24 +0000 (GMT) Received: from r2d2.reverse.net (r2d2.reverse.net [66.225.223.4]) by mx1.FreeBSD.org (Postfix) with ESMTP id AF4C643D46 for ; Sat, 12 Mar 2005 12:49:23 +0000 (GMT) (envelope-from mcgehrin@reverse.net) Received: from orange (mx2.reverse.net [66.225.223.254]) by r2d2.reverse.net (Postfix) with SMTP id C26661001E for ; Sat, 12 Mar 2005 07:49:22 -0500 (EST) Message-ID: <002401c52701$eb25c9e0$af00a8c0@orange> From: "Matthew McGehrin" To: References: Date: Sat, 12 Mar 2005 07:49:23 -0500 MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset="iso-8859-1"; reply-type=original Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2900.2527 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2527 Subject: Re: why my dummynet queue not work?: TCP Tuning Guide X-BeenThere: freebsd-ipfw@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: Matthew McGehrin List-Id: IPFW Technical Discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 12 Mar 2005 12:49:24 -0000 http://www-didc.lbl.gov/TCP-tuning/ sysctl -w kern.ipc.maxsockbuf=8388608 sysctl -w net.inet.tcp.rfc1323=1 sysctl -w net.inet.tcp.sendspace=1048576 sysctl -w net.inet.tcp.recvspace=1048576 ----- Original Message ----- From: "jim song" To: Sent: Thursday, March 10, 2005 11:03 PM Subject: why my dummynet queue not work? > The problem is that the tcp throughput through this router could not > reach reasonable value. I can only get 5Mbps throughputs. (I have set the > tcp > window to 5MBytes already). It seems like that the queue parameter > doesnot work. Because if it works, the throughputs will go up to the > bandwidth limitation.