Can I attach a tc filter to an HTB class rather than to an HTB qdisc?
For example:
tc class add dev $IF_LAN parent 1:100 classid 1:180 htb rate 19kbit ceil 2000kbit prio 4
where:
1:100 -> Is an HTB inner class.
This question arises from the fact that I could be able to attach a tc filter to a class without throwing an error but later when I saw the tc statistics I realized that there is no filtering being made.
Thanks in advance.
EDIT: I found in the tc manual tc-filter syntax:
tc filter [ add | change | replace ] dev DEV [ parent qdisc-id | root ] protocol prootocol prio priority filtertype [ filtertype specific parameters ] flowid flow-id
(the relevant part is parent qdisc-id)
So, I only can be able to attach a filter to a qdisc or there is a workaround?
Best Answer
Should be possible, we use:
The third line attaches a filter to the class defined in the second line (
classid 1:3
andflowid 1:3
).