Menu

#27 Limit bandwidth to 80kbps for each ip in network

open
nobody
None
5
2005-04-16
2005-04-16
Sebastian
No

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 (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 each 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

Discussion

  • guille4

    guille4 - 2005-05-01

    Logged In: YES
    user_id=1270318

    What you need is very simple: make a only one file per class,
    not put all rules togheter in only 1 file.

     
  • guille4

    guille4 - 2005-05-01

    Logged In: YES
    user_id=1270318

    Because, if you put all these rules in 1 file class,
    simultaneous connections will share te same bandwidth
    assigned to this class.

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.