From owner-freebsd-ipfw Sun Apr 14 22:11:19 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 0701737B416 for ; Sun, 14 Apr 2002 22:11:13 -0700 (PDT) Received: (from rizzo@localhost) by iguana.icir.org (8.11.6/8.11.3) id g3F5B5822012; Sun, 14 Apr 2002 22:11:05 -0700 (PDT) (envelope-from rizzo) Date: Sun, 14 Apr 2002 22:11:05 -0700 From: Luigi Rizzo To: Mihail Balikov Cc: freebsd-ipfw@FreeBSD.ORG Subject: Re: dummynet and ip.fw.one_pass Message-ID: <20020414221105.B21946@iguana.icir.org> References: <003401c1e419$70e73340$eee209d9@interbgc.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <003401c1e419$70e73340$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 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