Hi, I have config like this ,... but all traffic goes to the default class 1:4, WHY ? What I'' doing wrong... filters are attached to the root ! tc qdisc add dev eth0 handle 1:0 root htb default 4 tc class add dev eth0 parent 1:0 classid 1:4 htb rate 55kbit ceil 55kbit prio 7 <--default class tc class add dev eth0 parent 1:0 classid 1:1 htb rate 20Mbit tc qdisc add dev eth0 handle 2:0 parent 1:1 htb tc class add dev eth0 parent 2:0 classid 2:3 htb rate 30kbit ceil 30kbit tc qdisc add dev eth0 handle 3:0 parent 2:3 sfq tc filter add dev eth0 parent 1:0 protocol ip prio 2 u32 match ip dst x.x.x.X classid 2:3 tc class add dev eth0 parent 2:0 classid 2:5 htb rate 30kbit ceil 30kbit tc qdisc add dev eth0 handle 4:0 parent 2:5 sfq tc filter add dev eth0 parent 1:0 protocol ip prio 2 u32 match ip dst x.x.x.X classid 2:5 tc filter add dev eth0 parent 1:0 protocol ip prio 2 u32 match ip dst x.x.x.X classid 2:5 ...... and many like this _______________________________________________ LARTC mailing list / LARTC@mailman.ds9a.nl http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
Hi, I had a similar problem. My conclusion was that u32 match ip dst does not work in 2.4.22. Do you use 2.4.22? If so, try upgrade to 2.4.23-rc1 if you can.. raptor wrote:>Hi, > >I have config like this ,... but all traffic goes to the default class 1:4, WHY ? >What I'' doing wrong... filters are attached to the root ! > >tc qdisc add dev eth0 handle 1:0 root htb default 4 > > tc class add dev eth0 parent 1:0 classid 1:4 htb rate 55kbit ceil 55kbit prio 7 <--default class > > tc class add dev eth0 parent 1:0 classid 1:1 htb rate 20Mbit > tc qdisc add dev eth0 handle 2:0 parent 1:1 htb > > tc class add dev eth0 parent 2:0 classid 2:3 htb rate 30kbit ceil 30kbit > tc qdisc add dev eth0 handle 3:0 parent 2:3 sfq > tc filter add dev eth0 parent 1:0 protocol ip prio 2 u32 match ip dst x.x.x.X classid 2:3 > > tc class add dev eth0 parent 2:0 classid 2:5 htb rate 30kbit ceil 30kbit > tc qdisc add dev eth0 handle 4:0 parent 2:5 sfq > tc filter add dev eth0 parent 1:0 protocol ip prio 2 u32 match ip dst x.x.x.X classid 2:5 > tc filter add dev eth0 parent 1:0 protocol ip prio 2 u32 match ip dst x.x.x.X classid 2:5 > >...... and many like this >_______________________________________________ >LARTC mailing list / LARTC@mailman.ds9a.nl >http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/ > >_______________________________________________ LARTC mailing list / LARTC@mailman.ds9a.nl http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
George sorry for the copy, raptor am yet to see any problem, but tell me is eth0 ur lan or wan, are u trying to control upload or download ? AFAIK, if u have 2 lan cards and eth0 is wan and eth1 lan to control download, place htb on eth1 with dst match to control upload, place htb on eth0 with src match K _________________________________________________________________ From Beethoven to the Rolling Stones, your favorite music is always playing on MSN Radio Plus. No ads, no talk. Trial month FREE! http://join.msn.com/?page=offers/premiumradio _______________________________________________ LARTC mailing list / LARTC@mailman.ds9a.nl http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
yep my test kernel is 2.4.22-ck, but this also happens on other machine with 2.4.20 kernel !! i''m with gentoo.. So it has to be something into the kernel.. that is in both of them..!? _______________________________________________ LARTC mailing list / LARTC@mailman.ds9a.nl http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
I am using 2.4.20 with fw filters and 2.4.22 with u32 filters, had no problem as far. On Wed, 19 Nov 2003 00:48:18 +0200 raptor <raptor@tvskat.net> wrote:> yep my test kernel is 2.4.22-ck, but this also happens on other > machine with 2.4.20 kernel !! i''m with gentoo.. So it has to be > something into the kernel.. that is in both of > them..!?_______________________________________________ LARTC mailing > list / LARTC@mailman.ds9a.nl > http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/-- Cezar ATANASIU GMB Computers Departamentul Internet Tel/fax: +40 241 619222/673199 _______________________________________________ LARTC mailing list / LARTC@mailman.ds9a.nl http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
I seem to solved the problem !! just on top of my head... I had the following config (by memory) : root qdisc htb |---class X htb => qdisc X | |---class Y ==> qdicsY | |---class Z ==> qdicsZ |---class A and with u32-fitlter attached to root I directed the traffic to class Y,Z etc.... Now i made it like this : root qdisc htb |---class X htb | |---class Y ==> qdicsY | |---class Z ==> qdicsZ |---class A u see no qdisc....and it works.. do u have explanation ?! ... take into account that class X is htb :")> yep my test kernel is 2.4.22-ck, but this also happens on other machine with 2.4.20 kernel !! i''m with gentoo.. > So it has to be something into the kernel.. that is in both of them..!?_______________________________________________ LARTC mailing list / LARTC@mailman.ds9a.nl http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
Stef Coene
2003-Nov-19 18:30 UTC
Re: Re: [LARTC]probably solved... why all goes to default!!
On Wednesday 19 November 2003 12:51, raptor wrote:> I seem to solved the problem !! > just on top of my head... I had the following config (by memory) : > > > root qdisc htb > > |---class X htb => qdisc X > | > | |---class Y ==> qdicsY > | |---class Z ==> qdicsZ > | > |---class A > > and with u32-fitlter attached to root I directed the traffic to class Y,Z > etc.... Now i made it like this : > > root qdisc htb > > |---class X htb > | > | |---class Y ==> qdicsY > | |---class Z ==> qdicsZ > | > |---class A > > u see no qdisc....and it works.. do u have explanation ?! ... take into > account that class X is htb :")A filter only works within 1 qdisc. You can get your first setup working if you add 2 filters, one for the root qdisc and one for the qdisc X. Stef -- 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/
|> u see no qdisc....and it works.. do u have explanation ?! ... take into |> account that class X is htb :") |A filter only works within 1 qdisc. You can get your first setup working if |you add 2 filters, one for the root qdisc and one for the qdisc X. ]- cant see the logic ''could u explain the algorithm behind this behavior... The description of the algorithm of enqueuing(), desicion-making for walking the qdisc/classes/filters and then dequeing() is very sparse :"( and well hidden in several separate lines of text into the LARTC docs :") The same goes for iptables and ip-route behaviour, not to blame anyone for this but it is hard to grasp them all together... i just want to say it is harder for non-C programmers to understand this all... no offense here _______________________________________________ LARTC mailing list / LARTC@mailman.ds9a.nl http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/