I thought CBQ was already installed on e-smith (5.6).
So you should make a file in /etc/sysconfig/cbq (like cbq-1024.server-client)
with the following contents:
DEVICE=eth0,100Mbit,10Mbit #my internal network card
RATE=10Kbit
WEIGHT=1Kbit
PEAK=12Kbit
PRIO=6
RULE=192.168.100.120
Now you should be able to start cbq with: 'cbq start'. If you have multiple shaperfiles in /etc/sysconfig/cbq, you can individually start cbq-1024.server-client by adding the filename behind start, eg: 'cbq start cbq-1024.server-client'.
Remember that the only direction you can shape traffic, is outbound of a networkcard. This config file now shapes all outbound traffic, for 192.168.100.120, to 10Kbit (1KB/s). Eg. The client .120 can now download at a maximum of 1 KB/s. His upload is still my full upload capacity, but because your computer wants to know if his transmitted packets did arrive, this download-limiter also limits his upload.
You can limit the upload of the client by shape the traffic of you server's outbound card (eth1). So you should make another file (cbq-1024.client-server) with the correct changes. The problem here is that if you are use NAT, the NAT translation comes before CBQ. So there is only 1 ip-adres (your external one) that is available for shaping. This would mean that you could only shape traffic for all you clients. To overcome this you can let iptables (your firewall) to 'mark' packets coming out of the client (.120) and the shape the traffic on this mark. (instead of the ip-adres)
I don't remeber the excact rule for the firewall, but it should look like this:
iptables --table mangle -A POSTROUTING --out-interface eth1 --source 192.168.100.120 -j MARK --set-mark 1
the cbq-config file should look like this:
DEVICE=eth1,10Mbit,1Mbit #my external network card
RATE=10Kbit
WEIGHT=1Kbit
PEAK=12Kbit
PRIO=6
MARK=1 #Same number as you gave iptables
You can then test if there are serveral 'virtual network cards': ./tc -s flter show dev eth1
It whould return something like this:
filter parent 1: protocol ip pref 200 fw
filter parent 1: protocol ip pref 200 fw handle 0x2 classid 1:1280
With this command: ./tc -s class show dev eth1
you can see if any data is going through the slower data-channel. It should return something like this:
class cbq 1: root rate 10Mbit (bounded,isolated) prio no-transmit
Sent 12300615 bytes 14751 pkts (dropped 0, overlimits 0)
borrowed 0 overactions 0 avgidle 624 undertime 0
class cbq 1:1280 parent 1: leaf 1280: rate 150Kbit (bounded) prio 6
Sent 4189511 bytes 5771 pkts (dropped 291, overlimits 1975)
backlog 16p
borrowed 0 overactions 587 avgidle 39805 undertime 0