Tc

From Halfface
Jump to navigation Jump to search
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

View traffic control

tc qdisc list

Traffic Control

Linux Advanced Routing & Traffic Control

limit tcp traffic on port 80

echo “Traffic Control: Removing existing policy…”
tc qdisc del dev eth0 root
echo “Traffic Control: Setting new policy…”
tc qdisc add dev eth0 root handle 2 htb default 1
tc class add dev eth0 parent 2: classid 2:6 htb rate 10000kbit
tc class add dev eth0 parent 2:6 classid 2:100d htb rate 7000Kbit
tc filter add dev eth0 parent 2: protocol ip pref 4 u32 match ip sport 80 0xffff classid 2:100d