I'd like to limit the upload/download bandwidth for each ip in my LAN to 80kbps with CBQ. I have 2 files called cbq-80.eth1_up and cbq-80.eth0_down, as follows:
--------------------
cbq-80.eth1_up
--------------------
DEVICE=eth1,100Mbit,10Mbit
RATE=80Kbit
WEIGHT=8Kbit
PRIO=6
MARK=10
MARK=11
MARK=12
MARK=13
MARK=14
MARK=15
MARK=16
MARK=17
MARK=18
MARK=19
MARK=20
--------------------
cbq-80.eth0_down
--------------------
DEVICE=eth0,100Mbit,10Mbit
RATE=80Kbit
WEIGHT=8Kbit
PRIO=6
RULE=10.38.1.10
RULE=10.38.1.11
RULE=10.38.1.12
RULE=10.38.1.13
RULE=10.38.1.14
RULE=10.38.1.15
RULE=10.38.1.16
RULE=10.38.1.17
RULE=10.38.1.18
RULE=10.38.1.19
RULE=10.38.1.20
For limiting upload I mark packets (becouse I use NAT) with
iptables --table mangle -A POSTROUTING --out-interface eth1 --source 10.38.1.10 -j MARK --set-mark 10
iptables --table mangle -A POSTROUTING --out-interface eth1 --source 10.38.1.11 -j MARK --set-mark 11
(and so on for every ip)
The problem I have is that the ip's get 80kbps bandwidth divided to them not each ip taking a 80kbps bandwidth for upload and 80kbps for download.
Please help me with this.
Sebastian