From owner-freebsd-ipfw@FreeBSD.ORG Wed Nov 5 13:50:44 2003 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 4EA2116A4CE for ; Wed, 5 Nov 2003 13:50:44 -0800 (PST) Received: from xorpc.icir.org (xorpc.icir.org [192.150.187.68]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2186E43F75 for ; Wed, 5 Nov 2003 13:50:43 -0800 (PST) (envelope-from rizzo@xorpc.icir.org) Received: from xorpc.icir.org (localhost [127.0.0.1]) by xorpc.icir.org (8.12.9p1/8.12.3) with ESMTP id hA5LogFw044625; Wed, 5 Nov 2003 13:50:42 -0800 (PST) (envelope-from rizzo@xorpc.icir.org) Received: (from rizzo@localhost) by xorpc.icir.org (8.12.9p1/8.12.3/Submit) id hA5Logfe044620; Wed, 5 Nov 2003 13:50:42 -0800 (PST) (envelope-from rizzo) Date: Wed, 5 Nov 2003 13:50:42 -0800 From: Luigi Rizzo To: Yuchung Cheng Message-ID: <20031105135042.A42702@xorpc.icir.org> References: <20031105105949.A15915@cs.ucsd.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: <20031105105949.A15915@cs.ucsd.edu>; from ycheng@cs.ucsd.edu on Wed, Nov 05, 2003 at 10:59:50AM -0800 cc: ipfw@freebsd.org Subject: Re: maximum pipes in dummynet? 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, 05 Nov 2003 21:50:44 -0000 the problem is not in dummynet, it is in your ruleset that, as you describe it, has to traverse up to 4000 rules before packets are sent to the correct pipe. If you have a finite set of pipe speeds, just use masks on the ports ipfw add pipe 1 tcp from a 10000-10499 to 192.168.1.100 out ipfw add pipe 2 tcp from a 10500-10999 to 192.168.1.100 out ipfw add pipe 3 tcp from a 11000-11499 to 192.168.1.100 out ipfw add pipe 4 tcp from a 11500-11999 to 192.168.1.100 out ipfw pipe 1 config ... mask src-port 0xffff ipfw pipe 2 config ... mask src-port 0xffff ipfw pipe 3 config ... mask src-port 0xffff ipfw pipe 4 config ... mask src-port 0xffff and you have your first 2000 pipes. Same for the other 2000 As usual, a careful reading of the ipfw manpage would help for both your questions cheers luigi On Wed, Nov 05, 2003 at 10:59:50AM -0800, Yuchung Cheng wrote: > Hi all, > > I am using dummynet to simulate many different links. After dummynet seems > to slow down after more than 4000 (static) pipes. That is, the link delay > is more than the specified delay. My config file looks like > > ipfw add 1 pipe 7 tcp from 192.168.2.100 10003 to 192.168.1.100 out > ipfw pipe 7 config bw 730KByte/s queue 40 delay 4ms plr 0.01 > ipfw add 1 pipe 8 tcp from 192.168.1.100 to 192.168.2.100 10003 in > ipfw pipe 8 config bw 730KByte/s queue 40 delay 4ms plr 0.01 > ipfw add 1 pipe 9 tcp from 192.168.2.100 10004 to 192.168.1.100 out > ipfw pipe 9 config bw 1400KByte/s queue 40 delay 28ms plr 0.00 > ipfw add 1 pipe 10 tcp from 192.168.1.100 to 192.168.2.100 10004 in > ipfw pipe 10 config bw 1503KByte/s queue 40 delay 28ms plr 0.00 > > My machine is 2.66 P4 w/ 1G mem. Does anybody know how to make dummynet > support more pipes? > > Also is it possible to specify one pipe for more than one port? i.e., > ipfw add 1 pipe 10 tcp from 192.168.1.100 to 192.168.2.100 10004,10537,3045 in > > Thanks. > > Yu-chung > _______________________________________________ > 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"