Mailing List Archive

Traffic Prioritization and CBQ
G'day,

I'm running CBQ on a linux router to limit our school bandwidth, and the ISP's bandwidth, and I've got a couple of questions...

First, if I turn 'Bounded' off, the classes don't seem to want to share bandwidth with their peers, or with their parent.

Second, I want to be able to set priorities with traffic, without setting a defined bandwidth to it. ... I have no idea where to start with this, any suggetions?

ie.
- Web server traffic to the world, priority 1
- Web REQUESTS (ISP to world port 80), priority 2
- ISP traffic, prioirty 3
- Internal office traffic, priority 4

... My classes are setup as follows:

# Root class, 10Mbit network
tc qdisc add dev eth0 root handle 1:0 cbq bandwidth 10Mbit avpkt 1000 cell 8

# Main parent class, takes up whole 10Mbit pipe
tc class add dev eth0 parent 1:0 classid 1:1 cbq bandwidth 10Mbit rate 10Mbit weight 1Mbit prio 8 allot 1514 cell 8 maxburst 20 avpkt 1000

# I dunno, cbq.init does this, another class taking up the whole 10Mbit pipe
tc class add dev eth0 parent 1:1 classid 1:101 cbq bandwidth 10Mbit rate 10Mbit weight 1Mbit prio 1 allot 1514 cell 8 maxburst 20 avpkt 1000

# Setup a queue disciplin of tbf for the :101 class
tc qdisc add dev eth0 parent 1:101 tbf rate 10Mbit buffer 10Kb/8 limit 15Kb mtu 1500

# Add a test class, 8kbit/s, parent :101 with TBF queueing
tc class add dev eth0 parent 1:101 classid 1:113 cbq bandwidth 10Mbit rate 8kbit weight 1kbit prio 1 allot 1514 cell 8 maxburst 20 avpkt 1000
tc qdisc add dev eth0 parent 1:113 tbf rate 8kbit buffer 10Kb/8 limit 15Kb mtu 1500
tc filter add dev eth0 parent 1:0 protocol ip prio 100 u32 match ip src myftpserver match ip dst myPC flowid 1:113

# Add a class for all ISP traffic, 500kbit/s, parent :101 with TBF queueing
tc class add dev eth0 parent 1:101 classid 1:119 cbq bandwidth 10Mbit rate 500kbit weight 50kbit prio 5 allot 1514 cell 8 maxburst 20 avpkt 1000
tc qdisc add dev eth0 parent 1:119 tbf rate 5000kbit buffer 10Kb/8 limit 15Kb mtu 1500
tc filter add dev eth0 parent 1:0 protocol ip prio 100 u32 match ip dst TheISP flowid 1:119


... So there should be free bandwidth in the ISP class, and the parent class... by my PC *STILL* gets ftp traffic at 8kbit/s...

Any suggestions?


Will Lotto
Systems Administrator
Bendigo Senior Secondary College