[LARTC] CBQ and prio problem

Linux Advanced Routing and Traffic Control

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,
 I'm trying to configure a Linux machine to act as a "DS router" (ie it=20
should manage differents priorities based on the TOS field) and as a traf=
fic=20
shaper too (let's say 800Kbit of 10Mbit).=20
I've used the following commands but i wasn't able to shape the outgoing=20
traffic (the prio works fine).

Thanks in advance for any idea,
 Max

#!/bin/sh

TC=3D"/usr/sbin/stc"
DEVICE=3D"eth0"
total=3D"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



[Index of Archives]     [LARTC Home Page]     [Netfilter]     [Netfilter Development]     [Network Development]     [Bugtraq]     [GCC Help]     [Yosemite News]     [Linux Kernel]     [Fedora Users]
  Powered by Linux