Community discussions

MikroTik App
 
t3q
just joined
Topic Author
Posts: 3
Joined: Fri Jan 22, 2021 7:33 am

Fair bandwidth distribution

Fri Jan 22, 2021 7:49 am

Hi! I am trying to configure something which seems to be very basic, but I can't find a way to do it.
I have an uplink of, say, 10Mb, and about 20 clients, and I want to "fairly" distribute the uplink bandwidth between the users. I don't really care about the traffic inside the local network. My view of this is: I want to "guarantee" each user a bandwidth of 512Kb, but if a user is not using it, its bandwidth shall be allocated to whomever can use it, ideally evenly. For the matter of discussion let's concentrate on download, but upload shall be configured identically.

The closest I found so far is to create a PCQ queue for all traffic from LAN to WAN with limit-at=512k, perhaps being a child of a queue with max-limit=10Mb, although unsure if this parent is needed (I can't go above 10Mb anyway, right?), but this would allocate 512Kb to every device, even if it is idle, or am I understanding this wrong? Moreover, if I get 21 clients, then in my understandign there are two options: if I have the parent queue with max-limit=100Mb, it doesn't get anything at all, otherwise it unpredictably fights with the others for the traffic. Can this be avoided?

Or am I overcompicating and this is the default behavior and I do not need to configure anything?

Thanks.
 
t3q
just joined
Topic Author
Posts: 3
Joined: Fri Jan 22, 2021 7:33 am

Re: Fair bandwidth distribution

Fri Jan 29, 2021 5:12 am

Or perhaps I understand pcq-rate wrong? According to the description in the wiki, if pcq-rate is set to 10Mb, then if 10 clients are connected, each of them will be limited to 1Mb, even if only one of them is using the bandwidth and all others are idle. Is this correct?
 
User avatar
16again
Frequent Visitor
Frequent Visitor
Posts: 78
Joined: Fri Dec 29, 2017 12:23 pm

Re: Fair bandwidth distribution

Sat Jan 30, 2021 12:11 am

Then set max-limit to 10Mb (or just below it), and pcq-rate to 0
This limits total combined to 10Mb. A single client can get full speed, but when multiple clients content for BW, each get their own fair share.