From Fedora Project Wiki

< Networking

Revision as of 08:33, 30 October 2012 by Pavlix (talk | contribs) (Created page with "== HTB example == <pre> tc qdisc del dev eth0 root tc qdisc add dev eth0 root handle 1: htb default 11 tc class add dev eth0 parent 1: classid 1:1 htb rate 100kbps ceil 100k...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

HTB example

tc qdisc del dev eth0 root
tc qdisc add dev eth0 root handle 1: htb default 11

tc class add dev eth0 parent 1: classid 1:1 htb rate 100kbps ceil 100kbps
tc class add dev eth0 parent 1:1 classid 1:11 htb rate 2kbps ceil 2kbps
tc class add dev eth0 parent 1:1 classid 1:12 htb rate 50kbps ceil 50kbps

tc filter replace dev eth0 \
	protocol ip parent 1: prio 1 handle 0x19 fw flowid 1:12

iptables -t mangle -F
iptables -t mangle -A POSTROUTING -d 195.47.235.3 -j MARK --set-mark 0x19