Bandwidth/Traffic quota

Bandwidth/Traffic quota

Post by P?r » Tue, 01 Apr 2003 22:06:03



Is there any software that can handle a userbased traffic/bandwidth
quota? I know dummynet can manage bandwidth on a user basis but what
about setting limits on total traffic on an interface, both soft and
hard? (as in disk quota)

/P?r

 
 
 

Bandwidth/Traffic quota

Post by Michael Sierchi » Wed, 02 Apr 2003 00:03:58



> Is there any software that can handle a userbased traffic/bandwidth
> quota? I know dummynet can manage bandwidth on a user basis but what
> about setting limits on total traffic on an interface, both soft and
> hard? (as in disk quota)

If the user is on the machine, yes, you can have a rule that matches
all packets sent from or to a user.  Otherwise, you could have a
count rule for each desktop machine, for example, or subnet, etc.

with 'ipfw show' you get a rule listing that includes the number
of packets and octets passed by the rule.  I think you can take
it from there (ipfw delete rule-that-passes traffic, etc.)

If you wanted to be fancy, you could degrade the service for
a user/host as it approached the limit.

 
 
 

Bandwidth/Traffic quota

Post by P?r » Wed, 02 Apr 2003 18:05:54


I made a perl script that configures pipes depending on the traffic
going through the pipe. The config file for the script look like this.
The pipe must be created in advanced.

## Traffic quota
#
#
#
# Format:
#pipeid:standard bandwidth limit(Kbit/s):traffic soft
limit(gig):bandwidth soft limit(Kbit/s):traffic hard
limit(gig):bandwidth hard limit(Kbit/s)
#
# Example:
#1:2500:10:512:12:56
#
# This would set an initial bandwidth limit to 2.5Mbit/s until
# the pipe with id 1 reaches 10Gig. After 10gig the soft limit
# bandwith kicks in and sets the bandwidth limit to 512Kbit/s.
# When the pipe reaches to 12 gig the hard limit overwrites the
# soft and the bandwidth is limited to 56Kbit/s.
#
# Start
1:2500:10:512:12:56
2:2500:10:512:12:56
3:2500:10:512:12:56

Its pretty neat.

/P?r



>> Is there any software that can handle a userbased traffic/bandwidth
>> quota? I know dummynet can manage bandwidth on a user basis but what
>> about setting limits on total traffic on an interface, both soft and
>> hard? (as in disk quota)

> If the user is on the machine, yes, you can have a rule that matches
> all packets sent from or to a user.  Otherwise, you could have a
> count rule for each desktop machine, for example, or subnet, etc.

> with 'ipfw show' you get a rule listing that includes the number
> of packets and octets passed by the rule.  I think you can take
> it from there (ipfw delete rule-that-passes traffic, etc.)

> If you wanted to be fancy, you could degrade the service for
> a user/host as it approached the limit.

 
 
 

Bandwidth/Traffic quota

Post by Ralph Huntingto » Wed, 02 Apr 2003 20:02:39


I made a perl script that configures pipes depending on the
traffic
going through the pipe. The config file for the script look
like this.
The pipe must be created in advanced.

So, will you share the script with us?

 
 
 

Bandwidth/Traffic quota

Post by Andrey Simonenk » Wed, 02 Apr 2003 20:32:32



> Is there any software that can handle a userbased traffic/bandwidth
> quota? I know dummynet can manage bandwidth on a user basis but what
> about setting limits on total traffic on an interface, both soft and
> hard? (as in disk quota)

ports/sysutils/ipa from ports collection can do this with
its "limit" sections.
 
 
 

Bandwidth/Traffic quota

Post by Erik Nygre » Wed, 02 Apr 2003 22:09:57



> I made a perl script that configures pipes depending on the
> traffic
> going through the pipe. The config file for the script look
> like this.
> The pipe must be created in advanced.

> So, will you share the script with us?

He did :)
If that part of the article didn't reach you, or Outlook decided that
you was not interested of that part anyhow, look it up on google groups
and you will find quite a lot more text in that post than what you saw
in Outlook Express :-)

--
Erik Nygren
e r i k { a t } s w i p { d o t } n e t
Linux - If you hate Microsoft, FreeBSD - If you love Unix

 
 
 

Bandwidth/Traffic quota

Post by P?r » Wed, 02 Apr 2003 22:32:33


Actually I didnt, only the config file. Im still working on the
perlscript. Ill post it when Im finished :)

/P?r



>>I made a perl script that configures pipes depending on the
>>traffic
>>going through the pipe. The config file for the script look
>>like this.
>>The pipe must be created in advanced.

>>So, will you share the script with us?

> He did :)
> If that part of the article didn't reach you, or Outlook decided that
> you was not interested of that part anyhow, look it up on google groups
> and you will find quite a lot more text in that post than what you saw
> in Outlook Express :-)