A sample CBQ configuration 40 parameters for giving one host 5mbit, the other 1mbit! # tc qdisc add dev eth1 root handle 1:0 cbq bandwidth 100Mbit avpkt 1000 cell 8 # tc class add dev eth1 parent 1:0 classid 1:1 cbq bandwidth 100Mbit rate \ 100Mbit weight 10Mbit prio 8 allot 1514 cell 8 maxburst 20 avpkt 1000 # tc class add dev eth0 parent 1:1 classid 1:1280 cbq bandwidth 100Mbit \ rate 5Mbit weight 1Mbit prio 5 allot 1514 cell 8 maxburst 20 avpkt 1000 bounded # tc qdisc add dev eth0 parent 1:1280 tbf rate 5Mbit buffer 10Kb/8 limit \ 15Kb mtu 1500 # tc filter add dev eth0 parent 1:0 protocol ip prio 100 u32 match ip \ src 1.2.3.4/32 flowid 1:1280 # tc class add dev eth1 parent 1:1 classid 1:1281 cbq bandwidth 100Mbit \ rate 1Mbit weight 200Kbit prio 5 allot 1514 cell 8 maxburst 20 avpkt 1000 bounded # tc qdisc add dev eth1 parent 1:1281 tbf rate 1Mbit buffer 10Kb/8 limit \ 15Kb mtu 1500 # tc filter add dev eth1 parent 1:0 protocol ip prio 100 u32 match ip \ src 1.2.3.5/0 flowid 1:1281