23/11/2001 : This page is not valid. Plz go to docum.org
TODO : Check prio because I think not working
To test it, I generate tcp traffic to fullfill the total bandwidth and I start a ping. I don't know it's a good indication, but that's the best I found.
#!/bin/sh RATE_TOT=100kbps IP=kriek DEV="dev eth0" OPTION="allot 1514 maxburst 20 avpkt 1000" tc qdisc del $DEV root tc qdisc add $DEV root handle 10: cbq bandwidth 10mbit avpkt 1000 tc class add $DEV parent 10:0 classid 10:1 cbq bandwidth 10mbit rate $RATE_TOT $OPTION prio 3 bounded isolated tc qdisc add $DEV parent 10:1 handle 20: prio tc filter add $DEV parent 10: protocol ip prio 3 handle 1 fw classid 10:1 tc filter add $DEV parent 10: protocol ip prio 3 handle 2 fw classid 10:1 tc filter add $DEV parent 20: protocol ip prio 3 handle 1 fw classid 20:1 tc filter add $DEV parent 20: protocol ip prio 3 handle 2 fw classid 20:3 iptables -F iptables -X iptables -N acc_0 iptables -N acc_1 iptables -A OUTPUT -t mangle -p ! tcp -j MARK --set-mark 1 iptables -A OUTPUT -t mangle -p tcp -j MARK --set-mark 2 iptables -A OUTPUT -p ! tcp -j acc_0 iptables -A OUTPUT -p tcp -j acc_1
Used script (download)
I also tried all possible combinations of the prio parameter, but the results didn't change.
| Result | |
|---|---|
| CBQ With qdisc | 11.4 ms |
| CBQ With NO qdisc 20: | 207.1 ms |
| PRIO : ping in band 1, rest in band 1 | 268.9 ms |
| PRIO : ping in band 1, rest in band 3 | 18.3 ms |
| PRIO : ping in band 1, rest in band 5 | 18.9 ms |
| PRIO : ping in band 3, rest in band 1 (X) | 83 s |
(X) :
10 packets transmitted, 5 packets received, 50% packet loss
round-trip min/avg/max = 23233.2/83230.2/143223.3 ms
adapted prio script:
Used script (download)
adapted CBQ script:
Used script (download)