* [LARTC] CBQ and prio problem
@ 2002-03-04 12:11 MR
2002-03-04 12:56 ` Stef Coene
0 siblings, 1 reply; 2+ messages in thread
From: MR @ 2002-03-04 12:11 UTC (permalink / raw)
To: lartc
Hi,
I'm trying to configure a Linux machine to act as a "DS router" (ie it
should manage differents priorities based on the TOS field) and as a traffic
shaper too (let's say 800Kbit of 10Mbit).
I've used the following commands but i wasn't able to shape the outgoing
traffic (the prio works fine).
Thanks in advance for any idea,
Max
#!/bin/sh
TC="/usr/sbin/stc"
DEVICE="eth0"
total="10Mbit"
$TC qdisc add dev $DEVICE root handle 1: cbq bandwidth $total avpkt 1000 \
cell 8
$TC class add dev $DEVICE parent 1:0 classid 1:1 cbq bandwidth $total \
rate 800Kbit allot 1514 avpkt 1000 weight 80Kbit prio 8 maxburst 20 \
mpu 64 bounded
$TC qdisc add dev $DEVICE parent 1:1 handle 100: prio bands 3 priomap 2 1 0
$TC qdisc add dev $DEVICE parent 100:1 tbf rate 10Mbit burst 10Mbit \
limit 10Mbit
$TC qdisc add dev $DEVICE parent 100:2 tbf rate 10Mbit burst 10Mbit \
limit 10Mbit
$TC qdisc add dev $DEVICE parent 100:3 tbf rate 10Mbit burst 10Mbit \
limit 10Mbit
#############FILTERS############
$TC filter add dev $DEVICE parent 1:0 prio 1 \
protocol ip u32 \
match u32 0x00200000 0x00FC0000 at 0 \
flowid 100:1
$TC filter add dev $DEVICE parent 1:0 prio 1 \
protocol ip u32 \
match u32 0x00400000 0x00FC0000 at 0 \
flowid 100:2
_______________________________________________
LARTC mailing list / LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [LARTC] CBQ and prio problem
2002-03-04 12:11 [LARTC] CBQ and prio problem MR
@ 2002-03-04 12:56 ` Stef Coene
0 siblings, 0 replies; 2+ messages in thread
From: Stef Coene @ 2002-03-04 12:56 UTC (permalink / raw)
To: lartc
On Monday 04 March 2002 13:11, MR wrote:
> Hi,
> I'm trying to configure a Linux machine to act as a "DS router" (ie it
> should manage differents priorities based on the TOS field) and as a
> traffic shaper too (let's say 800Kbit of 10Mbit).
> I've used the following commands but i wasn't able to shape the outgoing
> traffic (the prio works fine).
>
> Thanks in advance for any idea,
> Max
You create a bounded class of 800kbit. So all traffic is bounded to 800kbit.
But after that, you attach 3 tbf qdisc's with rate = 10mbit. Why? What
happens if you remove the 3 tbf qdisc's ?
>
> #!/bin/sh
>
> TC="/usr/sbin/stc"
> DEVICE="eth0"
> total="10Mbit"
>
> $TC qdisc add dev $DEVICE root handle 1: cbq bandwidth $total avpkt 1000 \
> cell 8
>
> $TC class add dev $DEVICE parent 1:0 classid 1:1 cbq bandwidth $total \
> rate 800Kbit allot 1514 avpkt 1000 weight 80Kbit prio 8 maxburst 20 \
> mpu 64 bounded
>
> $TC qdisc add dev $DEVICE parent 1:1 handle 100: prio bands 3 priomap 2 1 0
>
> $TC qdisc add dev $DEVICE parent 100:1 tbf rate 10Mbit burst 10Mbit \
> limit 10Mbit
> $TC qdisc add dev $DEVICE parent 100:2 tbf rate 10Mbit burst 10Mbit \
> limit 10Mbit
> $TC qdisc add dev $DEVICE parent 100:3 tbf rate 10Mbit burst 10Mbit \
> limit 10Mbit
>
>
> #############FILTERS############
>
> $TC filter add dev $DEVICE parent 1:0 prio 1 \
> protocol ip u32 \
> match u32 0x00200000 0x00FC0000 at 0 \
> flowid 100:1
>
> $TC filter add dev $DEVICE parent 1:0 prio 1 \
> protocol ip u32 \
> match u32 0x00400000 0x00FC0000 at 0 \
> flowid 100:2
>
> _______________________________________________
> LARTC mailing list / LARTC@mailman.ds9a.nl
> http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
--
stef.coene@docum.org
More QOS info : http://www.docum.org/
Title : "Using Linux as bandwidth manager"
_______________________________________________
LARTC mailing list / LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2002-03-04 12:56 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-03-04 12:11 [LARTC] CBQ and prio problem MR
2002-03-04 12:56 ` Stef Coene
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.