From owner-freebsd-ipfw Mon Apr 15 2: 4:57 2002 Delivered-To: freebsd-ipfw@freebsd.org Received: from ns1.interbgc.com (mail.interbgc.com [217.9.224.3]) by hub.freebsd.org (Postfix) with SMTP id 7E1D837B404 for ; Mon, 15 Apr 2002 02:04:42 -0700 (PDT) Received: (qmail 71851 invoked by uid 1005); 15 Apr 2002 09:04:36 -0000 Received: from misho@interbgc.com by keeper.interbgc.com with qmail-scanner-1.01 (uvscan: v4.0.50/v4196. . Clean. Processed in 1.239902 secs); 15 Apr 2002 09:04:36 -0000 Received: from unknown (HELO misho) (217.9.226.238) by mail.interbgc.com with SMTP; 15 Apr 2002 09:04:34 -0000 Message-ID: <000901c1e45c$6f89a3a0$eee209d9@interbgc.com> Reply-To: "Mihail Balikov" From: "Mihail Balikov" To: "Luigi Rizzo" Cc: References: <003401c1e419$70e73340$eee209d9@interbgc.com> <20020414221105.B21946@iguana.icir.org> Subject: Re: dummynet and ip.fw.one_pass Date: Mon, 15 Apr 2002 12:03:40 +0300 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2600.0000 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 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 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