Tc: Difference between revisions
Jump to navigation
Jump to search
Created page with '==Traffic Control== Linux Advanced Routing & Traffic Control ==limit tcp traffic on port 80== echo “Traffic Control: Removing existing policy…” tc qdisc del dev eth0 r…' |
|||
Line 5: | Line 5: | ||
==limit tcp traffic on port 80== | ==limit tcp traffic on port 80== | ||
echo “Traffic Control: Removing existing policy…” | echo “Traffic Control: Removing existing policy…” | ||
tc qdisc del dev eth0 root | tc qdisc del dev eth0 root | ||
echo “Traffic Control: Setting new policy…” | echo “Traffic Control: Setting new policy…” | ||
tc qdisc add dev eth0 root handle 2 htb default 1 | 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: classid 2:6 htb rate 10000kbit | ||
tc class add dev eth0 parent 2:6 classid 2:100d htb rate 7000Kbit | 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 | tc filter add dev eth0 parent 2: protocol ip pref 4 u32 match ip sport 80 0xffff classid 2:100d |
Revision as of 15:17, 13 June 2012
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