Re: [LARTC] Two-way Shared Traffic shaping and NAT

Linux Advanced Routing and Traffic Control

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

 



>>      Now instead of this 12Kbytes for individual upload and download; I want
>> let user have total 12Kbytes; and sum of upload and download should not be
>> more then this 12Kbytes. Is there any way to implementing traffic shaping
>> over "from and to" an IP say 192.168.1.1?

to shape traffic, you can also use an unofficial patch for netfilter
(iptables), which does the same thing as the "limit" match, but allowing
to specify rates in bytes/second instead of packets/second. you can
get this patch from http://etudiant.univ-mlv.fr/~jpetazzo/bytelimit.tgz
and you can then do something like :

iptables -N lim1
iptables -A FORWARD -s 192.168.1.1 -j lim1
iptables -A FORWARD -d 192.168.1.1 -j lim1
iptables -A lim1 -m bytelimit --rate 12000 -j DROP

(traffic "under" the 12000 bytes/second limit will go on thru the
chain "lim1")

Jerome Petazzoni <skaya at enix dot org>




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