[LARTC] limiting bandwidth to one IP

Linux Advanced Routing and Traffic Control

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

 



Hi,

I am testing tc and company tools :-)

I have an ADSL with three interfaces (one to ADSL router, one to one net
and another one to another net).

I am trying to limit the download from Internet to one computer.

I try it (and some variations...):

tc qdisc add dev eth1 root handle 1: cbq bandwidth 256kbit allot 1514 cell
8 avpkt 1000 mpu 64

(eth1 is the interface where computer that I want to limit is connected)

tc class add dev eth1 parent 1:0 classid 1:1 cbq bandwidth 256kbit rate
128kbit weight 12kbit prio 8 allot 1514 cell 8 maxburst 20 avpkt 1000
bounded

256 is my bandwidth (to download)
128 is the bandwidth that I want to this computer
12kbit I don't know ¿?...
bounded is to test, only

tc filter add dev eth1 parent 1:0 protocol ip prio 1 u32 match ip dst
192.168.0.5 flowid 1:1

But the computer is receiving more than 128kbit.

If I try:

tc qdisc add dev eth1 root tbf rate 128kbit latency 50ms burst 1540

Works fine, but I am limiting the whole network (I don't want it)

thank you very much for your attention.

And excuse me my bad English.


----
Carles Pina i Estany | Nick: Pinux / Pine / Teufeus
E-Mail: carles.pina@xxxxxxxxxxxx / is08139@xxxxxxxxxxxx / cpina@xxxxxxxxxxxxx
http://www.salleURL.edu/~is08139/

   Vendo teléfono militar. También marca el paso




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