Tc

From Halfface
Revision as of 15:24, 13 June 2012 by Ekaanbj (talk | contribs) (→‎Traffic Control)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

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