2002-02-09 11:46:01

by Marc Schiffbauer

[permalink] [raw]
Subject: ingress policing still not working in 2.4?

Hi all,

Is ingress policing not working in the current Kernel?

I'm using the Script from the Advanced Routing HOWTO
(Thanks for that BTW!)

While trying to do a

# tc qdisc add dev ppp0 handle ffff: ingress

I get this:
RTNETLINK answers: No such file or directory


Before that I successfully did this:
# install root CBQ
DEV=ppp0
UPLINK=100
DOWNLINK=750
tc qdisc add dev $DEV root handle 1: cbq avpkt 1000 bandwidth 100mbit

tc class add dev $DEV parent 1: classid 1:1 cbq rate ${UPLINK}kbit \
allot 1500 prio 5 bounded isolated

tc class add dev $DEV parent 1:1 classid 1:10 cbq rate ${UPLINK}kbit \
allot 1600 prio 1 avpkt 1000

tc class add dev $DEV parent 1:1 classid 1:20 cbq rate $[9*$UPLINK/10]kbit \
allot 1600 prio 2 avpkt 1000

tc qdisc add dev $DEV parent 1:10 handle 10: sfq perturb 10
tc qdisc add dev $DEV parent 1:20 handle 20: sfq perturb 10

tc filter add dev $DEV parent 1:0 protocol ip prio 10 u32 \
match ip tos 0x10 0xff flowid 1:10

tc filter add dev $DEV parent 1:0 protocol ip prio 11 u32 \
match ip protocol 1 0xff flowid 1:10

tc filter add dev $DEV parent 1: protocol ip prio 12 u32 \
match ip protocol 6 0xff \
match u8 0x05 0x0f at 0 \
match u16 0x0000 0xffc0 at 2 \
match u8 0x10 0xff at 33 \
flowid 1:10

tc filter add dev $DEV parent 1: protocol ip prio 13 u32 \
match ip dst 0.0.0.0/0 flowid 1:20


I have crawled the archives and found some mails describing this
problem but I did not find any solution. Some of the mails were
from year 2000...

So does anybody know a solution for that Problem?

I'm using Kernel 2.4.17 with everything <M>'ed or [*]'ed in
QoS-Setup.

The Docu says something about the module would be called cls_ingress.o
but there is only sch_ingress.o. Is this a Docu-Bug BTW?

All sch_* modules seem to load perfectly.

regards
-Marc

--
BUGS My programs never have bugs. They just develop random
features. If you discover such a feature and you want it to
be removed: please send an email to [email protected]


2002-02-09 23:57:05

by bert hubert

[permalink] [raw]
Subject: Re: ingress policing still not working in 2.4?

On Sat, Feb 09, 2002 at 11:48:50AM +0000, Marc Schiffbauer wrote:
> Hi all,
>
> Is ingress policing not working in the current Kernel?
>
> I'm using the Script from the Advanced Routing HOWTO
> (Thanks for that BTW!)
>
> While trying to do a
>
> # tc qdisc add dev ppp0 handle ffff: ingress
>
> I get this:
> RTNETLINK answers: No such file or directory

Get a newer tc, it appears to fix this problem.

> Before that I successfully did this:
> # install root CBQ
> DEV=ppp0
> UPLINK=100
> DOWNLINK=750
> tc qdisc add dev $DEV root handle 1: cbq avpkt 1000 bandwidth 100mbit

The WonderShaper!

Regards,

bert

--
http://www.PowerDNS.com Versatile DNS Software & Services
http://www.tk the dot in .tk
Netherlabs BV / Rent-a-Nerd.nl - Nerd Available -
Linux Advanced Routing & Traffic Control: http://ds9a.nl/lartc

2002-02-10 08:55:49

by Marc Schiffbauer

[permalink] [raw]
Subject: Re: ingress policing still not working in 2.4?

* bert hubert schrieb am 10.02.02 um 00:56 Uhr:
> On Sat, Feb 09, 2002 at 11:48:50AM +0000, Marc Schiffbauer wrote:
> > RTNETLINK answers: No such file or directory
>
> Get a newer tc, it appears to fix this problem.
>

Yes, the debian unstable package did it, thanks.


> > Before that I successfully did this:
> > # install root CBQ
> > DEV=ppp0
> > UPLINK=100
> > DOWNLINK=750
> > tc qdisc add dev $DEV root handle 1: cbq avpkt 1000 bandwidth 100mbit
>
> The WonderShaper!
>
What?

Ok, I changed the 10mbit to 100mbit because this is my LAN speed
here. I first didn't see, that the root handle is per device.

But
tc qdisc add dev $DEV root handle 1: cbq avpkt 1000 bandwidth 10mbit

is exactly the line from your HOWTO. So what will be proper values
for my DSL Line with 128kbit up and 768kbit downstream?

Regards
-Marc

--
BUGS My programs never have bugs. They just develop random
features. If you discover such a feature and you want it to
be removed: please send an email to [email protected]

2002-02-10 11:11:57

by bert hubert

[permalink] [raw]
Subject: Re: ingress policing still not working in 2.4?

On Sun, Feb 10, 2002 at 08:56:42AM +0000, Marc Schiffbauer wrote:

> > > Before that I successfully did this:
> > > # install root CBQ
> > > DEV=ppp0
> > > UPLINK=100
> > > DOWNLINK=750
> > > tc qdisc add dev $DEV root handle 1: cbq avpkt 1000 bandwidth 100mbit
> >
> > The WonderShaper!
> >
> What?

That's the name of this script.

> Ok, I changed the 10mbit to 100mbit because this is my LAN speed
> here. I first didn't see, that the root handle is per device.

I haven't yet seen DSL devices that talk 100mbit, btw. But there might be.

> But
> tc qdisc add dev $DEV root handle 1: cbq avpkt 1000 bandwidth 10mbit
>
> is exactly the line from your HOWTO. So what will be proper values
> for my DSL Line with 128kbit up and 768kbit downstream?

I get a lot of email about this script and generally it requires some
tuning. Not all kbits are equal it appears. Some ISPs measure without ip
overhead, some with, other ISPs include PPP overhead, or PPPoA overhead, so
there is no general rule.

Whenever I deploy this script I spend some time tuning the UPLINK and
DOWNLINK values until I get the best results (maximum speed, but no
queueuing).

Good luck!

Regards,

bert

--
http://www.PowerDNS.com Versatile DNS Software & Services
http://www.tk the dot in .tk
Netherlabs BV / Rent-a-Nerd.nl - Nerd Available -
Linux Advanced Routing & Traffic Control: http://ds9a.nl/lartc