08-23-2021, 12:40 PM
(This post was last modified: 08-24-2021, 04:42 PM by ballerburg9005.)
Most DSL lines get unstable when you use more than a certain percentage of your total bandwidth. That is why I wrote this very simple traffic shaping script. It will slow down all TCP packets from your PC to the 45/115kbit limit, so you might want to disable it after playing.
To remove the traffic shaping:
Don't trust the numbers, use mtr instead to fine-tune how much downloads affect your line.
If you don't know mtr: Press "d" twice and it will show you a dot or a number for a series of pings on each column, repeated each second. The first row is your ISP, the last row is in China. When the line is having issues, you will see vertical stripes of numbers (or even question marks) in the picture. A question mark means packet loss and numbers are just delayed. The scale is shown at the bottom, e.g. a "3" could mean 400ms and a dot could mean 10ms. If you have horizontal stripes with question marks it means that the target is receiving too many ping requests and is filtering your packets. Vertical stripes however can only be because of your line.
Before when watching Youtube 1080p
After
Unfortunately you cannot enable this traffic shaping on your router directly, unless you use OpenWRT or something like that. So it will still mess up your ping if your family watches videos over your line.
Code:
tc qdisc add dev eth0 root handle 1: htb default 30
tc class add dev eth0 parent 1: classid 1:1 htb rate 1gbit burst 15k
tc class add dev eth0 parent 1:1 classid 1:20 htb rate 45kbit ceil 115kbit burst 15k
tc qdisc add dev eth0 parent 1:20 handle 20: sfq perturb 10
tc filter add dev eth0 protocol ip u32 match ip protocol 6 0xff flowid 1:20
To remove the traffic shaping:
Code:
tc qdisc del root dev eth0
Don't trust the numbers, use mtr instead to fine-tune how much downloads affect your line.
Code:
mtr cctv.cn
If you don't know mtr: Press "d" twice and it will show you a dot or a number for a series of pings on each column, repeated each second. The first row is your ISP, the last row is in China. When the line is having issues, you will see vertical stripes of numbers (or even question marks) in the picture. A question mark means packet loss and numbers are just delayed. The scale is shown at the bottom, e.g. a "3" could mean 400ms and a dot could mean 10ms. If you have horizontal stripes with question marks it means that the target is receiving too many ping requests and is filtering your packets. Vertical stripes however can only be because of your line.
Before when watching Youtube 1080p
After
Unfortunately you cannot enable this traffic shaping on your router directly, unless you use OpenWRT or something like that. So it will still mess up your ping if your family watches videos over your line.
Visit our clan website: http://extreme.voltage.nz/