[LARTC] Messed something up with cbq

Linux Advanced Routing and Traffic Control

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

 



hi there,

I tried to setup traffic control in analogy to the howto - but for
some reason it seams not to work. I looked around in the
mailing-list-archive but didn't get a clue what I messed up. So this
is what I want to do:

I. Marking the paketes with iptables
I think this works, because if I list the mangle rules the counter
is increased.

II. Controlling the traffic
Probably I messed up something here - perhaps someone can show me the
point?

The problem seems that no traffic is going to the right queues.
This is what `tc -s qdisc` shows: 

| qdisc sfq 8014: dev eth0 quantum 1514b perturb 15sec 
| Sent 0 bytes 0 pkts (dropped 0, overlimits 0) 
[...]
| qdisc prio 8012: dev eth0 bands 3 priomap  1 2 2 2 1 2 0 0 1 1 1 1 1
| 1 1 1
| Sent 0 bytes 0 pkts (dropped 0, overlimits 0) 
[...]
| qdisc cbq 2: dev eth0 rate 128Kbit (bounded,isolated) prio
| no-transmit
| Sent 879303 bytes 6518 pkts (dropped 0, overlimits 0) 
| borrowed 0 overactions 0 avgidle 49999 undertime 0

As you can see the byte-counter does not increase except for the main
queue.

This is my configuration:

# first create 'queuing discipline', root class and 5 subclasses

# $TC qdisc add dev eth0 root handle 2: cbq bandwidth 128Kbit avpkt \
  1000 mpu 64
# $TC class add dev eth0 parent 2:0 classid 2:1 cbq bandwidth \ 
  128Kbit rate 128Kbit allot 1492 weight 12Kbit prio 8 maxburst 20 \
  avpkt 1000
# $TC class add dev eth0 parent 2:1 classid 2:100 cbq bandwidth \
  128Kbit rate 32Kbit allot 1492 weight 3Kbit prio 4 maxburst 20 \ 
  avpkt 1000
# $TC class add dev eth0 parent 2:1 classid 2:200 cbq bandwidth \
  128Kbit rate 28Kbit allot 1492 weight 3Kbit prio 1 maxburst 20 \
  avpkt 1000
# $TC class add dev eth0 parent 2:1 classid 2:300 cbq bandwidth \
  128Kbit rate 28Kbit allot 1492 weight 3Kbit prio 1 maxburst 20 \
  avpkt 1000
# $TC class add dev eth0 parent 2:1 classid 2:400 cbq bandwidth \
  128Kbit rate 20Kbit allot 1492 weight 2Kbit prio 5 maxburst 20 \ 
  avpkt 1000
# $TC class add dev eth0 parent 2:1 classid 2:500 cbq bandwidth \
  128Kbit rate 20Kbit allot 1492 weight 1Kbit prio 5 maxburst 20 \
  avpkt 1000

# now create leaf classes

# $TC qdisc add dev eth0 parent 2:100 prio
# $TC qdisc add dev eth0 parent 2:200 prio
# $TC qdisc add dev eth0 parent 2:300 prio
# $TC qdisc add dev eth0 parent 2:400 sfq quantum 1514b perturb 15
# $TC qdisc add dev eth0 parent 2:500 sfq quantum 1514b perturb 15

# and filter traffic to the right queues

# $TC filter add dev eth0 parent 2:0 protocol ip prio 100 handle \
  11 fw classid 2:100
# $TC filter add dev eth0 parent 2:0 protocol ip prio 100 handle \
  21 fw classid 2:200
# $TC filter add dev eth0 parent 2:0 protocol ip prio 100 handle \
  31 fw classid 2:300
# $TC filter add dev eth0 parent 2:0 protocol ip prio 100 handle \
  41 fw classid 2:400
# $TC filter add dev eth0 parent 2:0 protocol ip prio 100 handle \
  51 fw classid 2:500

This should be very similar to the how-to but it doesn't work - any
ideas?

thanks a lot in advance
                          Sebastian

-- 
Sebastian 'spax' Pape           | There are three types of people in the world;
fax2mail: +49-89-2443-14398     | those who can count, and those who can't.   
mailto  : sebastian@xxxxxxxxxx  | 
         --- Do you want to know more? http://www.p-a-p-e.de/ ---




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