Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 5 Nov 2003 13:50:42 -0800
From:      Luigi Rizzo <rizzo@icir.org>
To:        Yuchung Cheng <ycheng@cs.ucsd.edu>
Cc:        ipfw@freebsd.org
Subject:   Re: maximum pipes in dummynet?
Message-ID:  <20031105135042.A42702@xorpc.icir.org>
In-Reply-To: <20031105105949.A15915@cs.ucsd.edu>; from ycheng@cs.ucsd.edu on Wed, Nov 05, 2003 at 10:59:50AM -0800
References:  <20031105105949.A15915@cs.ucsd.edu>

next in thread | previous in thread | raw e-mail | index | archive | help
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"



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20031105135042.A42702>