jpizzitola n00b
![n00b n00b](/images/ranks/rank_rect_0.gif)
Joined: 25 Mar 2005 Posts: 4 Location: Birmingham, AL USA
|
Posted: Sat Jan 07, 2006 7:11 pm Post subject: TC doesn't seem to be filtering |
|
|
I've been bashing my head against a wall over this for three days (which might explain why I can't figure this out...)
I am trying to set up traffic shaping at my office, but tc won't actually filter anything.
I have stripped out pretty much everything in my filtering script to just the following lines to troubleshoot the issue, and still no luck.
tc qdisc add dev eth1 root handle 1: htb default 102
tc class add dev eth1 parent 1: classid 100 htb rate 1024kbit
tc class add dev eth1 parent 1:100 classid 1:101 htb rate 512kbit ceil 1024kbit
tc class add dev eth1 parent 1:100 classid 1:102 htb rate 512kbit ceil 1024kbit
tcfilter add dev eth1 parent 1:100 protocol ip prio 1 u32 match ip dst 0.0.0.0/0 classid 1:101
tc qdisc add dev eth1 parent 1:101 handle 1101: sfq perturb 16
tc qdisc add dev eth1 parent 1:102 handle 1102: sft perturb 16
Withe the above script, everything goes into the 1102 queue, despite the filtering rule that should send everything to the 1101 sfq queue. If I take out the default 102 from the qdisc root command, everything sits in the HTB and still nothing will go into the queue.
For those wondering why I would do something like the above script, that was done to troubleshoot- my full script (when not commented out like it is now) filters on source and destination ports, has 4 qdiscs on 2 physical interfaces, 5 priorities per qdisc with up to 5 matches per priority. I striped it down to the above to try and troubleshoot what's going on by trying to create a match that would always come up positive.
Besides the above catch all rule, I have tried using the aforementioned port matches such as:
tc filter add dev eth1 parent 1:100 protocol ip prio 1 u32 match ip sport 1494 0xffff classid 1:101
and every variation of that (change out classid to flowid, removing the prio, swaping the parent and the protocol order, etc) to no avail.
I have also tried marking the packets with iptables and filtering by the mark, but the results are the same.
I am running kernel version 2.6.12-gentoo-r9 with all QoS options compiled into the kernel (I know I don't need them all- I was getting desperate, so I finally stuck them all in to see if it made a difference, which it didn't) I am in the process of updating to 2.6.14, but I do not have much hope of that fixing the issue.
Anyone have any idea what's going on? Am I doing something stupid, or is my server in need of a good whack with a brick?
Thanks. _________________ cat * > /dev/null as a backup strategy is a bad idea. |
|