From owner-freebsd-ipfw@FreeBSD.ORG Mon Sep 19 12:21:55 2005 Return-Path: X-Original-To: freebsd-ipfw@freebsd.org Delivered-To: freebsd-ipfw@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 1B2F816A41F for ; Mon, 19 Sep 2005 12:21:55 +0000 (GMT) (envelope-from tataz@tataz.chchile.org) Received: from smtp1-g19.free.fr (smtp1-g19.free.fr [212.27.42.27]) by mx1.FreeBSD.org (Postfix) with ESMTP id B87FE43D45 for ; Mon, 19 Sep 2005 12:21:54 +0000 (GMT) (envelope-from tataz@tataz.chchile.org) Received: from tatooine.tataz.chchile.org (vol75-8-82-233-239-98.fbx.proxad.net [82.233.239.98]) by smtp1-g19.free.fr (Postfix) with ESMTP id A157C2E702; Mon, 19 Sep 2005 14:21:53 +0200 (CEST) Received: by tatooine.tataz.chchile.org (Postfix, from userid 1000) id 6BBF2405D; Mon, 19 Sep 2005 14:21:54 +0200 (CEST) Date: Mon, 19 Sep 2005 14:21:54 +0200 From: Jeremie Le Hen To: vladone Message-ID: <20050919122154.GM51142@obiwan.tataz.chchile.org> References: <97663975.20050917141303@spaingsm.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <97663975.20050917141303@spaingsm.com> User-Agent: Mutt/1.5.9i Cc: freebsd-ipfw@freebsd.org Subject: Re: dummynet patch X-BeenThere: freebsd-ipfw@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: IPFW Technical Discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Sep 2005 12:21:55 -0000 Hi, > Can someone make an patch for dummynet, so an user can't get maximum > bandwith. Queue work great for sharing same bandwidth, but an user can > get much banditdth if is not used but anothers. > So is wonderfull if i can put an paramaters for queue (like for pipe), > to limit bandwidth: > For example: > ipfw pipe 1 congig bw 1mbit/s > ipfw queue 1 config weight 10 pipe 1 bw 128kbits/s > ipfw queue 1 config weight 15 pipe 1 bw 256kbits/s > > This mean that i have two queue that share same pipe. Bandwidth is > given accordint with their weight but no more that value indicated by > "bw" parameter. In my example queue 1 can get more than 128 kbits/s. > In this mode bandwidth is well splited but an user can't get all > bandidth if is alone on network. You can just set net.inet.ip.fw.one_pass to 0 and use more pipes to limit the maximum bandwidth. Let's say you want to limit the whole pipe to 1MBits/s and then limit user with UID 1001 to 128 KBits/s on your external interface fxp0 : % sysctl -w net.inet.ip.fw.one_pass=0 # First skip to the end of the rules if we're not on the outgoing # path through fxp0. % ipfw add 100 skipto 65000 all from any to any not xmit fxp0 # Limit user 1001 max bandwidth. % ipfw pipe 1001 config bw 128KBits/s % ipfw add 200 pipe 1001 all from any to any # System-wipe policy. % ipfw pipe 1 config bw 1MBits/s % ipfw queue 11 config weight 10 pipe 1 % ipfw queue 12 config weight 20 pipe 2 % ipfw add 210 queue 11 ... % ipfw add 220 queue 12 ... -- Jeremie Le Hen < jeremie at le-hen dot org >< ttz at chchile dot org >