(this is a repost, nobody said anything about this so maybe it did not go throu the list) I downloaded iproute2-2.4.7-now-ss010824.tar.gz and I did patched tc with the htb3.6_tc.diff from htb3.6-020525.tgz and when I try to use a htb script I get just errors. I did not patch the kernel, since I use kernel 2.4.22 and I saw on - HTB Homepage that I need to patch it only if I run version 2.4.20 or earlier. Do also need the kernel patch ? Or maybe is something else wrong? (I also used the precompiled "tc" but the situation is the same) Errors: ------- RTNETLINK answers: No such file or directory Deleted old root disk on eth1 Unknown filter "flowid", hence option "1:10" is unparsable Unknown filter "flowid", hence option "1:2" is unparsable RTNETLINK answers: Invalid argument RTNETLINK answers: Invalid argument RTNETLINK answers: Invalid argument RTNETLINK answers: Invalid argument .....etc (same error over and over...) Part of my script (the full script is accesible on http://retea.hostingcenter.ro/htb.txt ..is too long to post here) : ------- /sbin/tc qdisc add dev eth1 root handle 1: htb default 10 /sbin/tc class add dev eth1 parent 1: classid 1:1 htb rate 10mbit /sbin/tc class add dev eth1 parent 1:1 classid 1:10 htb rate 5mbit /sbin/tc filter add dev eth1 protocol ip parent 1:10 prio 5 handle 6 flowid 1:10 /sbin/tc class add dev eth1 parent 1:1 classid 1:2 htb rate 5mbit /sbin/tc filter add dev eth1 protocol ip parent 1:10 prio 5 handle 5 flowid 1:2 /sbin/tc class add dev eth1 parent 1:10 classid 4:11 htb rate 128kbit ceil 256kbit prio 5 /sbin/tc filter add dev eth1 parent 1:10 protocol ip prio 5 u32 match ip dst 192.168.254.10 flowid 4:11 /sbin/tc class add dev eth1 parent 1:10 classid 4:12 htb rate 128kbit ceil 256kbit prio 5 /sbin/tc filter add dev eth1 parent 1:10 protocol ip prio 5 u32 match ip dst 192.168.254.11 flowid 4:12 ....etc (full script at http://retea.hostingcenter.ro/htb.txt) Thanks! Alex _______________________________________________ LARTC mailing list / LARTC@mailman.ds9a.nl http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
On Tuesday 07 October 2003 23:13, Alex wrote:> (this is a repost, nobody said anything about this so maybe it did not go > throu the list) > I downloaded iproute2-2.4.7-now-ss010824.tar.gz and I did patched tc with > the htb3.6_tc.diff from htb3.6-020525.tgz and when I try to use a htb > script I get just errors. I did not patch the kernel, since I use kernel > 2.4.22 and I saw on - HTB Homepage that I need to patch it only if I run > version 2.4.20 or earlier. Do also need the kernel patch ? Or maybe is > something else wrong? (I also used the precompiled "tc" but the situation > is the same)Try to add set -x to your script on the second line. This will display all commands executed so you know exactly which command is going wrong. You miss something in your filter statement. You have to specify the type of filter you want to use and in your case, that''s the fw filter. See lartc.org and/or docum.org for fw filter examples. Stef> > Errors: > ------- > RTNETLINK answers: No such file or directory > Deleted old root disk on eth1 > Unknown filter "flowid", hence option "1:10" is unparsable > Unknown filter "flowid", hence option "1:2" is unparsable > RTNETLINK answers: Invalid argument > RTNETLINK answers: Invalid argument > RTNETLINK answers: Invalid argument > RTNETLINK answers: Invalid argument > .....etc (same error over and over...) > > Part of my script (the full script is accesible on > http://retea.hostingcenter.ro/htb.txt ..is too long to post here) : > ------- > /sbin/tc qdisc add dev eth1 root handle 1: htb default 10 > /sbin/tc class add dev eth1 parent 1: classid 1:1 htb rate 10mbit > > /sbin/tc class add dev eth1 parent 1:1 classid 1:10 htb rate 5mbit > /sbin/tc filter add dev eth1 protocol ip parent 1:10 prio 5 handle 6 flowid > 1:10 > > /sbin/tc class add dev eth1 parent 1:1 classid 1:2 htb rate 5mbit > /sbin/tc filter add dev eth1 protocol ip parent 1:10 prio 5 handle 5 flowid > 1:2 > > > /sbin/tc class add dev eth1 parent 1:10 classid 4:11 htb rate 128kbit ceil > 256kbit prio 5 > /sbin/tc filter add dev eth1 parent 1:10 protocol ip prio 5 u32 match ip > dst 192.168.254.10 flowid 4:11 > > /sbin/tc class add dev eth1 parent 1:10 classid 4:12 htb rate 128kbit ceil > 256kbit prio 5 > /sbin/tc filter add dev eth1 parent 1:10 protocol ip prio 5 u32 match ip > dst 192.168.254.11 flowid 4:12 > > ....etc (full script at http://retea.hostingcenter.ro/htb.txt) > > Thanks! > > Alex > > > _______________________________________________ > LARTC mailing list / LARTC@mailman.ds9a.nl > http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/-- stef.coene@docum.org "Using Linux as bandwidth manager" http://www.docum.org/ #lartc @ irc.openprojects.net _______________________________________________ LARTC mailing list / LARTC@mailman.ds9a.nl http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
I''m grasping at straws here, but is it possible that you put your new tc in, for example, /usr/local/sbin/tc and your script is calling the original version in /sbin/tc ? You shouldn''t have to patch the kernel, and the patched tc should work. When you run the script, is the first error (RTNETLINK answers: No such file or directory) coming from the first line in your script (/sbin/tc qdisc add dev eth1 root handle 1: htb default 10)? It would be helpful if you could give us the errors interspersed with the commands If you add sh -x to the beginning of the command running the script, it will do that. example: [root@castor root]# sh -x /etc/tc.conf + /usr/local/bin/tc qdisc add dev eth0 root handle 1: htb default 12 + /usr/local/bin/tc class add dev eth0 parent 1: classid 1:1 htb rate 13Mbit ceil 10Mbit + /usr/local/bin/tc class add dev eth0 parent 1:1 classid 1:10 htb rate 12Mbit ceil 10Mbit + /usr/local/bin/tc class add dev eth0 parent 1:1 classid 1:11 htb rate 1Mbit ceil 10Mbit + /usr/local/bin/tc qdisc add dev eth0 parent 1:10 handle 20: sfq + /usr/local/bin/tc qdisc add dev eth0 parent 1:11 handle 30: sfq + /usr/local/bin/tc filter add dev eth0 protocol ip parent 1:0 prio 1 u32 match ip dport 1234 0xffff flowid 1:10 + /usr/local/bin/tc filter add dev eth0 protocol ip parent 1:0 prio 1 u32 match ip dport 5001 0xffff flowid 1:11 When I try the old tc on my machine (red hat 8.0), I get this: tc qdisc add dev eth0 root handle 1: htb default 12 Unknown qdisc "htb", hence option "default" is unparsable Which version of linux are you using? On Tue, 2003-10-07 at 17:13, Alex wrote:> (this is a repost, nobody said anything about this so maybe it did not > go > throu the list) > I downloaded iproute2-2.4.7-now-ss010824.tar.gz and I did patched tc > with > the htb3.6_tc.diff from htb3.6-020525.tgz and when I try to use a htb > script > I get just errors. I did not patch the kernel, since I use kernel > 2.4.22 and > I saw on - HTB Homepage that I need to patch it only if I run version > 2.4.20 > or earlier. Do also need the kernel patch ? Or maybe is something else > wrong? (I also used the precompiled "tc" but the situation is the > same) > > Errors: > ------- > RTNETLINK answers: No such file or directory > Deleted old root disk on eth1 > Unknown filter "flowid", hence option "1:10" is unparsable > Unknown filter "flowid", hence option "1:2" is unparsable > RTNETLINK answers: Invalid argument > RTNETLINK answers: Invalid argument > RTNETLINK answers: Invalid argument > RTNETLINK answers: Invalid argument > .....etc (same error over and over...) > > Part of my script (the full script is accesible on > http://retea.hostingcenter.ro/htb.txt ..is too long to post here) : > ------- > /sbin/tc qdisc add dev eth1 root handle 1: htb default 10 > /sbin/tc class add dev eth1 parent 1: classid 1:1 htb rate 10mbit > > /sbin/tc class add dev eth1 parent 1:1 classid 1:10 htb rate 5mbit > /sbin/tc filter add dev eth1 protocol ip parent 1:10 prio 5 handle 6 > flowid > 1:10 > > /sbin/tc class add dev eth1 parent 1:1 classid 1:2 htb rate 5mbit > /sbin/tc filter add dev eth1 protocol ip parent 1:10 prio 5 handle 5 > flowid > 1:2 > > > /sbin/tc class add dev eth1 parent 1:10 classid 4:11 htb rate 128kbit > ceil > 256kbit prio 5 > /sbin/tc filter add dev eth1 parent 1:10 protocol ip prio 5 u32 match > ip dst > 192.168.254.10 flowid 4:11 > > /sbin/tc class add dev eth1 parent 1:10 classid 4:12 htb rate 128kbit > ceil > 256kbit prio 5 > /sbin/tc filter add dev eth1 parent 1:10 protocol ip prio 5 u32 match > ip dst > 192.168.254.11 flowid 4:12 > > ....etc (full script at http://retea.hostingcenter.ro/htb.txt) > > Thanks! > > Alex > > > _______________________________________________ > LARTC mailing list / LARTC@mailman.ds9a.nl > http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/-- Lawrence MacIntyre 865.574.8696 lpz@ornl.gov Oak Ridge National Laboratory High Performance Information Infrastructure Technology Group