From owner-freebsd-questions@FreeBSD.ORG Mon Aug 29 16:33:57 2005 Return-Path: X-Original-To: freebsd-questions@freebsd.org Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 3664616A41F; Mon, 29 Aug 2005 16:33:57 +0000 (GMT) (envelope-from tataz@tataz.chchile.org) Received: from postfix4-2.free.fr (postfix4-2.free.fr [213.228.0.176]) by mx1.FreeBSD.org (Postfix) with ESMTP id A74C443D46; Mon, 29 Aug 2005 16:33:56 +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 postfix4-2.free.fr (Postfix) with ESMTP id 40FB732345B; Mon, 29 Aug 2005 18:33:55 +0200 (CEST) Received: by tatooine.tataz.chchile.org (Postfix, from userid 1000) id DE832405A; Mon, 29 Aug 2005 18:34:14 +0200 (CEST) Date: Mon, 29 Aug 2005 18:34:14 +0200 From: Jeremie Le Hen To: vladone Message-ID: <20050829163414.GO659@obiwan.tataz.chchile.org> References: <1752667837.20050829001929@spaingsm.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1752667837.20050829001929@spaingsm.com> User-Agent: Mutt/1.5.9i Cc: freebsd-ipfw@freebsd.org, freebsd-questions@freebsd.org Subject: Re: challenge with dummynet+ipfw X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Aug 2005 16:33:57 -0000 Hi, [ please try to avoid cross-posting on FreeBSD lists ] > I want to organize my bandwith in this mode > # download section > 1000kbit/s > | > | > |--------------------| > | | > | | > hight low > priorized traffic priorized > | | > 512kbit/s | > | | > user |---------------| > share same | | > bandwith | | > 300 kbit/s 512kbit/s > | | > | | > | | > users share users share > same bandwith same bandwith > > I want to use ipfw+dummynet. Solutions is to pass traffic that match > an rule to multiple pipe or queue with different weights. But how? > What is the precedence? (need sysctl net.inet.ip.fw.one_pass=0) > If any have an solutions please be explicity. I dont want to be easy, > but is significant in this case, in wich order apply rule, and how is > configured pipe and queue. For this reason, solutions please put in this form (example): > > #section pipe and queue configuration > ipfw pipe 1 config ..... > ipfw queue 8 config weight 3 pipe 6 .... > .................. > > #section ipfw rules > ipfw add pipe 1 {match hight pri.} > ipfw add pipe 5 {match low pri. 300k same bandwith} > ipfw add queue 3 {match for hight pri. 512k same share} > ............................... > > I work for a time with dummynet. In this > example have an important to build some hierarchy with dummy. > > P.S. this scheme is not changeable. Please refer to this situation. Note that queue's weight do not implement priorities. The rule is quite simple : sum up all weight of all queues connected to one pipe and then each queue will be assigned the following bandwidth : queuebw = totalbw * queueweight / totalweight ALTQ does prioritize the traffic. This means that packets with high priority are placed before lower prioritized packets in the device output FIFO. Regards, -- Jeremie Le Hen < jeremie at le-hen dot org >< ttz at chchile dot org >