CBQ Traffic control not working
Here is my output... no prio 7...
#########
# OUTPUT
#########
linux:~ # tc -s -d class show dev eth0
class cbq 1: root rate 10Mbit cell 8b mpu 64b (bounded,isolated) prio no-transmit/8 weight 10Mbit allot 1514b level 2 ewma 5 avpkt 1000b maxidle 23us
Sent 59862492 bytes 453121 pkts (dropped 0, overlimits 0)
borrowed 0 overactions 0 avgidle 605 undertime 0
class cbq 1:1 parent 1: rate 72Kbit cell 8b (bounded) prio no-transmit/8 weight 921bps allot 1514b level 1 ewma 5 avpkt 1000b maxidle 95565us
Sent 0 bytes 0 pkts (dropped 0, overlimits 0)
borrowed 0 overactions 0 avgidle 2.5052e+06 undertime 0
class cbq 1:2 parent 1:1 rate 14Kbit cell 8b (bounded) prio no-transmit/8 weight 179bps allot 1514b level 0 ewma 5 avpkt 1000b maxidle 494285us
split 1:
Sent 0 bytes 0 pkts (dropped 0, overlimits 0)
borrowed 0 overactions 0 avgidle 1.29574e+07 undertime 0
class cbq 1:3 parent 1:1 rate 14Kbit cell 8b (bounded) prio no-transmit/8 weight 179bps allot 1514b level 0 ewma 5 avpkt 1000b maxidle 494285us
split 1:
Sent 0 bytes 0 pkts (dropped 0, overlimits 0)
borrowed 0 overactions 0 avgidle 1.29574e+07 undertime 0
class cbq 1:4 parent 1:1 rate 44Kbit cell 8b (bounded) prio no-transmit/8 weight 563bps allot 1514b level 0 ewma 5 avpkt 1000b maxidle 156810us
split 1:
Sent 0 bytes 0 pkts (dropped 0, overlimits 0)
borrowed 0 overactions 0 avgidle 4.11072e+06 undertime 0
class cbq 1:6 parent 1:1 rate 3686bps cell 8b (bounded) prio 3/3 weight 368bps allot 1514b level 0 ewma 5 avpkt 1000b maxidle 239956us
split 1:
Sent 0 bytes 0 pkts (dropped 0, overlimits 0)
borrowed 0 overactions 0 avgidle 6.29031e+06 undertime 0
class cbq 1:8 parent 1:1 rate 64Kbit cell 8b prio 1/1 weight 819bps allot 1514b
level 0 ewma 5 avpkt 1000b maxidle 107595us
split 1:
Sent 0 bytes 0 pkts (dropped 0, overlimits 0)
borrowed 0 overactions 0 avgidle 2.82057e+06 undertime 0
linux:~ #
Quoted 7 lines
Quoted 3 lines
Could it be possible that on hard traffic cbq to just let pass packets? This is a stupid question I guess...
Do I have a chance solving the problem by swtching to HTB?Yes and no :)
htb is easier to understand/implement, there are no obscure options. But if your problem is setup related, reimplementing the rules in htb can create the same problem.
There isn't much of a setup... I just take my private network on eth1, masquerade it and shape it over eth0...
Don't know what to say... take a look at the output, maybe you'll find something wrong.
Don't mind the origninal numbering (of the classes and packet marking) I used in my first message as I changed it for easier reading... anyway, i'm attaching my original shaping script to this message.
One more question: I always use weight = rate / 10. Why does weight has these strange values in my output?
Thank you for your support,
Mugur
#############################################################
# REAL FILE (this is the one that generated the above output)
#############################################################
tc qdisc del dev eth0 root
tc qdisc add dev eth0 root handle 1: cbq bandwidth 10Mbit cell 8 avpkt 1000 mpu 64
tc class add dev eth0 parent 1: classid 1:1 cbq bandwidth 10Mbit rate 72Kbit weight 7.2Kbit prio 8 allot 1514 maxburst 20 avpkt 1000 bounded
tc class add dev eth0 parent 1:1 classid 1:2 cbq bandwidth 10Mbit rate 14Kbit allot 1514 cell 8 weight 1.4Kbit prio 8 maxburst 20 avpkt 1000 split 1:0 bounded tc filter add dev eth0 parent 1:0 protocol ip prio 8 handle 7 fw classid 1:2
tc class add dev eth0 parent 1:1 classid 1:3 cbq bandwidth 10Mbit rate 14Kbit allot 1514 cell 8 weight 1.4Kbit prio 8 maxburst 20 avpkt 1000 split 1:0 bounded tc filter add dev eth0 parent 1:0 protocol ip prio 8 handle 3 fw classid 1:3
tc class add dev eth0 parent 1:1 classid 1:4 cbq bandwidth 10Mbit rate 44Kbit allot 1514 cell 8 weight 4.4Kbit prio 8 maxburst 20 avpkt 1000 split 1:0 bounded tc filter add dev eth0 parent 1:0 protocol ip prio 8 handle 5 fw classid 1:4
tc class add dev eth0 parent 1:1 classid 1:6 cbq bandwidth 10Mbit rate 28.8Kbit allot 1514 cell 8 weight 2.88Kbit prio 3 maxburst 20 avpkt 1000 split 1:0 boun ded
tc filter add dev eth0 parent 1:0 protocol ip prio 3 handle 2 fw classid 1:6
tc filter add dev eth0 parent 1:0 protocol ip prio 3 handle 6 fw classid 1:6
tc filter add dev eth0 parent 1:0 protocol ip prio 3 handle 8 fw classid 1:6
tc class add dev eth0 parent 1:1 classid 1:8 cbq bandwidth 10Mbit rate 64Kbit allot 1514 cell 8 weight 6.4Kbit prio 1 maxburst 20 avpkt 1000 split 1:0 tc filter add dev eth0 parent 1:0 protocol ip prio 1 handle 4 fw classid 1:8
1Help 2UnWrap 3Quit 4Hex 5Line 6RxSrch 7Search 8Raw 9Unform 10Quit
_______________________________________________
LARTC mailing list / [email protected]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
Quoted 1 line · Mugur TOMITA
Here is my output... no prio 7...
Mh. I tested it with htb and there is only prio 0-7.
Quoted 40 lines
#########
# OUTPUT
#########
linux:~ # tc -s -d class show dev eth0
class cbq 1: root rate 10Mbit cell 8b mpu 64b (bounded,isolated) prio no-transmit/8 weight 10Mbit allot 1514b level 2 ewma 5 avpkt 1000b maxidle 23us
Sent 59862492 bytes 453121 pkts (dropped 0, overlimits 0)
borrowed 0 overactions 0 avgidle 605 undertime 0
class cbq 1:1 parent 1: rate 72Kbit cell 8b (bounded) prio no-transmit/8 weight 921bps allot 1514b level 1 ewma 5 avpkt 1000b maxidle 95565us
Sent 0 bytes 0 pkts (dropped 0, overlimits 0)
borrowed 0 overactions 0 avgidle 2.5052e+06 undertime 0
class cbq 1:2 parent 1:1 rate 14Kbit cell 8b (bounded) prio no-transmit/8 weight 179bps allot 1514b level 0 ewma 5 avpkt 1000b maxidle 494285us split 1:
Sent 0 bytes 0 pkts (dropped 0, overlimits 0)
borrowed 0 overactions 0 avgidle 1.29574e+07 undertime 0
class cbq 1:3 parent 1:1 rate 14Kbit cell 8b (bounded) prio no-transmit/8 weight 179bps allot 1514b level 0 ewma 5 avpkt 1000b maxidle 494285us split 1:
Sent 0 bytes 0 pkts (dropped 0, overlimits 0)
borrowed 0 overactions 0 avgidle 1.29574e+07 undertime 0
class cbq 1:4 parent 1:1 rate 44Kbit cell 8b (bounded) prio no-transmit/8 weight 563bps allot 1514b level 0 ewma 5 avpkt 1000b maxidle 156810us split 1:
Sent 0 bytes 0 pkts (dropped 0, overlimits 0)
borrowed 0 overactions 0 avgidle 4.11072e+06 undertime 0
class cbq 1:6 parent 1:1 rate 3686bps cell 8b (bounded) prio 3/3 weight 368bps allot 1514b level 0 ewma 5 avpkt 1000b maxidle 239956us split 1:
Sent 0 bytes 0 pkts (dropped 0, overlimits 0)
borrowed 0 overactions 0 avgidle 6.29031e+06 undertime 0
class cbq 1:8 parent 1:1 rate 64Kbit cell 8b prio 1/1 weight 819bps allot 1514b level 0 ewma 5 avpkt 1000b maxidle 107595us
split 1:
Sent 0 bytes 0 pkts (dropped 0, overlimits 0)
borrowed 0 overactions 0 avgidle 2.82057e+06 undertime 0
linux:~ #
Quoted 6 lines
Quoted 4 lines
Yes and no :)
htb is easier to understand/implement, there are no obscure options. But if your problem is setup related, reimplementing the rules in htb can create the same problem.There isn't much of a setup... I just take my private network on eth1, masquerade it and shape it over eth0...
I mean the shaping setup (classes, filters, ...).
Quoted 2 lines
Don't know what to say... take a look at the output, maybe you'll find something wrong.
All sent counters are 0 execpt for the root class. So I'm quit sure that your filters are not working.
Quoted 2 lines
One more question: I always use weight = rate / 10. Why does weight has these strange values in my output?
I don't know. Like I said, I use htb.
Quoted 33 lines
#############################################################
# REAL FILE (this is the one that generated the above output)
#############################################################
tc qdisc del dev eth0 root
tc qdisc add dev eth0 root handle 1: cbq bandwidth 10Mbit cell 8 avpkt 1000 mpu 64 tc class add dev eth0 parent 1: classid 1:1 cbq bandwidth 10Mbit rate 72Kbit weight 7.2Kbit prio 8 allot 1514 maxburst 20 avpkt 1000 boundedtc class add dev eth0 parent 1:1 classid 1:2 cbq bandwidth 10Mbit rate 14Kbit allot 1514 cell 8 weight 1.4Kbit prio 8 maxburst 20 avpkt 1000 split 1:0 bounded tc filter add dev eth0 parent 1:0 protocol ip prio 8 handle 7 fw classid 1:2
tc class add dev eth0 parent 1:1 classid 1:3 cbq bandwidth 10Mbit rate 14Kbit allot 1514 cell 8 weight 1.4Kbit prio 8 maxburst 20 avpkt 1000 split 1:0 bounded tc filter add dev eth0 parent 1:0 protocol ip prio 8 handle 3 fw classid 1:3
tc class add dev eth0 parent 1:1 classid 1:4 cbq bandwidth 10Mbit rate 44Kbit allot 1514 cell 8 weight 4.4Kbit prio 8 maxburst 20 avpkt 1000 split 1:0 bounded tc filter add dev eth0 parent 1:0 protocol ip prio 8 handle 5 fw classid 1:4
tc class add dev eth0 parent 1:1 classid 1:6 cbq bandwidth 10Mbit rate 28.8Kbit allot 1514 cell 8 weight 2.88Kbit prio 3 maxburst 20 avpkt 1000 split 1:0 boun ded
tc filter add dev eth0 parent 1:0 protocol ip prio 3 handle 2 fw classid 1:6 tc filter add dev eth0 parent 1:0 protocol ip prio 3 handle 6 fw classid 1:6 tc filter add dev eth0 parent 1:0 protocol ip prio 3 handle 8 fw classid 1:6
Quoted 4 lines
tc class add dev eth0 parent 1:1 classid 1:8 cbq bandwidth 10Mbit rate 64Kbit allot 1514 cell 8 weight 6.4Kbit prio 1 maxburst 20 avpkt 1000 split 1:0 tc filter add dev eth0 parent 1:0 protocol ip prio 1 handle 4 fw classid 1:8
Euh. You don't have any filters? How do you redirect traffic to a class? You need some filters to do so.
Stef
Signature · 8 lines
[email protected] "Using Linux as bandwidth manager" http://www.docum.org/ #lartc @ irc.oftc.net _______________________________________________ LARTC mailing list / [email protected] http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/