Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 06 Jan 2011 01:14:56 +0300
From:      Michael Spratt <mike@magicislandtechnologies.com>
To:        freebsd-ipfw@freebsd.org
Cc:        Freddie Cash <fjwcash@gmail.com>, adrian@xenion.com.au, Douglas Lampi <doug@magicislandtechnologies.com>
Subject:   Re: soft-cap,
Message-ID:  <4D24ED60.3030802@magicislandtechnologies.com>
In-Reply-To: <AANLkTinjViTOA0tVbw_tAiEMMPkLj5Hy44GmR6r0cWuw@mail.gmail.com>
References:  <AANLkTinHW9wOyf1woxGLMurEsF=Yk3M8wt7%2BFM-C_9ya@mail.gmail.com>	<20110104145253.GB8235@onelab2.iet.unipi.it>	<4D23A04A.3040107@magicislandtechnologies.com> <AANLkTinjViTOA0tVbw_tAiEMMPkLj5Hy44GmR6r0cWuw@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
Freddie Cash wrote:
> On Tue, Jan 4, 2011 at 2:33 PM, Michael Spratt
> <mike@magicislandtechnologies.com> 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

* 






Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4D24ED60.3030802>