From owner-freebsd-ipfw@FreeBSD.ORG Mon Jan 7 09:15:36 2013 Return-Path: Delivered-To: freebsd-ipfw@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 869C6A83 for ; Mon, 7 Jan 2013 09:15:36 +0000 (UTC) (envelope-from luigi@onelab2.iet.unipi.it) Received: from onelab2.iet.unipi.it (onelab2.iet.unipi.it [131.114.59.238]) by mx1.freebsd.org (Postfix) with ESMTP id 4A479384 for ; Mon, 7 Jan 2013 09:15:35 +0000 (UTC) Received: by onelab2.iet.unipi.it (Postfix, from userid 275) id 2E6C773027; Mon, 7 Jan 2013 10:14:39 +0100 (CET) Date: Mon, 7 Jan 2013 10:14:39 +0100 From: Luigi Rizzo To: Sami Halabi Subject: Re: Limit Session Bandwidth Message-ID: <20130107091439.GA15263@onelab2.iet.unipi.it> References: <20130103082937.GB54360@onelab2.iet.unipi.it> <20130105233743.GA94797@onelab2.iet.unipi.it> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.2.3i Cc: freebsd-ipfw X-BeenThere: freebsd-ipfw@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: IPFW Technical Discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 07 Jan 2013 09:15:36 -0000 On Mon, Jan 07, 2013 at 08:59:46AM +0200, Sami Halabi wrote: > Hi, > Thank you for the help. > > sysctl net.inet.ip.fw.one_pass=0 > introduces some issues to my configuration limits in my current > configuration, because limits aren't applied correctly since we continue > after the pipe, eg: > i had: > 1900 pipe 1000 all from x.y.z.1 to any > 2000 pipe 1001 all from any to x.y.z.1 > 2100 pipe 2000 all from x.y.z.0/24 to any > 2100 pipe 2001 all from any to x.y.z.0/24 > . > . > more pipes > . > .. > 6500 allow all from any to any > > so the I had special limit(large) for x.y.z.1 IP but another limit in the > whole /24 that i didn't want it to affect. > any ideas how to solve it? i thought about skipto but I'm not sure how to > use. > Sami one_pass = 0 essentially requires an accept rule after each pipe to behave similarly to the other case. How to do it depends on the configuration. Probably it would be good to make "one_pass" a per-pipe option. cheers luigi > On Sun, Jan 6, 2013 at 1:37 AM, Luigi Rizzo wrote: > > > On Sat, Jan 05, 2013 at 02:51:07PM +0200, Sami Halabi wrote: > > > Hi Luigi & Ozkan, > > > > > > Thanks for the response. > > > > > > Luigi i saw you said in some list never trust italians :), so i went step > > > by step. > > > first i put: > > > me out from a pipe > > > > > > sysctl net.inet.ip.fw.one_pass=0 > > > ipfw pipe 123 config bw 1Mbit/s mask all > > > ipfw add 100 pipe 123 out > > > > > > ipfw add 120 allow ip from any to any > > > > > > Works like a charm. > > > > > > Next Step wil be: > > > ipfw pipe 456 config bw 10Mbit/s > > > > > > ipfw sched 789 config mask all pipe 123 > > > or it should be: > > > ipfw sched 789 config mask all pipe 456 > > > > the latter. > > > > > ipfw add 110 queue 789 out > > > > > > > > > whats is the correct configuration ? > > > > > > the mask options isn't well documented, in the handbook its not even > > > mentiond. > > > > the manpage is slightly more up to date. > > The handbook is probably years behind. > > > > cheers > > luigi > > > > > same goes for scheduler... > > > I got the feeling that only few here know the options very welll... maybe > > > I'm wrong? > > > > > > Sami > > > > > > > > > > > > On Thu, Jan 3, 2013 at 12:46 PM, ?zkan KIRIK > > wrote: > > > > > > > I think there is a mistake at the sched config line. it should be as > > > > ipfw sched 789 config mask all pipe 456 > > > > > > > > > > > > On Thu, Jan 3, 2013 at 10:29 AM, Luigi Rizzo > > wrote: > > > > > > > >> ipfw sched 789 config mask all pipe 123 > > > > > > > > > > > > > > > > > > > > > -- > > > Sami Halabi > > > Information Systems Engineer > > > NMS Projects Expert > > > FreeBSD SysAdmin Expert > > > > > > -- > Sami Halabi > Information Systems Engineer > NMS Projects Expert > FreeBSD SysAdmin Expert