Skip to contentSkip to conversation

tc filter question

LARTC [email protected] 6 participants 7 messages Feb 14, 2003 – Oct 29, 2007

lore
Share & tools
lore
#0 lore raw

Hello.

I tried this:

$ ./tc qdisc add dev ppp0 root handle 1:0 htb default 12
$ ./tc class add dev ppp0 parent 1:0 classid 1:1 htb rate 125kbit ceil 125kbit
$ ./tc class add dev ppp0 parent 1:1 classid 1:10 htb rate 10kbit ceil 125kbit 
prio 0
$ iptables .... -j MARK --set-mark 11
$ ./tc filter add dev ppp0 parent 1:0 prio 0 protocol ip handle 10 fw flowid 
1:10
RTNETLINK answers: Invalid argument

Can anybody tell me what's wrong with the last line?

I tried it with tc from
http://luxik.cdi.cz/~devik/qos/htb/v3/htb3.6-020525.tgz
and from iproute2-2.4.7-340.rpm (SuSE 8.1).

Do I need some other kernel module?

Regards,
Philipp
_______________________________________________
LARTC mailing list / [email protected]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/

#1 lore raw
Quoted 15 lines · On 14-02-2003 at 11:19:10AM +0100, [email protected] wrote:

Hello.

I tried this:

$ ./tc qdisc add dev ppp0 root handle 1:0 htb default 12
$ ./tc class add dev ppp0 parent 1:0 classid 1:1 htb rate 125kbit ceil 125kbit
$ ./tc class add dev ppp0 parent 1:1 classid 1:10 htb rate 10kbit ceil 125kbit 
prio 0
$ iptables .... -j MARK --set-mark 11
$ ./tc filter add dev ppp0 parent 1:0 prio 0 protocol ip handle 10 fw flowid 
1:10
RTNETLINK answers: Invalid argument
Quoted 7 lines

Can anybody tell me what's wrong with the last line?

I tried it with tc from
http://luxik.cdi.cz/~devik/qos/htb/v3/htb3.6-020525.tgz
and from iproute2-2.4.7-340.rpm (SuSE 8.1).

Do I need some other kernel module?

Recompile Your kernel with option CONFIG_NET_CLS_FW.
Networking options --->QoS and/or fair queueing --->Firewall based classifier

Rgds,
Bartek.

#3 lore raw
In reply to [email protected]

Dear all,

I have big question in my mind about "tc filter" sintax. If I give "tc -s -d filter sh dev eth0" command, then the output is like below :

filter parent 1: protocol ip pref 1 u32
filter parent 1: protocol ip pref 1 u32 fh 800: ht divisor 1 filter parent 1: protocol ip pref 1 u32 fh 800::800 order 2048 key ht 800 bkt 0 flowid 1:2 (rule hit 21553629
success 37907)
match 00160000/ffff0000 at 20 (success 37907 )

...

My question is :
1. What is "fh 800:" and "fh 800::800" mean ?
2. How I change the value "800" in "fh 800::800" ? I'm guessing this is default value and I need to change that because my filter rule can be more than 0xfff line.

Thanks for all,

Daniel
PadiNet Makassar
_______________________________________________
LARTC mailing list
[email protected]
http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc

#4 lore raw
In reply to [email protected]

В сообщении от Sunday 28 October 2007 20:48:13 Daniel написал(а):

Quoted 12 lines

Dear all,

I have big question in my mind about "tc filter" sintax. If I give "tc -s -d filter sh dev eth0" command, then the output is like below :

filter parent 1: protocol ip pref 1 u32
filter parent 1: protocol ip pref 1 u32 fh 800: ht divisor 1 filter parent 1: protocol ip pref 1 u32 fh 800::800 order 2048 key ht 800 bkt 0 flowid 1:2 (rule hit 21553629
success 37907)
match 00160000/ffff0000 at 20 (success 37907 )

Quoted 7 lines

...

My question is :
1. What is "fh 800:" and "fh 800::800" mean ?
2. How I change the value "800" in "fh 800::800" ? I'm guessing this is default value and I need to change that because my filter rule can be more than 0xfff line.

<skip />

There is a rather unclear howto chapter:
http://lartc.org/howto/lartc.adv-filter.hashing.html

But it is very correct. Try it (actually, I understood it not from the first attempt ;))

Signature · 5 lines
Peter V. Saveliev
_______________________________________________
LARTC mailing list
[email protected]
http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc
#5 lore raw
In reply to [email protected]

Hi Daniel.

Quoted 12 lines · Daniel

Dear all,

I have big question in my mind about "tc filter" sintax. If I give "tc -s -d filter sh dev eth0" command, then the output is like below :

filter parent 1: protocol ip pref 1 u32
filter parent 1: protocol ip pref 1 u32 fh 800: ht divisor 1 filter parent 1: protocol ip pref 1 u32 fh 800::800 order 2048 key ht 800 bkt 0 flowid 1:2 (rule hit 21553629
success 37907)
match 00160000/ffff0000 at 20 (success 37907 )

Quoted 7 lines

...

My question is :
1. What is "fh 800:" and "fh 800::800" mean ?
2. How I change the value "800" in "fh 800::800" ? I'm guessing this is default value and I need to change that because my filter rule can be more than 0xfff line.

Hi, that values are for the hash-tables of u32, see:
http://lartc.org/howto/lartc.adv-filter.hashing.html

Quoted 5 lines

Thanks for all,

Daniel
PadiNet Makassar

Bye,
Andreas.
_______________________________________________
LARTC mailing list
[email protected]
http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc

#6 lore raw
In reply to [email protected]
Quoted 7 lines · Daniel

My question is :
1. What is "fh 800:" and "fh 800::800" mean ?
2. How I change the value "800" in "fh 800::800" ? I'm guessing this is default value and I need to change that because my filter rule can be more than 0xfff line.

Also check http://ace-host.stuart.id.au/russell/files/tc/doc/cls_u32.txt

Old howto misses a few important things.
_______________________________________________
LARTC mailing list
[email protected]
http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc