ISPs have started to provide high bandwidth connections while the FUP (Fair Usage Policy) limit is still not enough (I am using ACT Broadband). Once you decide to be on youtube most of the time the download limit gets exhausted rather quickly.
As I use Ubuntu for my desktop, I decided to use TC to throttle my Internet bandwidth to bring in some control over my Internet bandwidth usage. Have a look at my previous posts about rate limiting and traffic shaping on Linux to learn about usage of TC.
Here is my modest network setup at home.
The problem is that TC can throttle traffic going out on an interface but traffic shaping will not impact the download bandwidth.
To get around this problem I introduced a Linux network namespace into the topology. Here is how the topology looks now.
I use this script to setup the upload/download bandwidth limit.
Here are readings before and after applying the throttle
After rate-limiting to 1024Kbps upload and download