Hello ı am using mikrotik but ı just cant get my clients to get desired speed. I have total of 120 Megabytes coming in but when ı try to tunnel it to students with speed limit being 2 . Some get 7 from time to time while some may even get none . I am using unify access point to broadband it but ı just couldnt find a solution to give everyone 70 megabytes. Can someone help me with that ?
I’d say set up a single PCQ queue that is limited to 70Mbps and don’t put any restrictions on the sub-queues. This shares the bandwidth evenly between all clients and allows someone to use more bandwidth if it is available.
Also - you can rate-limit the clients themselves in the Unifi system (if I recall correctly)
Thanks for your answer but maybe ı couldnt explain myself clearly , İt is a student dorm that has 400 students ı am gettıng 120 mpbs from my ınternet provider , ı got mikrotik and ı tried to give all the computers speed restriction of 2mpbs and they login through hotspot with their id numbers ( we have to monitor the activities) my problem is that when students log in not only yhey cant get the desired speed of 2mpbs sometimes they even get more or less and even though not all students are coneected ı cant get my total of 120 through my system and what ı get is drastically less than 120. I tried to understand your suggestion but do you mean ı should log every ıd to single que or not can you help me ?
PCQ = per-connection queue.
This is a queue that automatically divides its bandwidth up evenly between every traffic flow it sees. So if there are two flows, then they both get 50% of the bandwidth. If there are 3 flows, they each get 1/3, and so forth. This is very dynamic - if one of the three flows stops for a moment (but stays open) then for that period, the other two flows get 50/50 until the third flow resumes and they’re all reduced to 33:33:33…
You can also put limits on the sub-flows if you choose, but I am of the belief that users should get to use bandwidth if it’s available and nobody else is requesting it.
When you configure the pcq type, you specify how it determines what a flow is - should it use the source IP? The destination IP? Both? The src/dst port numbers?
If you include port numbers, then each individual traffic flow gets its own equal share of the queue - where if you only use the IP address, then each HOST gets its own share of the queue - which is pretty much what you want to do. Typically, you make two pcq types: pcq-upstream and pcq-downstream. This is so that you can specify the SOURCE address as the distinguisher for upstream traffic (it comes FROM user X - so it’s X’s upload) and you specify the DESTINATION address on the pcq-downstream type (because it’s being downloaded TO that host)
You can get away without specifying any of the sub-queue limitations if you just want to divide the bandwidth up between however many people are attempting to use it. If you specify a 1m limit on the sub-queue in your “pcq-up / pcq-down” types, then no individual flow may exceed that amount at any time.
The total bandwidth-to-be-shared is defined on the queue itself - when you create the simple queue, you specify the upstream type as pcq-up and the downstream type as pcq-down. (clever, eh?) and then you specify the queue’s total bandwidth on the queue’s own limits (max-limit, etc) - this value is the one which is divided equally between the active sub-queues.
You would set the target of the queue to be the IP range of your student LAN. This will have the queue sitting at the global HTB watching for packets to/from the student IP address range, and snagging all such packets and subjecting them to the rules I just stated.