From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stef Coene Date: Sun, 23 Dec 2001 19:49:51 +0000 Subject: Re: [LARTC] limiting bandwidth to one IP Message-Id: List-Id: References: In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable To: lartc@vger.kernel.org On Sunday 23 December 2001 19:06, Carles Pina i Estany wrote: > 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 Bandwith must be the real bandwith of the NIC. Usual 10 or 100 mbit. > (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 =BF?... > 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) What you want to do is easy. But you are using the wrong commands. I have= =20 some working scripts. You can find them on www.docum.org. But I advise you to use the htb qdisc. Much easier to set up and to=20 understand. Again, more information on www.docum.org. If you really want = to=20 use CBQ, I can give you more information. Just leave a message on the=20 mailing list. Stef --=20 stef.coene@docum.org More QOS info : http://www.docum.org/ Title : "Using Linux as bandwidth manager" =20 _______________________________________________ LARTC mailing list / LARTC@mailman.ds9a.nl http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://ds9a.nl/lartc/