From owner-freebsd-ipfw@FreeBSD.ORG Wed Jan 5 21:10:01 2011 Return-Path: Delivered-To: freebsd-ipfw@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 09610106564A for ; Wed, 5 Jan 2011 21:10:01 +0000 (UTC) (envelope-from mike@magicislandtechnologies.com) Received: from mail.magicislandtechnologies.com (mail.magicislandtechnologies.com [74.208.96.3]) by mx1.freebsd.org (Postfix) with ESMTP id B76318FC08 for ; Wed, 5 Jan 2011 21:10:00 +0000 (UTC) Received: (qmail 28180 invoked from network); 6 Jan 2011 00:59:52 +0300 Received: from c-68-42-75-112.hsd1.mi.comcast.net (HELO ?192.168.0.103?) (68.42.75.112) by mail.magicislandtechnologies.com with SMTP; 6 Jan 2011 00:59:52 +0300 Message-ID: <4D24ED60.3030802@magicislandtechnologies.com> Date: Thu, 06 Jan 2011 01:14:56 +0300 From: Michael Spratt User-Agent: Thunderbird 2.0.0.22 (X11/20090605) MIME-Version: 1.0 To: freebsd-ipfw@freebsd.org References: <20110104145253.GB8235@onelab2.iet.unipi.it> <4D23A04A.3040107@magicislandtechnologies.com> In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: Freddie Cash , adrian@xenion.com.au, Douglas Lampi Subject: Re: soft-cap, 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: Wed, 05 Jan 2011 21:10:01 -0000 Freddie Cash wrote: > On Tue, Jan 4, 2011 at 2:33 PM, Michael Spratt > wrote: > >> Dear friends, linux/ipfw/dummynet/transparent-bridge, am trying to cap >> users to upload/TX rates, but allow them to go over if the link is not >> congested. >> >> The example below limits each src-ip mask-IP's TX from 10.10.0.0/20 to >> 128Kbp/s, and from 10.20.0.0/20 to 1024Kbp/s. >> ------------------------------------------------------------------------------------- >> ipfw pipe 1 config bw 128Kbit/s mask src-ip 0xffffffff >> ipfw pipe 2 config bw 1024Kbit/s mask src-ip 0xffffffff >> > Create 1 pipe of "1024+128" Kbps. > Then create 2 queues, one with weight 1 (the slow queue) and the other > with weight 8 (the fast queue). > That will guarantee that traffic sent through queue 1 gets at least > 128 Kbps of bandwidth, even when the pipe is full. And traffic sent > through queue 2 gets at least 1024 Kbps of bandwidth, even when the > pipe is full. > > >> ipfw 10001 add pipe 1 ip from 10.10.0.0/20 to any out xmit br0 >> ipfw 10001 add pipe 2 ip from 10.20.0.0/20 to any out xmit br0 >> *Dear Fr. & all, The size for my wan-uplink is 100Mb/s. Since the pipe rules are dynamic, realize there will be aprox 10K IP's for each hash table?, each subsription rate will have to have 2 tables, one for TX and one for RX. In the example pipe 1 has a dynamic src-ip mask and will limit everything from 10.10.0.0/20. I want to cap various groups of IP clients at 128/256/512/1024, but only when congestion starts to occur, if the link is not really full, I want each IP-client to receive the benifit of not being capped. IE start pulling BW from subscribers who are exceeding the assigned Does this make sense? is it possible? This maximizes benefit to all users at all times, and when bandwidth is not available it limits people to a specific level. Is it possible to do this without having multiple configurations and switching based on link usage levels? Thanks -Mike *