I've been trying to use cbq weight attributes after HTB failed to do so.
I've tried using a command set I've found in an example just to verify it works (HTB works fluently)
Here is the commands I used :
# Attaching the Qdisc to the eth0 device. The maximum available bandwidth is
# 10Mbit.
tc qdisc add dev eth0 root handle 1: cbq bandwidth 10Mbit cell 8 avpkt 1000 \
mpu 64
# Adding the root class to the queuing discipline. The root has 10 Mbit
# completely.
tc class add dev eth0 parent 1:0 classid 1:1 cbq bandwidth 10Mbit rate 10Mbit \
allot 1514 cell 8 weight 1Mbit prio 8 maxburst 20 avpkt 1000
# Traffic to testbed11. The priority is 3 and the allocation is 3 Mbit.
tc class add dev eth0 parent 1:1 classid 1:2 cbq bandwidth 10Mbit rate 3Mbit \
allot 1514 cell 8 weight 100Kbit prio 3 maxburst 20 avpkt 1000 split 1:0
# Traffic to testbed13. The priority is 7 and the allocation is 7 Mbit.
tc class add dev eth0 parent 1:1 classid 1:3 cbq bandwidth 10Mbit rate 8Mbit \
allot 1514 cell 8 weight 800Kbit prio 7 maxburst 20 avpkt 1000 split 1:0
# Installing the route classifier on the root of the tree.
tc filter add dev eth0 parent 1:0 prio 1 u32 match mark 0x123 0xfff flowid 1:2
I expected the rate to limit but it didn't (I got full bandwidth)
When I used tc class show / tc qdisc show I saw the packets do go through the correct classes / qdiscs.
Is there something wrong with the structure I created ?
Aucun commentaire:
Enregistrer un commentaire