I am trying to do some simple filtering with htb and the following class
hierarchy:
1:
|
1:10
/ \
1:100 1:200
/ \
1:1000 ...
Internal traffic should go to 1:200 and external traffic to 1:100 with
further distinction based on dst ip made there.
The problem is that I just don't get the second distinction (filter on class
1:100) right. I have not found any working example where filters were not
attached to qdiscs but on classes instead. Is it possible to do so? If yes:
am I using the right syntax (parent 1:100)?
The packets just get dropped in class 1:100 although the filter should
definitely match and enqueue them into 1:1000.
Is there anything like a default filter on class basis which always
matches or do I have to use something like "match ip dst 0.0.0.0/0"?
Here are the commands I'm using:
##########
tc qdisc add dev eth1 root handle 1: htb default 100
tc class add dev eth1 parent 1: classid 1:10 htb rate 10mbit ceil 10mbit
burst 20k
# external traffic
tc class add dev eth1 parent 1:10 classid 1:100 htb rate 1mbit ceil 1mbit
burst 10k
# internal traffic
tc class add dev eth1 parent 1:10 classid 1:200 htb rate 9mbit ceil 9mbit
burst 10k
tc class add dev eth1 parent 1:100 classid 1:1000 htb rate 0.5mbit ceil
0.5mbit burst 2k prio 10
# filters
tc filter add dev eth1 pref 1 protocol ip parent 1: u32 match ip src
195.58.166.176/28 flowid 1:200
tc filter add dev eth1 pref 1 protocol ip parent 1:100 u32 match ip dst
195.58.0.0/16 flowid 1:1000
##########
Many thanks in advance,
Andreas Lehrbaum
_______________________________________________
LARTC mailing list / [EMAIL PROTECTED]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/