Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 23 May 2005 19:02:51 +0300
From:      "Chris Dionissopoulos" <dionch@freemail.gr>
To:        <ovidiue@unixware.ro>, <freebsd-ipfw@freebsd.org>
Subject:   Re: QoS and guaranteed bandwidth
Message-ID:  <004901c55fb0$e1c93570$0100000a@R3B>
References:  <mailman.0.1116852154.15094.freebsd-ipfw@freebsd.org> <1116855133.4291db5d6eb55@webmail.unixware.ro>

next in thread | previous in thread | raw e-mail | index | archive | help
> Hello guys
> 
> What is the best sollution (and also simple) to guarantee a bandwidth?
> 
> For example if I have an 1024 kbps conection and i want to share
> this to 30 users and also guarantee 32 kbps to every user so if
> one of them is doing intense FTP the others to easely browse the
> net what should I use for that? I am looking for a solution like
> (and better then) HBT on Linux.
> 
> I've googled for a while but there are not so many resources on that.
> 
> Best Regards,
> ovidiu

> Hello guys
> 
> What is the best sollution (and also simple) to guarantee a bandwidth?
> 
> For example if I have an 1024 kbps conection and i want to share
> this to 30 users and also guarantee 32 kbps to every user so if
> one of them is doing intense FTP the others to easely browse the
> net what should I use for that? I am looking for a solution like
> (and better then) HBT on Linux.
> 
> I've googled for a while but there are not so many resources on that.
> 
> Best Regards,
> ovidiu

Hi, 

you can use dummynet (man ipfw, man dummynet)  to define the maximun 
bandwidth  and/or a WFQ priority  for each user.

Theoriticaly by assign a proper WFQ priority  to each user, you guarantee 
the  minimum {[User_Priority / Sum(user_priorities)] * Line_Bandwidth}  
to each of them.

In your case:

Calculate your priority
~~~~~~~~~~~~~~~~~
The rule says that the priority in WFQ is calculated if you divide your total  bandiwdth 
with the minimum allocated bandwidth to each user. So we have:
WFQ_User_Priority =  1024Kbps / 32Kbps = 32

**This gives at least  { 32 / (32 x 32 ) * 1024 } Kbps = 32Kbps to each user.

Assign to each user using ipfw pipes+queues
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
A very simple ipfw configuration:

ipfw pipe 1 config bw 1024Kbit/s queue 20Kbytes
ipfw queue 1 weight 32 mask src-ip 0xffffffff queue 10kbytes

ipfw add queue 1 ip from $YOUR_LAN_NET to any xmit $WAN_INTERFACE

I hope that this helps you a little.

Chris.

____________________________________________________________________
http://www.freemail.gr - δωρεάν υπηρεσία ηλεκτρονικού ταχυδρομείου.
http://www.freemail.gr - free email service for the Greek-speaking.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?004901c55fb0$e1c93570$0100000a>