From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Alessandro O. Ungaro" Date: Thu, 01 Apr 2004 19:21:29 +0000 Subject: Re: [LARTC] Control Bandwidth Message-Id: <406C6BB9.9060008@ccpbr.org> 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 Anderson, the problem is: the flow control in your script is only to EXTIF (External Interface),=20 so.., I think you have a network behind a NAT. The EXTIF doesn't recieve=20 the internal IP becouse the NAT translate this. I think this is your error. Try to keep a down-rule in the INTIF to make a 128k restricted link to=20 your "box". []'s x-arnie andybr wrote: > Hi all, >=20 > I need a little help, i am studing htb to control user=20 > bandwidth (download/upload) and I made a script as=20 > below to test. I am testing using ttcp tool from by=20 > linux box to other linux (192.168.200.51). >=20 > my box <---- Linux =3D more than 128kbit > mybot -----> Linux =3D get 128kbit >=20 > But I want to control both ways, what am I missing? >=20 >=20 > script: >=20 > EXTIF=3Deth0 > INTIF=3Deth1 > TC=3D/sbin/tc > DOWN=128 > UPd > IP=192.168.200.201 > ################## > # > $TC qdisc del $EXTIF root 2> /dev/null > /dev/null > # > $TC qdisc add dev $EXTIF root handle 0: htb default 1 >=20 > $TC class add dev $EXTIF parent 0: classid 1 htb rate=20 > 128Kbit ceil 128Kbit > # > $TC filter add dev $EXTIF protocol ip parent 0:0 prio 1=20 > u32 match ip src $IP flowid 1 > $TC filter add dev $EXTIF protocol ip parent 0:0 prio 1=20 > u32 match ip dst $IP flowid 1 >=20 > Thanks, > Anderson >=20 > =20 > __________________________________________________________________________ > Acabe com aquelas janelinhas que pulam na sua tela. > AntiPop-up UOL - =C9 gr=E1tis! > http://antipopup.uol.com.br/ >=20 >=20 > _______________________________________________ > LARTC mailing list / LARTC@mailman.ds9a.nl > http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/ >=20 _______________________________________________ LARTC mailing list / LARTC@mailman.ds9a.nl http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/