Tag Archives: shaping

Traffic shaping with TC in Linux

Traffic shaping is a method to control the rate at which packets are sent and Linux does a pretty good job in doing this. I am currently developing a shell-like interface for TC in python and the following script is the framework for the application. I will update this post as I have more experience with TC. Here is the script with descriptions for which I also used tc manual;

#tc qdisc add dev eth1 root handle 1:0 htb

#tc class add dev eth1 parent 1: classid 1:1 htb rate 2mbit ceil 2mbit

Classful qdiscs contain classes which allows us to set rate limits. Class 1:1 is the root class here

Continue reading