Tc: Difference between revisions

From Halfface
Jump to navigation Jump to search
 
Line 1: Line 1:
==View traffic control==
tc qdisc list
==Traffic Control==
==Traffic Control==



Latest revision as of 15:24, 13 June 2012

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