Hi, All,
I did some work on QoS with CBQ. Basically, I
wanted to separate VoIP traffic from other traffics and give it guarantied
bandwidth. I used the following scripts to do the work,
#!/bin/sh OPTION="allot 1514 maxburst 20 avpkt 1000" tc qdisc del dev eth0 root tc qdisc add dev eth0 root handle 10: cbq bandwidth 10mbit avpkt 1000 tc class add dev eth0 parent 10: classid 10:2 cbq bandwidth 10mbit rate 34kbit $OPTION prio 3 bounded tc class add dev eth0 parent 10:2 classid 10:10 cbq bandwidth 10mbit rate 30kbit $OPTION prio 3 tc class add dev eth0 parent 10:2 classid 10:20 cbq bandwidth 10mbit rate
4kbit $OPTION prio3 tc filter add dev eth0 parent 10: protocol ip prio 3 u32 match ip dst 0/0 flowid 10:2 tc filter add dev eth0 parent 10:2 protocol ip prio 3 u32 match ip tos 0x20 0xf0 flowid 10:10 tc filter add dev eth0 parent 10:2 protocol ip prio 3 u32 match ip dst 0/0 flowid 10:20 |