[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

traffic shaping



Hi,


looking at ingress shaping and this example from linuxfoundation
http://www.linuxfoundation.org/collaborate/workgroups/networking/ifb


$TC qdisc del dev ifb0 root handle 1: prio 
$TC qdisc add dev ifb0 root handle 1: prio 
$TC qdisc add dev ifb0 parent 1:1 handle 10: sfq
$TC qdisc add dev ifb0 parent 1:2 handle 20: tbf \
 rate 20kbit buffer 1600 limit 3000
$TC qdisc add dev ifb0 parent 1:3 handle 30: sfq                                
$TC filter add dev ifb0 parent 1: protocol ip prio 1 u32 \
 match ip dst 11.0.0.0/24 flowid 1:1 
$TC filter add dev ifb0 parent 1: protocol ip prio 2 u32 \
 match ip dst 10.0.0.0/24 flowid 1:2 

ifconfig ifb0 up
$TC qdisc del dev eth0 root handle 1: htb default 2
$TC qdisc add dev eth0 root handle 1: htb default 2
$TC class add dev eth0 parent 1: classid 1:1 htb rate 800Kbit
$TC class add dev eth0 parent 1: classid 1:2 htb rate 800Kbit
$TC class add dev eth0 parent 1:1 classid 1:10 htb rate 256kbit ceil 384kbit
$TC class add dev eth0 parent 1:1 classid 1:20 htb rate 512kbit ceil 648kbit
$TC filter add dev eth0 parent 1: protocol ip prio 1 u32 \
 match ip dst 10.0.0.229/32 flowid 1:10 \
 action mirred egress redirect dev ifb0




1. why do they use the line that ends with "flowid 1:10" just before
"action mirred egress...", isnt all traffic redirected with the
"action mirred egress..." line?

2. why do they add classes to eth0 at the end, shouldnt those go to ifb0?

3. is this somewhere better documented? havent found much with google


greets

Reply to: