From mboxrd@z Thu Jan 1 00:00:00 1970 From: Damion de Soto Date: Fri, 30 Jan 2004 07:16:55 +0000 Subject: Re: [LARTC] Whats wrong with my script? Message-Id: <401A04E7.5050705@snapgear.com> List-Id: References: <001301c3e4db$50143c20$cd302bc8@traza> In-Reply-To: <001301c3e4db$50143c20$cd302bc8@traza> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable To: lartc@vger.kernel.org Gast=F3n wrote: > What about this? : tc filter add dev eth1 parent 1:0 protocol ip prio 100 > u32 match ip dst 192.168.0.50 classid 1:56 > Is this correct for shaping upload? On your upload (eth0) interface, you can't use private IPs, because they've= already=20 been natted to real ones (see http://www.docum.org/stef.coene/qos/kptd/ ) If you want to shape outbound traffic based on private-lan IP, you need to = mark the=20 packets with iptables, then filter based on mark. (There are lots of examples of this in the doco and mail archives). Your download rules seem correct enough. regards, >=20 > ----- Original Message -----=20 > From: "andybr" > To: > Cc: > Sent: Thursday, January 29, 2004 10:05 AM > Subject: Re:[LARTC] Whats wrong with my script? >=20 >=20 > Hello, >=20 > According with rules you are controlling only download > (src ip) you should add a (dst rule) also. Make a try. >=20 >=20 > []'s > Anderson >=20 >>I`m trying to shape both upload (eth0) and download >=20 > (eth1). I made this >=20 >>script to acomplishthis but the filters are not working >=20 > even though the >=20 >>classes and qdiscs are created. What am I doing wrong? >=20 > #!/bin/bash >=20 >> >>tc qdisc del dev eth0 root >>tc qdisc add dev eth0 root handle 1 htb default 10 r2q >=20 > 5 >=20 >>tc qdisc del dev eth1 root >>tc qdisc add dev eth1 root handle 1 htb default 10 r2q >=20 > 5 >=20 >>tc class add dev eth0 parent 1: classid 1:2 htb rate 5M >=20 > bit burst 15k >=20 >>tc class add dev eth0 parent 1:2 classid 1:59 htb rate >=20 > 64Kbit ceil 64Kbit >=20 >>tc qdisc add dev eth0 parent 1:59 handle 59 sfq perturb >=20 > 10 >=20 >>tc filter add dev eth0 parent 1:0 protocol ip prio 100 >=20 > u32 match ip src >=20 >>192.168.0.50 classid 1:59 >> >>tc class add dev eth1 parent 1: classid 1:2 htb rate 5M >=20 > bit burst 15k >=20 >>tc class add dev eth1 parent 1:2 classid 1:56 htb rate >=20 > 64Kbit ceil 64Kbit >=20 >>tc qdisc add dev eth1 parent 1:56 handle 56 sfq perturb >=20 > 10 >=20 >>tc filter add dev eth1 parent 1:0 protocol ip prio 100 >=20 > u32 match ip dst >=20 >>192.168.0.50 classid 1:56 >> >> >>_______________________________________________ >>LARTC mailing list / LARTC@mailman.ds9a.nl >>http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: ht >=20 > tp://lartc.org/ >=20 >=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/ >=20 >=20 --=20 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Damion de Soto - Software Engineer email: damion@snapgear.com SnapGear - A CyberGuard Company --- ph: +61 7 3435 2809 | Custom Embedded Solutions fax: +61 7 3891 3630 | and Security Appliances web: http://www.snapgear.com ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ --- Free Embedded Linux Distro at http://www.snapgear.org --- _______________________________________________ LARTC mailing list / LARTC@mailman.ds9a.nl http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/