Community discussions

 
mshahid85
just joined
Topic Author
Posts: 11
Joined: Thu Mar 01, 2018 12:19 pm

Limit Bandwidth to Per IP

Tue Apr 09, 2019 1:48 pm

Hi,

i am using Mikrotik hEXA Lite Router. I have 20MB speed and almost 20 users in my office, now please read very carefully becoz no one is understanding my question, they mixed it up,
I WANT TO SET 1MB FOR EACH USER, I can do it with simple queue but it takes a lot of time, write one ip and set their bandwidth for each user, i wanna set this setting for all 20 users on one command, is there any possibility ??

One Command and each user will use 1MB Download and Upload, all users have their own 1MB speed at any time........


Regards,,,,

M.Shahid
 
veljakbc
just joined
Posts: 2
Joined: Wed Nov 07, 2018 9:52 pm

Re: Limit Bandwidth to Per IP

Tue Apr 09, 2019 2:15 pm

You can use some type of script that will work with dhcp server.

For example :
:local queueName "Client- $leaseActMAC";

:if ($leaseBound = "1") do={
/queue simple add name=$queueName target=($leaseActIP . "/32") max-limit=1M/1M comment=[/ip dhcp-server lease get [find where active-mac-address=$leaseActMAC && active-address=$leaseActIP] host-name];
} else={
/queue simple remove $queueName
}
This skript will automatiacly assign dinamic queue to each ip adress.
Last edited by veljakbc on Tue Apr 09, 2019 2:40 pm, edited 1 time in total.
 
mshahid85
just joined
Topic Author
Posts: 11
Joined: Thu Mar 01, 2018 12:19 pm

Re: Limit Bandwidth to Per IP

Tue Apr 09, 2019 2:30 pm

why script?? there is no any queue type method to set bandwidth limit in Mikrotik??? although it is already running in my Mikrotik but that is only manually assign IP and set for its limit. any other option?????????????
 
anav
Forum Guru
Forum Guru
Posts: 2894
Joined: Sun Feb 18, 2018 11:28 pm
Location: Nova Scotia, Canada

Re: Limit Bandwidth to Per IP

Tue Apr 09, 2019 8:21 pm

Queues are the method for BW limiting but there is another feature in the same vein and that is rate limiting (limiting the number of concurrent connections. This may very well do the job for you but unlike queues I believe if there is excess capacity (only one person on line) that person is still limited to the quota........ BUT tis a bulk quota, in other words, one rule hits all users like you want!!

/ip firewall filter
add chain=forward action=drop protocol=tcp in-interface=LAN connection-limit=100,32
In the connection-limit field the 100 number is the total connections, the 32 is the netmask, so with this you are applying a 100 connection limit to every IP on your LAN interface.

You may wish to do the same for UDP??
I'd rather manage rats than software. Follow my advice at your own risk! (Sob & mkx forced me to write that!)
 
mshahid85
just joined
Topic Author
Posts: 11
Joined: Thu Mar 01, 2018 12:19 pm

Re: Limit Bandwidth to Per IP

Wed Apr 10, 2019 9:25 am

it will effect only connection limit?? then what will i do for bandwidth limit???
 
mducharme
Trainer
Trainer
Posts: 788
Joined: Tue Jul 19, 2016 6:45 pm

Re: Limit Bandwidth to Per IP

Thu Apr 11, 2019 12:16 am

it will effect only connection limit?? then what will i do for bandwidth limit???
I think what you want is PCQ - please see: https://wiki.mikrotik.com/wiki/Manual:Q ... Q_Examples
 
mshahid85
just joined
Topic Author
Posts: 11
Joined: Thu Mar 01, 2018 12:19 pm

Re: Limit Bandwidth to Per IP

Mon Jul 29, 2019 12:31 pm

it will effect only connection limit?? then what will i do for bandwidth limit???
I think what you want is PCQ - please see: https://wiki.mikrotik.com/wiki/Manual:Q ... Q_Examples
its work for me. thanks a lot

Who is online

Users browsing this forum: No registered users and 35 guests