[LARTC] bandwith limiting and prio classes

elie.roux at enst-bretagne.fr elie.roux at enst-bretagne.fr
Fri Jul 13 14:58:36 CEST 2007


Salim S I <salim.si at cipherium.com.tw> a écrit :

> Use an HTB/CBQ class at the top with 1mbit limit. (HTB is easier).
> Direct all traffic to this class. You do not need to use mark here.
> Fit your four PRIO classes under the HTB class, if you want, and filter
> traffic based on marks.

Ok, I tried it (with a tbf), now my bandwidth is well limitated, but  
my filters doesn't seem to work, all the packets go in 400: . Here is  
my script :

tc qdisc add dev eth2 root handle 1:0 tbf rate 1mbit buffer 1600 limit 10000
tc qdisc add dev eth2 parent 1:0 handle 10: prio bands 4 priomap 3 3 3  
3 3 3 3 3 3 3 3 3 3 3 3 3
tc qdisc add dev eth2 parent 10:1 handle 100: sfq
tc qdisc add dev eth2 parent 10:2 handle 200: sfq
tc qdisc add dev eth2 parent 10:3 handle 300: sfq
tc qdisc add dev eth2 parent 10:4 handle 400: sfq
tc filter add dev eth2 parent 10: prio 1 protocol ip handle 0x1 fw flowid 100:
tc filter add dev eth2 parent 10: prio 2 protocol ip handle 0x2 fw flowid 200:
tc filter add dev eth2 parent 10: prio 3 protocol ip handle 0x3 fw flowid 300:

I've tried to replace parent 10: by parent 1:, but it makes an error  
(very explicit, like all the tc errors).

Thank you in advance,
-- 
Elie



More information about the LARTC mailing list