I am trying to implement bandwidth limitation on subscribers to a WISP. I am trying to “guarantee” each “standard” user (192.168.3.128-254) a download speed of 1Mb, and each “premium” user (192.168.3.64-127) a download speed of 1.5Mb, while allowing them to run slightly faster than that if extra bandwidth if available, and allowing them to degrade equally if all together they overload the total WAN bandwidth. I understood that the following configuration commands would do this:
However, the behavior I am seeing suggests that I may have established a 1Mb/sec “pool” which all standard users are sharing, such that if two people are active simultaneously, they get only 512Kb each. That was not my intent. I wanted each user to get 1Mb or 1.5Mb, respectively.
Can someone suggest how I could fix this configuration to make it do what I want? I have studied the queueing documentation in two generations of manuals and find the explanations simply impenetrable. Thanks.
The limits you have secified are for that one queue, doesn’t matter if you specifie a subnet
or a single IP. Those limits will be applied on that queue.
In order to get the limits for each client you have to increase those limits
to the multiple of the number of clients for each subnet.
For example, if you have 10 users on the subnet 192.168.3.128/25 the queue should be sth like:
But that assumes all my subscribers are working continuously all the time – otherwise, when nine subscribers are idle, the remaining one will be able to suck up the entire bandwidth. This is not the operation I want, either. How could one arrange to get the operation I want as I have described it; that is, each user is individually guaranteed 1Mb, and can take advantage of unused bandwidth but only up to a max of 1.3Mb?
You cannot do that with simple queues without creating one queue per user. Use PCQ instead. The wiki and presentation slides from MUM have many examples.
All right, fair enough, I guess I will search for those writeups.
One further question. There is a “rate limit” field in /ip dhcp-server lease. It seems to correspond exactly to the mechanism I want, in the DHCP case, at least – limit each user independently to a certain max bandwidth, not limit an entire class of users to share the same bandwidth. Is this true, or am I misleading myself again?
I am not aware of the feature you mention in the dhcp server, but I think it will
still create a simple queue.
There is one problem with the queues, the more they are, the more latency you will have.
Every packet will have to pass one queue after another, although it could match itself
in the very first one, so try to keep quantity of queues as low as possible.