在失败后我一直尝试使用cbq
权重属性。 我尝试使用在示例中找到的命令集来验证它是否有效(HTB 运行流畅)HTB
这是我使用的命令:
# 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
我预计速率会受到限制,但事实并非如此(我获得了完整的带宽)
当我使用tc class show
/tc qdisc show
我看到数据包确实经过了正确的类/qdiscs。
我创建的结构有问题吗?