Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 6 Oct 2003 17:27:55 -0700
From:      Luigi Rizzo <rizzo@icir.org>
To:        pbrezny@purplecat.net
Cc:        freebsd-ipfw@freebsd.org
Subject:   Re: dummynet bw limit problem
Message-ID:  <20031006172755.A71328@xorpc.icir.org>
In-Reply-To: <3152.12.150.157.66.1065475412.squirrel@ssl.purplecat.net>; from peter@purplecat.net on Mon, Oct 06, 2003 at 05:23:32PM -0400
References:  <3152.12.150.157.66.1065475412.squirrel@ssl.purplecat.net>

next in thread | previous in thread | raw e-mail | index | archive | help
ok, in random order:
First, the bandwidth must be an integer.
	$fwcmd pipe 4 config bw .128Mbit/s

 + you should show us the entire config, because 'one_pass=0' means
   the 'pipe' rule will not terminate the processing of the
   packet, and you might hit some other pipe or rule;

 + the 'bandwidth' in dummynet pipes must be an integer (admittedly,
   the manpage does not specify it, and the parser does not complain
   as it shoud...); so a command like this

	$fwcmd pipe 5 config bw .256Mbit/s

   will effectively set an 'unlimited' bandwidth; even worse, something like

	$fwcmd pipe 5 config bw 2.56Mbit/s

   will parse the '2', then look for a unit specifier, and since the '.'
   is unrecognised it will silently assume bits/s which is not what you
   want...;

 + finally, i wonder if "via $oif" is really what you want.
   "in via $oif" means "in recv $oif";
   "out via $oif" means "out { recv $oif or xmit $oif }" but
   perhaps you just want one of the two ?

 + tcpdump works at layer 2 so it will show packets on the device,
   before (on the input path) they are processed by dummynet;

	cheers
	luigi

On Mon, Oct 06, 2003 at 05:23:32PM -0400, Peter Brezny wrote:
> Greetings,
> 
> I'm having difficulties with dummynet limiting connections when I set the
> bw limit to anything greater than around 900 Kbit/sec.
> Using pipes 1-8 below, even mixed and matched for asymmetric control work
> fine, except when i bring in a pipe numbered 9 or greater.
> 
> I've tried changing the queue size from between 20Kbytes to 50Kbytes
> I've tried increasing the buckets to 256
> 
> But no luck.
> 
> Interestingly, with the configuration below, if I ping a host on the
> internet, tcpdump shows the request and the reply, but I get nothing on
> the console.
> 
> If I mix and match the in and outbound pipes, I'll either get nothing on
> the console, or:
> ping: sendto: No buffer space available
> 
> On the system i'm testing from i've got:
> sysctl net.inet.ip.fw.one_pass=0
> 
> Any suggestions are greatly appreciated.
> 
> #       traffic shaping test
>         $fwcmd add pipe 9 all from any to any out via $oif
>         $fwcmd add pipe 10 all from any to any in via $oif
> #
> #       pipe configuration.
> #       odd pipes are for outbound connections
> #       even pipes are for inbound connections
>         $fwcmd pipe 1 config bw .064Mbit/s
>         $fwcmd pipe 2 config bw .064Mbit/s
>         $fwcmd pipe 3 config bw .128Mbit/s
>         $fwcmd pipe 4 config bw .128Mbit/s
>         $fwcmd pipe 5 config bw .256Mbit/s
>         $fwcmd pipe 6 config bw .256Mbit/s
>         $fwcmd pipe 7 config bw 512Kbit/s
>         $fwcmd pipe 8 config bw 512Kbit/s
>         $fwcmd pipe 9 config bw 990Kbit/s
>         $fwcmd pipe 10 config bw 990Kbit/s
>         $fwcmd pipe 11 config bw 2048kbit/s
>         $fwcmd pipe 12 config bw 2048kbit/s
> 
> 
> Peter Brezny
> purplecat.net
> _______________________________________________
> 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?20031006172755.A71328>