I have a raspberry pi router for me and my room mates. The bandwidth is divided as follow:
1:0(htb)
|
1:1(16mbit/s)
/ \
1:2(8mbit/s) 1:ffff(8mbit/s)
If I add the filter for with parent 1:0 (tc filter add dev wlan0 parent 1:0 protocol ip prio 1 handle 0x0002 fw flowid 1:2)
, it works like a charm. However, if I add the filter upon class 1:1 the command didn't report any errors but there is no ouput for tc filter show dev wlan0
command.
Questions:
1. Why it didn't work when I put the filters on 1:1?
2. Can I place the filters on subclasses like 1:1?
The filters are attached to root of ingress queue discipline, not to classes. So in your case all filters should be created with
parent 1:0
option.To pass the traffic through classes you should create a filter with
flowid ...
orclassid ...
options for every class. So, in your case the filters should be looks like (if I've understood you correctly):