Quick Guide: How to limit bandwidth with BrazilFW

Several tutorials

Quick Guide: How to limit bandwidth with BrazilFW

Mensagempor Lelouch » Qua Nov 26, 2008 3:38 pm

Marcelo - Brazil on Thu Jan 03, 2008 11:21 am
Traduced by: rinrinrencuajo

Vea la version en español haciendo clic aquí.

Writted by André Simões.

You must be log in to BrazilFW Web Admin using any browser, then, select "QOS Configuration" option.
Into this page, select the "BrazilFW init scripts (manual class config)" option.
Input your real Upload rate and your real Download rate.
Then click on "Save" button.

Ok, then click on "Qos classes" option. This action opens a new page.
In the new page, please, delete all entries.
Then click on "Create a new Class: [ QOS Classes ]"; in this page you must input one class for each IP that you want will be limited. When the QoS is active, remember create rules for all network computers, of course, the IPs outside of QoS control, only have guarantee of 5% of bandwidth; this entry is defined as "junk" in the "QoS configuration" page, in the text field named "Default classes settings".

Select "Simple"
In the field called "Parent class ID", please you must input the value "1:1", without quotes. This class will always have the same value, 1:1.
In field "Class ID", please enter the value "1:10", without quotes. This class must have a different number for each IP that you wants to limit.
Ex: 1:10, 1:11, 1:12, 1:13.....

Download Rate: This mean the minimun rate guaranteed for each IP configured.
Ex: if you have 4 computers in your network, with a real bandwidth of 256 kbps, you must input 64 as valor (256/4), this allows divide the bandwidth in equally form between the 4 computers. In case that all computers is beginning downloads in a simultaneously form, each computer have as minimun 64kbps. This prevent that all bandwidth will use for computer only. But if only one computer is using the bandwidth, obviously this will receive all the bandwidth available, in this case 256kbps, or the value set in field "Download Ceil".

Download Ceil: Is the maximum rate for each IP established.
Ex: If you have a bandwidth of 256 kbps, and had established 128 as value for this field, for the IP 192.168.0.x, this computer, it never will be able surpass this speed, even if the throughout bandwidth real is available.

Upload rate y Upload Ceil: It means the same as the previous rule, but for Upload rates.

IP or Network: You must input the IP that you wants to limit following the stablished rules.
Comments: This field is optional, here you can input any data about the rule.
Ex: computadora 1, Pablo, emule, webserver......

Then click on "Submit" button.

Now, click on "Backup Now", to save the configuration in the BFW disk.
if is the first time that you active the QoS, or if you modify the "QoS init type", you must reboot BrazilFW, to do this you can use the "reboot" option.
If you modify any value, please, click on "Reload QoS" link.

-----------------------------------------------------------------------------------------------------------------------------------------------------------------
If you want, you can do this really easy:
Log in your BFW Webadmin
Then clic con "Configuration Files"
Click on Clic "QoS Classes"
A new window with text will be open, goto the end of the text.
The following text will be show:

Código: Selecionar todos
define_class_qos "1:1" "1:10" $COMP_DOWN $CLEAR_DOWNSTREAM $COMP_UP $CLEAR_UPSTREAM 192.168.0.10 #Example - With Filters

Código: Selecionar todos
define_class_sfq "1:1" "1:11" $COMP_DOWN $CLEAR_DOWNSTREAM $COMP_UP $CLEAR_UPSTREAM 192.168.0.11 #Exemple - Without Filters

Código: Selecionar todos
define_class_sfq "1:1" "1:12" 5 10 5 10 192.168.0.12 #Example - 5 Kbits Up/Down - Max 10 Kbits

Código: Selecionar todos
define_class_sfq "1:1" "1:13" 5 5 5 5 192.168.0.13 #Example - 5 Kits Up/Down - Max 5 Kbits


You must change the text with the folowing text, of course, according to their needs:

Código: Selecionar todos
define_class_sfq "1:1" "1:10" 190 300 208 300 192.168.0.x #Comp1

Código: Selecionar todos
define_class_qos "1:1" "1:11" 190 570 208 625 192.168.0.x #Comp2

Código: Selecionar todos
define_class_sfq "1:1" "1:12" 190 570 208 625 192.168.0.x #Comp3


Explanation about the code lines:

define_class_sfq -> Simple QoS Classes level 2, without filters
define_class_qos -> QoS Classes level 2, with filters
1:1 -> QoS Clase level 1 (main), must always have the same value
1:10, 1:11,.... -> Classes level 2, one for each IP
1st number -> Download Rate
2nd number -> Download Ceil
3rd number -> Upload Rate
4th number -> Upload Ceil
192.168.0.x -> IP number for the computer that you want will be limit
#Comp -> Coments


Then click on "OK" button
Ok, then click on "Backup Now" option, to save the new configuration in the BFW disk.
if is the first time that you active the QoS, or if you modify the "QoS init type", you must reboot BrazilFW, to do this you can use the "reboot" option.
If you modify any value, please, click on "Reload QoS" link.

André Simões.

---------------------------------------------------------------------------------------------------------------------------------------------------------------
You can also create a class to controll a completely specific subnet, to do this you must specify the IP acording to the form:

Código: Selecionar todos
192.168.1.0/24 192.168.2.0/24......


Claudio Roberto Cussuol.
---------------------------------------------------------------------------------------------------------------------------------------------------------------

NOTES:
If you want know your real rate of download and upload:
Connect only one computer to the network, stop all service that can use the internet conection, for example: antivirus, Windows update, even ICQ, MSN, AOL, everything.
Download any file, note that download must be exceed the 5 minuts this step is necesary to stabilize the speed.
Look and record the speed (transfer rate) then you can stop the download.
Example: If the transfer rate = 38 Kbps.
You must multiply this value by 8: 38 x 8 = 304
304 is the real rate of Download that you must be input in the QoS configuration page.
GNU/Linux addict, instead of Linux addict.
Sou, machigatteita no wa ore ja nai! Sekai no hou da!...
Sekai wa kawaru! Kaerareru...

Hangyaku no Rurūshu...

New scheme: BFW3(LB) - BFW3BridgeCache - ArgentoBridgeQoS
Avatar do usuário
Lelouch
BFW Beneméritos
 
Mensagens: 1324
Registrado em: Dom Out 05, 2008 7:39 pm
Localização: #!/bin/sh
BrazilFW Box: BrazilFW: RAM 3GB, ATHLON X2 5600+, HDD 160GB+120GB, LB: 2Mb+8Mb.
BFW3 BuildTree on GNU/Linux Archlinux 64 bits.

Voltar para Several tutorials

Quem está online

Usuários navegando neste fórum: Nenhum usuário registrado e 0 visitantes