Wonder Shaper is a script that allows the user to limit the bandwidth of one or more network adapters. It does so by using iproute’s tc command but greatly simplifies its operation. Wonder Shaper was first released by Bert Hubert in 2002, but the original version lacked a command-line interface, from on version 1.2 this feature was added. From version 1.3, the HTB queuing is used instead of CBQ, allowing better bandwidth management on high speed (above ten megabits) links. In version 1.4 an improved ingress shaping method was implemented and the ability to limit either down or up (both is still possible too). The original README is a rather lengthy document and is saved under README.old, for those who’d like some more background information. Except for any notes on the operation, this document is considered up-to-date.
git clone https://github.com/magnific0/wondershaper.git
You can run wondershaper (as any user with sufficient permissions) without installation and stop following the instructions at this point. Show the wondershaper usage instructions by typing
The program details all available options on how to use wondershaper. Next is to pick an interface that you want to shape. You can see all available interfaces by typing
ip addr show
Note that on older systems this command might not be available. In this case, you should run ifconfig instead.
Identify the network interface that you want to shape. The names differ per system.
In the following example, a wireless interface is limited to an upload of 4Mbps and download of 8Mbps.
./wondershaper -a wlp4s0 -u 4096 -d 8192
If you get messages telling you that RTNETLINK answers: Operation not permitted your user account does not have sufficient privileges. In that case try:
sudo ./wondershaper -a wlp4s0 -u 4096 -d 8192