Hi I''ve searched the archives for this and doesnt seem to be any message with this problem. Im trying to optimize a high load CBQ server using u32 hashes as in http://lartc.org/HOWTO//cvs/2.4routing/output/2.4routing-12.html#ss12.4 Although Ive double checked the kernel options, and also other u32 filters work very well, when I try this line I get an error: /sbin/tc filter add dev eth0 parent 1:0 prio 5 handle 2: u32 divisor 256 RTNETLINK answers: Invalid argument I am currently using a 2.4.9-21SGI_XFS_1.0.2 kernel version. Are this hashes supported only in a newer kernel version? Thanks ---------------------------- Mihai RUSU Disclaimer: Any views or opinions presented within this e-mail are solely those of the author and do not necessarily represent those of any company, unless otherwise specifically stated.
On Wed, 6 Mar 2002, Mihai RUSU wrote:> Hi > > I''ve searched the archives for this and doesnt seem to be any message with > this problem. Im trying to optimize a high load CBQ server using u32 > hashes as in > http://lartc.org/HOWTO//cvs/2.4routing/output/2.4routing-12.html#ss12.4 > > Although Ive double checked the kernel options, and also other u32 filters > work very well, when I try this line I get an error: > > /sbin/tc filter add dev eth0 parent 1:0 prio 5 handle 2: u32 divisor 256 > RTNETLINK answers: Invalid argument >Well I found out the "problem" . You cannot have u32 filter witout telling the protocol too. The correct line should be: /sbin/tc filter add dev eth0 parent 1:0 prio 5 handle 2: protocol ip u32 divisor 256 There is also another error in the HOWTO (I think): "Ok, some numbers need explaining. The default hash table is called 800:: and all filtering starts there. Then we select the source address, which lives as position 12, 13, 14 and 15 in the IP header, and indicate that we are only interested in the last part. This we send to hash table 1:, which we created earlier." This is wrong. The hash table in in fact 2: and not 1: . ---------------------------- Mihai RUSU Disclaimer: Any views or opinions presented within this e-mail are solely those of the author and do not necessarily represent those of any company, unless otherwise specifically stated.
On Wed, Mar 06, 2002 at 02:43:52PM +0200, Mihai RUSU wrote:> Well I found out the "problem" . You cannot have u32 filter witout telling > the protocol too. The correct line should be: > /sbin/tc filter add dev eth0 parent 1:0 prio 5 handle 2: protocol ip u32 > divisor 256 > > There is also another error in the HOWTO (I think):Fixed. Can you check if it is 100% ok now?> "Ok, some numbers need explaining. The default hash table is called 800:: > and all filtering starts there. Then we select the source address, which > lives as position 12, 13, 14 and 15 in the IP header, and indicate that we > are only interested in the last part. This we send to hash table 1:, which > we created earlier." > > This is wrong. The hash table in in fact 2: and not 1: .Fixed too, and added you to the ''thanks to'' list. Thanks! Regards, bert -- http://www.PowerDNS.com Versatile DNS Software & Services http://www.tk the dot in .tk http://lartc.org Linux Advanced Routing & Traffic Control HOWTO
On Wed, 6 Mar 2002, bert hubert wrote:> On Wed, Mar 06, 2002 at 02:43:52PM +0200, Mihai RUSU wrote: > > > Well I found out the "problem" . You cannot have u32 filter witout telling > > the protocol too. The correct line should be: > > /sbin/tc filter add dev eth0 parent 1:0 prio 5 handle 2: protocol ip u32 > > divisor 256 > > > > There is also another error in the HOWTO (I think): > > Fixed. Can you check if it is 100% ok now? >It seems ok. Anyway I also have another question about that part of the HOWTO. In the example there it appears to be a line that doesnt do nothing (at least for me): "Configuration is pretty complicated, but very worth it by the time you have this many rules. First we make a filter root, then we create a table with 256 entries: # tc filter add dev eth1 parent 1:0 prio 5 protocol ip u32 # tc filter add dev eth1 parent 1:0 prio 5 handle 2: protocol ip u32 divisor 256" the first line: # tc filter add dev eth1 parent 1:0 prio 5 protocol ip u32 What is the porpose of this line? Because I removed it from my test configuration and it works the same (the hashes). I even did a 2 level hash and I can say its the COOOLEST THING I have found yet in linux. This CBQ rules ! :) This is my test configuration in case somebody needs it: /sbin/tc qdisc del dev eth0 root /sbin/tc qdisc add dev eth0 root handle 1: cbq bandwidth 100Mbit allot 1514 avpkt 1000 cell 8 /sbin/tc class add dev eth0 parent 1: classid 1:1 cbq bandwidth 100Mbit rate 100Mbit avpkt 1000 prio 8 allot 1514 weight 1 maxburst 21 /sbin/tc class add dev eth0 parent 1:1 classid 1:10 estimator 1sec 8sec cbq bandwidth 100Mbit rate 16kbit avpkt 1000 prio 5 allot 1514 weight 1 maxburst 21 bounded /sbin/tc class add dev eth0 parent 1:1 classid 1:20 estimator 1sec 8sec cbq bandwidth 100Mbit rate 128kbit avpkt 1000 prio 5 allot 1514 weight 1 maxburst 21 bounded /sbin/tc qdisc add dev eth0 parent 1:10 pfifo limit 131 /sbin/tc qdisc add dev eth0 parent 1:20 pfifo limit 131 /sbin/tc filter add dev eth0 parent 1:0 prio 5 handle 2: protocol ip u32 divisor 256 /sbin/tc filter add dev eth0 parent 1:0 prio 5 handle 3: protocol ip u32 divisor 256 /sbin/tc filter add dev eth0 parent 1:0 prio 5 protocol ip u32 ht 800:: match ip dst 0/0 hashkey mask 0x0000ff00 at 16 link 2: /sbin/tc filter add dev eth0 parent 1:0 prio 5 protocol ip u32 ht 2:7b match ip dst 0/0 hashkey mask 0x000000ff at 16 link 3: /sbin/tc filter add dev eth0 parent 1:0 prio 5 protocol ip u32 ht 3:7c match ip dst 0/0 flowid 1:20 In this example I limit the traffic towards any x.y.123.124 IP.> > Fixed too, and added you to the ''thanks to'' list. Thanks! >Thanks, Im very proud to be near * Rusty Russell <rusty%rustcorp.com.au> :))) ---------------------------- Mihai RUSU Disclaimer: Any views or opinions presented within this e-mail are solely those of the author and do not necessarily represent those of any company, unless otherwise specifically stated.
Hi. I''ve been trying to use "The Ultimate traffic Conditioner" described in HOWTO and the two ingress rules at the end of the script didn''t work. I''ve upgraded iproute and kernel, but it didn''t help. I tried other ways to assume ingress policing, and i found that instead of this (not working): # tc qdisc add dev eth0 handle ffff: ingress i can issue: # tc qdisc add dev eth0 handle 2: parent 1: ingress which dos not produce any error. I don''t know if this is all right. Please help me with this. Greetz. -- ########################################## # | p0wer | # # __ | GG#1877248 | # # (oo) | p0wer@bojko.eu.org | # # / \/ \ Go away or I will replace you # # `V__V'' with a very small shell script. # ##########################################
On Wed, Mar 06, 2002 at 03:19:02PM +0100, Rados?aw ?oboda wrote:> Hi. > > I''ve been trying to use "The Ultimate traffic Conditioner" described in > HOWTO and the two ingress rules at the end of the script didn''t work. I''ve > upgraded iproute and kernel, but it didn''t help. I tried other ways to > assume ingress policing, and i found that instead of this (not working):So far everybody who upgraded to a newer iproute noted that the problem was solved. Which version do you use? I''ve been specifically told that this version works: ftp://ftp.inr.ac.ru/ip-routing/iproute2-2.4.7-now-ss010824.tar.gz> # tc qdisc add dev eth0 handle ffff: ingress > > i can issue: > > # tc qdisc add dev eth0 handle 2: parent 1: ingress > > which dos not produce any error. I don''t know if this is all right. Please > help me with this.I don''t think it will work either. Can you try again with the version mentioned above? Regards, bert -- http://www.PowerDNS.com Versatile DNS Software & Services http://www.tk the dot in .tk http://lartc.org Linux Advanced Routing & Traffic Control HOWTO
On Wed, 6 Mar 2002, bert hubert wrote:> On Wed, Mar 06, 2002 at 03:19:02PM +0100, Rados?aw ?oboda wrote: > > So far everybody who upgraded to a newer iproute noted that the problem was > solved. Which version do you use? I''ve been specifically told that this > version works: > > ftp://ftp.inr.ac.ru/ip-routing/iproute2-2.4.7-now-ss010824.tar.gzThnx, it worked out, but i found that it was not the problem with version (previously i compiled iproute-current dated february 2002) - to compile iproute with ingress policing and some other stuff (diffserv) I needed to change the value of TC_CONFIG_DIFFSERV in Config file to "y". Greetz. -- ########################################## # | p0wer | # # __ | GG#1877248 | # # (oo) | p0wer@bojko.eu.org | # # / \/ \ Go away or I will replace you # # `V__V'' with a very small shell script. # ##########################################