How to tell trickled to restore bandwidth to 100%?

2

I've been reading up on trickled which can be used to throttle both upload and download bandwidth:

# Throttle download and upload bandwidths to 100KB.
trickled -d 100 -u 100

But none of the articles/tutorials/examples I've read show the command to tell trickled to stop and release all bandwidth back to 100%. How can I do this? Thanks in advance!

pnongrata

Posted 2012-12-23T22:53:02.040

Reputation: 2 212

Answers

1

This is something I'd like to know, too. Depending on your case this might be a workaround.

Some time ago I needed to simulate low bandwidth and/or high latency to a remote server. I came up with this script:

iface=wlan0
rate=80kbit
delay=0ms
destHost=1.2.3.4
destPort=22
tc qdisc del dev $iface root
tc qdisc add dev $iface root handle 1: prio
tc qdisc add dev $iface parent 1:3 handle 30: tbf rate $rate buffer 1600 latency 50ms
tc qdisc add dev $iface parent 30:1 handle 31: netem  delay $delay
tc filter add dev $iface protocol ip parent 1:0 prio 3 u32   match ip dport $destPort 0xffff   match ip dst $destHost   flowid 1:3

Here you can adjust the bandwidth and latency to a specific port on a specific host. You need to be root to type these commands. It seems to me that the destination host needs to be an ip address. You should also check the interface name: it's probably wlan0 if you use wireless but it could be eth0 if you have a wired connection. The delay parameter here is zero so no latency by default (it was for my testing purpose but you shouldn't need it, I think). Also note that the unit here is kilobits/s, not kilobytes/s like trickle uses. To convert kilobytes to kilobits, multiply by eight.

To remove the bandwidth limit, type:

tc qdisc del dev $iface root

stereolegged

Posted 2012-12-23T22:53:02.040

Reputation: 11