Hotspot Up and Download Rate Calculator
This Calculator calculated Advanced Bandwidth Use for You
The Calculater Calculate, display the Result and auto setup the hotspot-user-profile for you
DO NOT USE WHEN YOU WORK WHITH SPEEDS LESS THAN 400 kb/ps
RouterOS v.6.33rc37
{
set your Hotspot User Profile Name which you will use to work here
:global upn “default”;
:global code “$upn”;
:foreach i in=[/ip hotspot user profile find where name=“$code” ] do={
set your Contract Download Bandwidth here, only Numbers, kb/ps
:local cdb “400”;
set how much Percent from Download your Upload will be
:local up “25”;
set how much Percent more than Contracted Bandwidth your Client can reach, 1% → 100% Recomendet is max of 50%
the Burst Value, maximal upload/download data rate which can be reached while the burst is allowed
:local burst “30”;
set the Value burst-threshold in Percent less than Contracted Bandwidh, Recommended is 10% → 50%
burst-threshold - this is value of burst on/off switch
:local thre “30”;
set the Value burst-time here, allowed 1-60 seconds, Recomended 10 seconds
:local time “10”;
set the Priority here allowed Value 1-8, Recomended Value= 8, smaller Value causes more Cpu Usage
:local prt “8”;
set how much Percent is your guaranted Bandwidth, Recomended is 25% - 80%, get Information from your ISP
:local guaranty “50”;
DO NOT CHANGE ANY VALUES BELOW
:local ca [($cdb / 100)];
:local cb [($ca*$up)];
:local cc [($cdb / 100)];
:local cd [($cc*$burst)];
:local ce [($cd+$cdb)];
:local cf [($cb / 100)];
:local cg [($cf*$burst)];
:local ch [($cg+$cb)];
:local ci [($cf*$thre)];
:local cj [($cb-$ci)];
:local ck [($cc*$thre)];
:local cl [($cdb-$ck)];
:local cm [($cb / 100)];
:local cn [($cm*$guaranty)];
:local co [($ca*$guaranty)];
:local crl [/ip hotspot user profile get $i rate-limit ];
:put (“The current Rate Limit from → $code is → $crl”);
:put (“New Calculated Rate Limit from → $code is → " . “$cb” . “k” . “/” . “$cdb” . “k” . " " . “$ch”
. “k” . “/” . “$ce” . “k” . " " . “$cj” . “k” . “/” . “$cl” . “k” . " " . “$time” . “/” . “$time” . " " . “$prt”
. " " . “$cn” . “/” . “$co”);
/ip hotspot user profile set [ find name=”$code" ] rate-limit=(“$cb” . “k” . “/” . “$cdb” . “k” . " " . “$ch”
. “k” . “/” . “$ce” . “k” . " " . “$cj” . “k” . “/” . “$cl” . “k” . " " . “$time” . “/” . “$time” . " " . “$prt”
. " " . “$cn” . “/” . “$co”);
}
}
![]()
\
Up and Download Rate Calculator
Para os Brasileiros
Não use esta Calculadora abaixo de 400 kb/ps
O Calculated Rate Limit só Copiar e Colar no Hotspot User Profile ou in Queue
{
set your Contract Download Bandwidth here, only Numbers, kb/ps
:local cdb “400”;
set how much Percent from Download your Upload will be
:local up “25”;
set how much Percent more than Contracted Bandwidth your Client can reach, 1% → 100% Recomendet is max of 50%
the Burst Value, maximal upload/download data rate which can be reached while the burst is allowed
:local burst “50”;
set the Value burst-threshold in Percent less than Contracted Bandwidh, Recommended is 10% → 50%
burst-threshold - this is value of burst on/off switch
:local thre “25”;
set the Value burst-time here, allowed 1-60 seconds, Recomended 10 seconds
:local time “10”;
set the Priority here allowed Value 1-8, Recomended Value= 8, smaller Value causes more Cpu Usage
:local prt “8”;
set how much Percent is your guaranted Bandwidth, Recomended is 25% - 80%, get Information from your ISP
:local guaranty “75”;
DO NOT CHANGE ANY VALUES BELOW
:local ca [($cdb / 100)];
:local cb [($ca*$up)];
:local cc [($cdb / 100)];
:local cd [($cc*$burst)];
:local ce [($cd+$cdb)];
:local cf [($cb / 100)];
:local cg [($cf*$burst)];
:local ch [($cg+$cb)];
:local ci [($cf*$thre)];
:local cj [($cb-$ci)];
:local ck [($cc*$thre)];
:local cl [($cdb-$ck)];
:local cm [($cb / 100)];
:local cn [($cm*$guaranty)];
:local co [($ca*$guaranty)];
:put ("Calculated Rate Limit is → " . “$cb” . “k” . “/” . “$cdb” . “k” . " " . “$ch”
. “k” . “/” . “$ce” . “k” . " " . “$cj” . “k” . “/” . “$cl” . “k” . " " . “$time” . “/” . “$time” . " " . “$prt”
. " " . “$cn” . “/” . “$co”);
:put (“Upload do Contrato Calculado → $cb kb/ps”);
:put (“Download do Contrato → $cdb kb/ps”);
:put (“Bico Maximo do Upload → $ch kb/ps”);
:put (“Bico Maximo do Download → $ce kb/ps”);
:put (“Media do Bico do Upload → $cj kb/ps”);
:put (“Media do Bico do Download → $cl kb/ps”);
:put (“Tempo do Bico em Segundos → $time”);
:put (“Garantia do Upload no minimo → $cn kb/ps”);
:put (“Garantia do Download no minimo $co kb/ps”);
}
this auto create queue-simple
RouterOS v.6.33rc37 03/11/2015
Up and Download Rate Calculator
To use with the New Terminal
Para usar com o New Terminal Console do Mikrotik
Para os Brasileiros
Não use esta Calculadora abaixo de 400 kb/ps
O Calculated Rate Limit só Copiar e Colar no Hotspot User Profile
{
set Target Address for simple queue here
coloque aqui o Endereço do Alvo da queue-simple
:local ip “192.168.0.254/32”;
set comment for queue simple here
coloque aqui o Commentário da queue-simple
:local com “test”;
set your desired queue simple Name here
coloque o Nome da queue simple aqui
:local name “test queue”;
set your Contract Download Bandwidth here, only Numbers, do not use less than 300 kb/ps, required format is kb/ps
coloque a Veloçidade de Download do Contrato Cliente aqui, escreve em kb/ps, não use menos de 300 kb/ps, vai da error
:local cdb “400”;
set how much Percent from Download your Upload will be
coloque aqui quantos % baseado no Download ceria o Upload
:local up “40”;
set how much Percent more than Contracted Bandwidth your Client can reach, 1% → 100% Recomendet is max of 50%
the Burst Value, maximal upload/download data rate which can be reached while the burst is allowed
coloque aqui o bico maximo em %, a Velocidade a qual o Cliente chegara por algums segundos
:local burst “50”;
set the Value burst-threshold in Percent less than Contracted Bandwidh, Recommended is 10% → 50%
burst-threshold - this is value of burst on/off switch
coloque aqui a média do bico da Velocidade, Recomendado e de 10 a 50%
:local thre “25”;
set the Value burst-time here, allowed 1-60 seconds, Recomended 10 seconds
coloque aqui o tempo em segundos do bico, Recomendado 10 segundos
:local time “10”;
set the Priority here allowed Value 1-8, Recomended Value= 8, smaller Value causes more Cpu Usage
coloque aqui a Prioridade, Valores entre 1 é 8, Valor Recomendado= 8, Cuidado se da Prioridade de mais vai dar muito CPU Consumo, Numero maiór menos Prioridade
:local prt “8”;
set how much Percent is your guaranted Bandwidth, Recomended is 25% - 80%, get Information from your ISP
coloque aqui a Velocidade minima qual Você pode garantir com certeza
:local guaranty “75”;
DO NOT CHANGE ANY VALUES BELOW
:local ca [($cdb / 100)];
:local cb [($ca*$up)];
:local cc [($cdb / 100)];
:local cd [($cc*$burst)];
:local ce [($cd+$cdb)];
:local cf [($cb / 100)];
:local cg [($cf*$burst)];
:local ch [($cg+$cb)];
:local ci [($cf*$thre)];
:local cj [($cb-$ci)];
:local ck [($cc*$thre)];
:local cl [($cdb-$ck)];
:local cm [($cb / 100)];
:local cn [($cm*$guaranty)];
:local co [($ca*$guaranty)];
:put ("Calculated Rate Limit is → " . “$cb” . “k” . “/” . “$cdb” . “k” . " " . “$ch”
. “k” . “/” . “$ce” . “k” . " " . “$cj” . “k” . “/” . “$cl” . “k” . " " . “$time” . “/” . “$time” . " " . “$prt”
. " " . “$cn” . “/” . “$co”);
:put (“Upload do Contrato Calculado → $cb kb/ps”);
:put (“Download do Contrato → $cdb kb/ps”);
:put (“Bico Maximo do Upload → $ch kb/ps”);
:put (“Bico Maximo do Download → $ce kb/ps”);
:put (“Media do Bico do Upload → $cj kb/ps”);
:put (“Media do Bico do Download → $cl kb/ps”);
:put (“Tempo do Bico em Segundos → $time”);
:put (“Garantia do Upload no minimo → $cn kb/ps”);
:put (“Garantia do Download no minimo $co kb/ps”);
if you wish to use the auto queue setup remove the next three # simbols Below, if no you only use the calc feature
Se Você quiser usar o Criador automatico de queus-simple apénas remover os trés Simbolos # em baixo, se não só use a Calculadora
#/queue simple
#add burst-limit=(“$ch” . “k” . “/” . “$ce” . “k”) burst-threshold=(“$cj” . “k” . “/” . “$cl” . “k”) burst-time=(“$time” . “s” . “/” . “$time” . “s”)
#comment=“$com” limit-at=(“$cn” . “k” . “/” . “$co” . “k”) max-limit=(“$cb” . “k” . “/” . “$cdb” . “k”) name=“$name” target=“$ip”
}