Posted: Mon Aug 14, 2023 18:33 Post subject: QoS and Limiting Bandwidth
I attempted to search for the answer to this but found conflicting info. Basically, I'm trying to limit a device connected to my router via Ethernet to a maximum upload/download speed. I'm hoping to end up doing so via MAC address, but I've also tried by IP address, and per user limits as well all without any success.
My first question is under the QoS tab, do the uppermost "Downlink (kbps)" and "Uplink (kbps)" values (of which you're supposed to enter approximately 85% of your actual bandwidth) do any limiting?
Or, are they there only to calculate the limiting percentages in some of the categories further down the QoS page? Meaning, as a hypothetical, say my bandwidth is 5,000 kbps up/down, but I enter 1,000 kbps in these boxes. Is dd-wrt supposed to limit everything down to 1,000 kpbs. It appears to me that some users are having this happen, but I'm certainly not. If I enter any value (doesn't matter what it is) then do a speed test, I get 25,000+ bps.
For the next example, say I enter 5,000 kpbs in both of these uppermost boxes, then set a IP mask, or MAC, or whatever priority further down the screen to 500k (not a typo, approx 0.5 Mbit) up/down, should it not limit the connection to 500k bps? Or is this designed so that it will only limit if the bandwidth is being taxed and there's not enough to go around?
This is my explanation of DD-WRT QoS to my friends when asked.
Imagine that milk (i.e. bandwidth) from a factory's container located on the top floor is distributed, using gravity, to various machines located from level #1 (highest) to the bottom level #8 in the factory.
Milk is distributed each time to machine #1 (i.e. first priority) first, then machine #2 (second priority), then #3 and so on, till the last one (machine #8 ) which has no priority. If milk is used all up along the way, then no more milk is left for machine # 8. It would then have to wait till the next delivery, if there is any then. Any milk left over AFTER machine #8, is discarded and can not be re-used.
Now, a machine with first priority only uses as much milk as required depending of what type of cheese it's making at the time. The container has a volume of milk estimated to be sufficient for hourly operations. Sometimes, milk delivery may be actually less by 10% to 15% due to handling leakage.
In order to maintain a consistent production, cheese output is only based on 85% to 90% of milk availability.
Thanks for the response. So, I believe what you are saying is that I can't limit bandwidth in the manner I would like. For instance, if I have say 25 Mbit service and I want to only allow a device to use 3 Mbit of it, I can't do that with dd-wrt. Is this correct?
NO. DD-WRT does allow a Service (of any other target of QoS) to have a max. limit manually set by you.
But, as Per Yngve Berg said, it depends on:
a - The amount of bandwidth (i.e. milk) left over when it reaches the target of your limit of 3mbps.
b - Condition (a) above, in turns, largely depends on how many targets in each category of higher priority are presently consuming bandwidth. In order of priority, namely:
(1st) MAC Priority
(2nd) Netmask Priority
(3rd) Interface Priority
(4th) Services Priority
(5th) Ethernet Port Priority
My metaphor is not an exact model. Some overheads will occur so a decent router with sufficient grunt is needed for performance reason. Cheers.
Ok, so let me ask it this way. If I want to always limit a device to a max bandwidth of 3Mbps regardless of how much bandwidth is currently available, is it possible? If so, I must be doing something wrong because I can't get it to limit it.
This just came up again, because separate from my needs, a friend installed an access point in his office to provide free internet to people waiting in the lobby (adjacent room). Every now and then there were numerous people streaming large videos (or doing whatever) which consumed a large amount of bandwidth which ate into his office bandwidth (the priority since his office is trying to do work and he's providing an extra free service to those in the lobby out of kindness). Anyway, he was asking if he could limit the AP to 30 Mbps at all times. I explained my experience was that dd-wrt won't do what he's asking but said I would try to set it up for him.
I did, and got the same results (which basically was that there was no limiting because there was spare bandwidth available). We solved the problem by swapping out the AP for a dedicated AP that had a limiting feature built into it's firmware and it worked perfectly sans dd-wrt. In the end, we switched it from limiting itself (the AP) as a whole to per user (which I also unsuccessfully attempted with dd-wrt) giving them 6 Mbps each which should be plenty for any one connection to do to anything normal while waiting and still guarantee that his office has plenty available for them.
Once we did this we could connect and run a speed test and sure enough it would max out at 6 Mbps. If there is some way to do this with dd-wrt kindly advise, because I tried everything I saw in the NAT/QoS and couldn't ever get a limit.