RE: [LARTC] Limit bandwidth per client

Linux Advanced Routing and Traffic Control

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



~From: Stuart Mackintosh <sm@xxxxxxxxxx>
~Date: 12 May 2003 17:08:10 +0100
~Subject: [LARTC] Limit bandwidth per client

~Hi all,

~I have an installation where each user on subnet 192.168.1.0/24 is
~connected via a multiplexer. 
~The problem is that if any client uses more than about 48Kb/s, the
~multiplexer crashes. 

~I need to limit each client to under this rate, say 32Kb/s. I have
~seen
~examples on creating a class per host but is there a simple way of
~saying "any host from 192.168.1.0/24" so I dont have 253 rules?

Yeah, I think I can answer this :-).

Upload mark
iptables -t mangle -A FORWARD -s 192.168.0.0/24 -j MARK --set-mark 4
Download mark
iptables -t mangle -A POSTROUTING -s ! 192.168.0.0/24 -d
192.168.0.0/24 -j MARK --set-mark 5

Then if you are using htb: just make your root qdisk, classes,
filters, and then the qdisk.

James

~Many thanks.

~stuart

~-- 

~ | http://www.opusvl.com 
~ | T: 08717 50 40 02
~ | F: 08717 50 40 03
~ | E: sm@xxxxxxxxxx 


[Index of Archives]     [LARTC Home Page]     [Netfilter]     [Netfilter Development]     [Network Development]     [Bugtraq]     [GCC Help]     [Yosemite News]     [Linux Kernel]     [Fedora Users]
  Powered by Linux