How Limit Bandwidth

i'm new with openwrt today install in TP-Link mr3420
i want make custom limit Bandwidth
my network it's "ADSL"
download : 15mb
upload: 1.5mb
Bandwidth monthly: it's just 250GB.!
now i want from openwrt help me
first thing i want limit speed
download : 2mb if i use torrent or download manager .. etc ==> transfer rate 230 kb/sec
upload : 1mb
i use sqm but not working 100% i just add download 2000 and upload 2000
if add download 240 it's give me just 50kb.!
i don't understand how it's work
now i want limit download : 2mb and upload :1mb ok .?

and i want limit by day "24" hours
if today we usage 8GB make more limit like this
download: 1mb
upload: 0.5 mb
and next day back to normal mode
download : 2mb
upldaod: 1mb
please if you can help me step by step like copy and past :slight_smile:
and sorry my English not good

very simple to do on most clients... including time based limits, running a separate counter for just this class of traffic on the router would be very difficult... and burdensome on any underpowered device.

if you mean "download quota is for all-traffic" then there are options...

don't do this > ~97% of your actual peak speed +/- overhead

as for the daily totals...

  • are you happy with global values ( one counter for all traffic and not per client? )

  • are you comfortable with manual config ( linux, editing files, etc. )? or did you need a "gui - friendly" option only?

torrent or download manger it's just example
i want all user use 230 kb/s
yes all traffic just use 230 kb/s not more because we have limit bandwidth [250 GB] every month
please see this image
are you happy with global values ( one counter for all traffic and not per client? )
yes for all

are you comfortable with manual config ( linux, editing files, etc. )? or did you need a "gui - friendly" option only?
yes not problem i can use editor vi

thank you

so you want your speed to be capped at 230kb... ( shared amongst all at the start of the month )?

that will get you close to dial-up or less... maybe re-think what you really want... or try to explain it again.

In the meantime... here is easy an option ( rate limit - without caps ) for you to try first... actual configuration will vary on release ... and you don't need NDS... just SQM facing the clients ( and a router with the beef to handle it )

when/if your confident you can add NDS ( auto auth ) and test the various options it provides... as a solution... it's very good but requires advanced config for long-term counters / aggregated logic ( enforcing limits based on "all" usage is not it's forte out of the box )

I suggest a daily quota rather than a speed cap. Each day allow up to about 7GB and then shut off the pipe. You can Google for how to set up quotas in iptables, nftables is even better but not the standard for openwrt.

Not sure if you need a particular kernel module.


thank you wulfy for reply
sorry not explain
230 kb/s this 2mb
i give you example from idm
i change download speed to 230 kb/s this equal 2mb

now if try download this just use 230kb/s

i try test speed like this

it's 14 mbps i want access point just use 2mbps
SQM not work correct with me .!
how make access point just see 2mbps ?
if i add 230kb/s like idm it's not work

thank you dlakelan
ok not problem 7GB every day for speed 2mbps if use all 7GB down speed to 1mbps
this internet for home and i don't use iptables before :slight_smile:
i don't have time to read book how firewall work .. just want easy step to make this

Okay, I will not be able to help you with your main goal, but I can help to get sqm properly configured for any static limit:

That is ambiguous, 'b' stands for bit while 'B' stands for byte, you write 230 kilobit per second, but I believe your target is kilobyte per second, no?

So 230kBps -> 230 * 8 = 1840 kbps

since sqm configuration rates are in kbps you can plug this into /etc/config/sqm immediately. But please be aware, that traffic shapers need to know both the gross traffic rate as well as the per-packet-overhead to work correctly. And that the net speed (which is the payload rate, ignoring that each packet also carries a noticeable number of header bytes that need to be transported as well and eat up transmission time) you will measure with a speedtest will always be smaller than the setting of the shaper.

Configuring your download-client alone will obviously not throttle flows not being handled by that client. You will need to configure SQM appropriately as well.

1 Like

thank you moeller :slight_smile:
lt's work just add 1840

i want ask for limit by day if use 7GB make speed download from 1840 to 920
and next day back to speed download 1840
i use SQM GUI
if you have any script make this ==>count every day if use 7GB go SQM and edit Download Speed From 1840 to 920 and upload 920
next day edit SQM Download 1840 and upload 1840
i hope found like this script
thank you :slight_smile: