Re: Where have my all my TC filters gone??

Linux Advanced Routing and Traffic Control

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi there Robert,

 : I have snipped out part of a script to load balance and bandwidth shape
 : upload traffic to a NIC (eth0/ETH_WAN) on a 2mbit/256kbit ADSL line.
 : The balancing will be carried out for 3 users with 1+ PCs connected on
 : another NIC. There are iptables instructions (not shown in the script)
 : to mark packets based on PORT and TOS. These are snipped as the marking
 : appears to work its just the TC FILTERs that just disappear :-(

They should be there.....the command you posted just doesn't ask the
kernel the question which would show your filters!

 : Stef (or anyone else :-) can you please explain why:
 :
 : # tc filter show dev eth0
 : #

Try "tc filter show dev eth0 parent 1:1" and "tc filter show dev eth0
parent 1:10".  This should present you with your filters.

 : shows no filters are in place on eth0 after running the script below???

If no handle in particular is specified in the "tc filter show dev $DEV"
command, then the default (root) handle "1:0" is displayed.

 : Is this a problem with having a 2-level deep HTB class tree?? When my
 : HTB tree is only 1 level deep the TC filters get fed back properely
 : with the above command!!
 :
 : BTW I don't get any errors when running the script from a CLI.

[ snipped stuff ]

 : tc filter add dev $ETH_WAN parent 1:1 protocol ip prio 1 u32 match ip src ${ROB_IP} flowid 1:10
 : tc filter add dev $ETH_WAN parent 1:1 protocol ip prio 1 u32 match ip src ${DAVE_IP} flowid 1:20
 : tc filter add dev $ETH_WAN parent 1:1 protocol ip prio 1 u32 match ip src ${MIKE_IP} flowid 1:30

Here you'll see that your script is attaching these filters to handle 1:1,
and below

 : tc filter add dev $ETH_WAN parent 1:10 protocol ip prio 1 handle 1 fw classid 1:11
 : tc filter add dev $ETH_WAN parent 1:10 protocol ip prio 2 handle 2 fw classid 1:12
 : tc filter add dev $ETH_WAN parent 1:10 protocol ip prio 3 handle 3 fw classid 1:13
 : tc filter add dev $ETH_WAN parent 1:10 protocol ip prio 4 handle 4 fw classid 1:14
 : tc filter add dev $ETH_WAN parent 1:10 protocol ip prio 5 handle 5 fw classid 1:15
 : tc filter add dev $ETH_WAN parent 1:10 protocol ip prio 6 handle 6 fw classid 1:16

your script attaches these filters to 1:10!  This means that you'll only
be able to see them if you explicitly list the filters attached to this
handle.

This doesn't really solve your problem, though....in order to solve your
problem, (I think) you should be able to alter the handle on all of your
"tc filter" statements to "1:0".  Then try running your script again.
That should put you much closer to your goal.

Good luck,

-Martin

-- 
Martin A. Brown --- SecurePipe, Inc. --- mabrown@xxxxxxxxxxxxxx

_______________________________________________
LARTC mailing list / LARTC@xxxxxxxxxxxxxxx
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/

[Index of Archives]     [LARTC Home Page]     [Netfilter]     [Netfilter Development]     [Network Development]     [Bugtraq]     [GCC Help]     [Yosemite News]     [Linux Kernel]     [Fedora Users]
  Powered by Linux