Hi! I''m trying to use tc on linux 2.4.20-rc1aa with iproute 20010824-8 (latest debian package), but I''m having no joy. I can add queueing disciplines, but when I try to add classes or filters, I just get "RTNETLINK answers: Invalid argument", e.g. when I try to do: ------------< snip <------< snip <------< snip <------------ tc qdisc del dev eth0 root tc qdisc add dev eth0 root handle 1: cbq bandwidth 10Mbit cell 8 avpkt 1000 mpu 64 ------------< snip <------< snip <------< snip <------------ it works fine and I can see the queueing discipline when I type ``tc qdisc show'''', but when I do: ------------< snip <------< snip <------< snip <------------ tc class add dev eth0 parent 1:1 classid 1:2 cbq bandwidth 10Mbit rate 3Mbit \ allot 1514 cell 8 weight 100Kbit prio 3 maxburst 20 avpkt 1000 split 1:0 ------------< snip <------< snip <------< snip <------------ or ------------< snip <------< snip <------< snip <------------ tc class add dev eth0 parent 1:1 classid 1:3 cbq bandwidth 10Mbit rate 8Mbit \ allot 1514 cell 8 weight 800Kbit prio 7 maxburst 20 avpkt 1000 split 1:0 ------------< snip <------< snip <------< snip <------------ I just get the EINVAL error message. Filters also does not seem to work. I can add route filters, but ``tc filter show'''' shows nothing and adding u32 filters fail with the same error messages as the classes. I''ve attached my kernel config in case you want to check whether I configured the correct stuff (but I pretty much enabled everything - the only odd thing is that I couldn''t configure CONFIG_RTNETLINK and CONFIG_NETLINK into the kernel since those options are not available anymore (selected by default nowadays?)) Any help would be appreciated. -- Regards Abraham Accordion, n.: A bagpipe with pleats. ___________________________________________________ Abraham vd Merwe [ZR1BBQ] - Frogfoot Networks P.O. Box 3472, Matieland, Stellenbosch, 7602 Cell: +27 82 565 4451 Http: http://www.frogfoot.net Email: abz@frogfoot.net
> I''m trying to use tc on linux 2.4.20-rc1aa with iproute 20010824-8 (latest > debian package), but I''m having no joy.The latest version is iproute2-2.4.7-now-ss020116. I recommend using it.> I''ve attached my kernel config in case you want to check whether I > configured the correct stuff (but I pretty much enabled everything - the > only odd thing is that I couldn''t configure CONFIG_RTNETLINK and > CONFIG_NETLINK into the kernel since those options are not available > anymore (selected by default nowadays?))From your attached config : # CONFIG_NETLINK_DEV is not set I suggest enabling it and try again. Stef -- stef.coene@docum.org "Using Linux as bandwidth manager" http://www.docum.org/ #lartc @ irc.oftc.net _______________________________________________ LARTC mailing list / LARTC@mailman.ds9a.nl http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
Hi Stef!> > I''m trying to use tc on linux 2.4.20-rc1aa with iproute 20010824-8 (latest > > debian package), but I''m having no joy. > The latest version is iproute2-2.4.7-now-ss020116. I recommend using it. > > > I''ve attached my kernel config in case you want to check whether I > > configured the correct stuff (but I pretty much enabled everything - the > > only odd thing is that I couldn''t configure CONFIG_RTNETLINK and > > CONFIG_NETLINK into the kernel since those options are not available > > anymore (selected by default nowadays?)) > From your attached config : > # CONFIG_NETLINK_DEV is not set > I suggest enabling it and try again.Ok, I tried a kernel with CONFIG_NETLINK_DEV compiled in and the tc from iproute2-2.4.7-now-ss020116-try.tar.gz but I still can''t see any entries in the class or filter list. After adding these rules: ------------< snip <------< snip <------< snip <------------ tc qdisc add dev eth0 root handle 1: cbq bandwidth 10Mbit cell 8 avpkt 1000 \ mpu 64 tc class add dev eth0 parent 1:0 classid 1:1 cbq bandwidth 10Mbit rate 10Mbit \ allot 1514 cell 8 weight 1Mbit prio 8 maxburst 20 avpkt 1000 tc class add dev eth0 parent 1:1 classid 1:2 cbq bandwidth 10Mbit rate 3Mbit \ allot 1514 cell 8 weight 100Kbit prio 3 maxburst 20 avpkt 1000 split 1:0 tc class add dev eth0 parent 1:1 classid 1:3 cbq bandwidth 10Mbit rate 8Mbit \ allot 1514 cell 8 weight 800Kbit prio 7 maxburst 20 avpkt 1000 split 1:0 tc filter add dev eth0 parent 1:0 protocol ip prio 100 route ------------< snip <------< snip <------< snip <------------ I get: ------------< snip <------< snip <------< snip <------------ root@rana:~# tc filter show root@rana:~# tc class show root@rana:~# tc qdisc show qdisc cbq 1: dev eth0 rate 10Mbit (bounded,isolated) prio no-transmit root@rana:~# ------------< snip <------< snip <------< snip <------------ As you can see the qdisc is added, but the class and filter entries don''t seem to work. If I type the same filter rule multiple times, it allows it so I don''t think it is added at all. The class entries seem to be added because I get EEXIST if I add the same rule multiple times, but it does not show up in ``tc class show'''' - any ideas? -- Regards Abraham Beware of the Turing Tar-pit in which everything is possible but nothing of interest is easy. ___________________________________________________ Abraham vd Merwe [ZR1BBQ] - Frogfoot Networks P.O. Box 3472, Matieland, Stellenbosch, 7602 Cell: +27 82 565 4451 Http: http://www.frogfoot.net Email: abz@frogfoot.net
> ------------< snip <------< snip <------< snip <------------ > root@rana:~# tc filter show > root@rana:~# tc class show > root@rana:~# tc qdisc show > qdisc cbq 1: dev eth0 rate 10Mbit (bounded,isolated) prio no-transmit > root@rana:~# > ------------< snip <------< snip <------< snip <------------ > > As you can see the qdisc is added, but the class and filter entries don''t > seem to work.Try tc filter show dev eth0 tc class show dev eth0 tc qdisc show dev eth0 Stef -- stef.coene@docum.org "Using Linux as bandwidth manager" http://www.docum.org/ #lartc @ irc.oftc.net _______________________________________________ LARTC mailing list / LARTC@mailman.ds9a.nl http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/