Hi list, I'm in trouble with a scenario and would like to know if you guys can help me explain and work it out:
I need to put some customers in a class of, lets say, 1Mbit/s and try to garantee then a percentage of the bandwith. So I came up with the following scenario
# root stuff tc qdisc add dev eth0 root handle 1: htb default 2 tc class add dev eth0 parent 1: classid 1:1 htb rate 50000kbit # default class tc class add dev eth0 parent 1: classid 1:2 htb rate 2000kbit
# root class for this "garanteed bandwidth" service tc class add dev eth0 parent 1: classid 1:3 htb rate 10Mbit
# class for this 1Mbit shared bandwidth tc class add dev eth0 parent 1:3 classid 1:1024 htb rate 1Mbit # qdisc used to _make my life easier numbering customer classes_ tc qdisc add dev eth0 parent 1:1024 handle 1024: htb default 250 # default class for this second qdisc tc class add dev eth0 parent 1024: classid 1024:250 htb rate 32kbit
# each customer gets the following class and filter
tc class add dev eth0 parent 1024: classid 1024:1 htb rate 256kbit
tc filter add dev eth0 parent 1: protocol ip prio 1 u32 match ip dst xxx.xxx.xxx.xxx/yy flowid 1024:1
# another customer...
tc class add dev eth0 parent 1024: classid 1024:2 htb rate 256kbit
tc filter add dev eth0 parent 1: protocol ip prio 1 u32 match ip dst www.www.www.www/zzz flowid 1024:2
First, this filters doesn't work, all traffic goes to 1:2. Why? I can filter traffic to any class at 1:? but not to classes below the second qdisc (1:1024).
Shouldn't I make this filter pointing to 1024: as the parent? It doesn't let me do it...
Any help?
Tks for you help and attention.
ADC
begin:vcard fn:Andre Correa n:Correa;Andre adr:;;;Sao Paulo;SP;;Brazil email;internet:andre.correa@xxxxxxxxx tel;fax:+1 503 907-8907 tel;cell:+55 11 9187-1906 x-mozilla-html:FALSE version:2.1 end:vcard