From owner-freebsd-ipfw Mon Apr 15 3:24:51 2002 Delivered-To: freebsd-ipfw@freebsd.org Received: from iguana.icir.org (iguana.icir.org [192.150.187.36]) by hub.freebsd.org (Postfix) with ESMTP id D96C137B404 for ; Mon, 15 Apr 2002 03:24:45 -0700 (PDT) Received: (from rizzo@localhost) by iguana.icir.org (8.11.6/8.11.3) id g3FAOWi24210; Mon, 15 Apr 2002 03:24:32 -0700 (PDT) (envelope-from rizzo) Date: Mon, 15 Apr 2002 03:24:32 -0700 From: Luigi Rizzo To: Mihail Balikov Cc: freebsd-ipfw@FreeBSD.ORG Subject: Re: dummynet and ip.fw.one_pass Message-ID: <20020415032432.A24198@iguana.icir.org> References: <003401c1e419$70e73340$eee209d9@interbgc.com> <20020414221105.B21946@iguana.icir.org> <000901c1e45c$6f89a3a0$eee209d9@interbgc.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <000901c1e45c$6f89a3a0$eee209d9@interbgc.com> User-Agent: Mutt/1.3.23i Sender: owner-freebsd-ipfw@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG i do not follow your reasoning -- there is no "burst" parameter in the pipe configuration. cheers luigi On Mon, Apr 15, 2002 at 12:03:40PM +0300, Mihail Balikov wrote: > in configuration: > > ipfw pipe 1 config bw 1Mbit/s > ipfw queue 2 config pipe 1 weight 1 mask dst-ip 0x000000ff > ipfw add queue 2 ip from any to 1.2.3.0/24 > ipfw pipe 3 config bw 64Kbit/s burst 128Kbit/s mask dst-ip 0x000000ff > ipfw add 3 pipe 3 ip from any to 1.2.3.0/24 > > is it correct following logic: > > if ( (packet & M_DUMMYNET) && /* packet has passed through > pipe ==> pipe 2 */ > ! (packet & M_DUMMYNET_DELAIED)) /* packet has not been delaied by pipe > 2 */ > { > allow_burst_upto(128Kbit/s); > } else { > exact_shape(64Kbit/s); > } > > regards, > Mihail > > > > ----- Original Message ----- > From: "Luigi Rizzo" > To: "Mihail Balikov" > Cc: > Sent: Monday, April 15, 2002 8:11 AM > Subject: Re: dummynet and ip.fw.one_pass > > > > the code seems correct, but I would do the shaping in the opposite > > order so that a single host won't be able to monopolise the 1Mbit > > that you allow for the network. > > > > Secondly, this seems to be a good use for fair queueing, where > > you want equal sharing of the 1Mbit/s bandwidth: > > > > ipfw pipe 1 config bw 1Mbit/s > > ipfw queue 2 config pipe 1 weight 1 mask dst-ip 0x000000ff > > > > ipfw add queue 2 ip from any to 1.2.3.0/24 > > > > (you do not need fw_one_pass=0 in this case) > > > > cheers > > luigi > > > > On Mon, Apr 15, 2002 at 04:04:06AM +0300, Mihail Balikov wrote: > > > Hi, > > > > > > is it correct to use such configuration : > > > > > > sysctl -w net.inet.ip.fw.one_pass=0 > > > > > > # process only outgoing packets > > > ipfw add 10 allow all from any to any in > > > # shape whole network to 1Mb/s > > > ipfw add 15 pipe 15 all from any to 1.2.3.0/24 > > > ipfw pipe 15 config bw 1Mbit/s > > > # shape every host to 64Kb/s > > > ipfw add 20 pipe 20 all from any to 1.2.3.0/24 > > > ipfw pipe 20 config mask dst-ip 0x000000ff bw 64Kbit/s > > > # transmit packet > > > ipfw add 30 allow all from any to any > > > > > > regards, > > > Mihail > > > > > > > > > To Unsubscribe: send mail to majordomo@FreeBSD.org > > > with "unsubscribe freebsd-ipfw" in the body of the message > > > > To Unsubscribe: send mail to majordomo@FreeBSD.org > > with "unsubscribe freebsd-ipfw" in the body of the message > > > To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-ipfw" in the body of the message