tch-nginx-gui icon indicating copy to clipboard operation
tch-nginx-gui copied to clipboard

DGA4130 - Download/Upload speed limit (solution)

Open gamerover98 opened this issue 3 years ago • 6 comments

Modem type: DGA4130 GUI version: 9.6.92-29c5b4ed

Solution

https://github.com/Ansuel/tch-nginx-gui/issues/1151#issuecomment-1221565400

Request

Including a way to limit down/up Mbps speed for each device would be helpful.

My current situation

A television fills the bandwidth while playing films or live TVs and makes it impossible to play online video games due to the high ping. Impossible to set the max bandwidth from these applications.

gamerover98 avatar Aug 15 '22 21:08 gamerover98

https://github.com/xMase/Traffic-Shaping-DGA4132

PS. Settings QoS is better than limiting bandwidth.

FrancYescO avatar Aug 18 '22 10:08 FrancYescO

https://github.com/xMase/Traffic-Shaping-DGA4132

Thank you for your response, but does it work on DGA4130?

PS. Settings QoS is better than limiting bandwidth.

I don't know how to use QoS on this UI. Do you know how to do that? Thank you!

gamerover98 avatar Aug 18 '22 10:08 gamerover98

Install the LuCI WebGUI and install SQM from there, then set it up and you're good to go. Cake didn't work on my DGA4132, while fq_codel and simple.qos work fine.

kiiw avatar Aug 19 '22 09:08 kiiw

Install the LuCI WebGUI and install SQM from there, then set it up and you're good to go. Cake didn't work on my DGA4132, while fq_codel and simple.qos work fine.

Thank you but for some unknown reason, I can't install LuCI (https://github.com/Ansuel/tch-nginx-gui/issues/1150). Anyway, what do you mean with "while fq_codel and simple.qos work fine" and where are located these two files?

gamerover98 avatar Aug 19 '22 10:08 gamerover98

Anyway, what do you mean with "while fq_codel and simple.qos work fine" and where are located these two files?

i don't remember where they are because i used LuCI, maybe here You can find some info (https://openwrt.org/docs/guide-user/network/traffic-shaping/sqm_configuration )

kiiw avatar Aug 19 '22 11:08 kiiw

:fire::fire::fire: Good news! I have found a solution! :fire::fire::fire:

Premises:

  • The following commands work on DGA4130 with the Ansuel GUI and I don't know if it works with other technicolor models.

The only way I have found is through the Linux TC command with the QoS disabled. First of all, QoS will overwrite your TC rules so, you must disable it.

qos stop
qos disable

Now without the QoS, if you perform tc qdisc show, you will see the default settings. At this time, perform these commands to limit the address 192.168.1.whatyouwant. The following rules are for DOWNLOAD and not UPLOAD

tc qdisc del dev eth5 root
tc qdisc add dev eth5 root handle 1: htb default 5
tc class add dev eth5 parent 1: classid 1:1 htb rate 1000mbit ceil 1000mbit
tc class add dev eth5 parent 1: classid 1:2 htb rate 10mbit ceil 10mbit
tc filter add dev eth5 protocol ip parent 1:0 prio 1 u32 match ip dst 192.168.1.whatyouwant flowid 1:2
tc qdisc add dev eth5 parent 1:2 handle 2: sfq perturb 10
  • If you want to reset the previous configurations: tc qdisc del dev eth5 root
  • If you want to change the speed limit, edit the fourth line from 10mbps to 20mbps or what you want and execute all commands again.
  • If you want these rules just for UPLOAD, edit the "ip dst" in "ip src".
  • I don't know how to apply these rules for both download and upload.

Why eth5? I don't know why but on DGA4130, the WiFi is on eth5. :shit:

gamerover98 avatar Aug 21 '22 15:08 gamerover98