From mboxrd@z Thu Jan 1 00:00:00 1970 From: Alejandro Lorenzo Gallego Date: Sun, 11 Feb 2007 13:15:49 +0000 Subject: Re: [LARTC] Is ESFQ working? Message-Id: <200702111415.56822.alejandro_aero@yahoo.es> MIME-Version: 1 Content-Type: multipart/mixed; boundary="===============0095401674==" List-Id: References: <200702111301.51685.alejandro_aero@yahoo.es> In-Reply-To: <200702111301.51685.alejandro_aero@yahoo.es> To: lartc@vger.kernel.org --===============0095401674== Content-Type: multipart/signed; boundary="nextPart1698965.ciVzs2QpyD"; protocol="application/pgp-signature"; micalg=pgp-sha1 Content-Transfer-Encoding: 7bit --nextPart1698965.ciVzs2QpyD Content-Type: text/plain; charset="iso-8859-2" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline On Sunday 11 February 2007 13:28:33 Tomasz Chilinski wrote: > On Sun, 11 Feb 2007 13:01:45 +0100, Alejandro Lorenzo Gallego wrote > > > Hi there, i am trying to shape a network for a college dorms... > > Hi Alejandro. > > > INTERNET---- ETH0--------Nat Box-------ETH1--------LAN > > > > I have set up classes of traffic (HTTP, FTP, MAIL, IM, OTHER) and i > > have assigned a rate for everyone with a HTB qdisc. The limit based > > in traffic is working flawlessly. > > > > However, under every HTB class i have set up a ESFQ queue discipline > > with hash value set to 'dst' int eth1 to control the rate of > > download of every user, but it appears to do nothing. > > > > and in eth0 there is a prio handler > > > > According to documentation, every user should get a fair amount of > > bandwidth but currently, users with some kind of download > > accelerator gets a higher amount of bandwidth > > > > Is ESFQ working right for someone? > > > > =BFShould i go for imq for this kind of shaping? > > Can you show a snippet of your script here? > > Bests, Tomasz Chilinski. =20 There you go: #!/bin/sh echo "Borrando todo" tc qdisc del dev eth1 root tc qdisc add dev eth1 parent root handle 1: htb default 900 tc class add dev eth1 parent 1: classid 1:1 htb rate 100mbit tc class add dev eth1 parent 1:1 classid 1:10 htb rate 100mbit tc class add dev eth1 parent 1:1 classid 1:20 htb rate 2500kbit ceil 4mbit echo "Clases base creadas" #Para permitir a la clase del proxy llegar al tope de la tarjeta, si fuese= =20 necesario echo "clase pal proxy" tc class add dev eth1 parent 1:20 classid 1:50 htb rate 800kbit ceil 4mbit echo "Insertando reglas de clases" tc class add dev eth1 parent 1:20 classid 1:100 htb rate 400kbit ceil 4mbit tc class add dev eth1 parent 1:20 classid 1:200 htb rate 300kbit ceil 4mbit tc class add dev eth1 parent 1:20 classid 1:300 htb rate 200kbit ceil 4mbit tc class add dev eth1 parent 1:20 classid 1:900 htb rate 300kbit ceil 4mbit tc class add dev eth1 parent 1:20 classid 1:700 htb rate 300kbit echo "Clases insertadas" echo "Esfq" tc-esfq qdisc add dev eth1 parent 1:100 handle 100: esfq hash dst perturb = 20 tc-esfq qdisc add dev eth1 parent 1:200 handle 200: esfq hash dst tc-esfq qdisc add dev eth1 parent 1:300 handle 300: esfq hash dst tc-esfq qdisc add dev eth1 parent 1:900 handle 900: esfq hash dst tc-esfq qdisc add dev eth1 parent 1:50 handle 50: esfq hash dst perturb 20= =20 limit 10 depth 20 tc-esfq qdisc add dev eth1 parent 1:10 handle 10: esfq hash dst #!/bin/sh IPTABLES=3D"iptables -t mangle" ANADIR=3D"iptables -t mangle -A POSTROUTING -o eth1" INSERTAR=3D"iptables -t mangle -I POSTROUTING -o eth1" echo "Borrando el postrouting de iptables" $IPTABLES -F POSTROUTING $ANADIR -p tcp --sport 443 -j CLASSIFY --set-class 1:100 $ANADIR -p tcp --sport 22 -j CLASSIFY --set-class 1:100 $ANADIR -p tcp --sport 53 -j CLASSIFY --set-class 1:100 $ANADIR -p tcp --sport 8080 -j CLASSIFY --set-class 1:100 $ANADIR -p tcp --sport 587 -j CLASSIFY --set-class 1:200 $ANADIR -p tcp --sport 6667 -j CLASSIFY --set-class 1:300 $ANADIR -p tcp --sport 1863 -j CLASSIFY --set-class 1:300 $ANADIR -p tcp --sport 123 -j CLASSIFY --set-class 1:200 $ANADIR -p udp --sport 123 -j CLASSIFY --set-class 1:200 $ANADIR -p tcp --sport 115 -j CLASSIFY --set-class 1:200 $ANADIR -p tcp --sport 69 -j CLASSIFY --set-class 1:200 $ANADIR -p tcp --sport 23 -j CLASSIFY --set-class 1:200 $ANADIR -p tcp --sport 5223 -j CLASSIFY --set-class 1:300 $ANADIR -p tcp --sport 10025 -j CLASSIFY --set-class 1:200 $ANADIR -p tcp --sport 3690 -j CLASSIFY --set-class 1:200 $ANADIR -p tcp --sport 3306 -j CLASSIFY --set-class 1:200 $ANADIR -p tcp --sport 143 -j CLASSIFY --set-class 1:200 $ANADIR -p tcp --sport 995 -j CLASSIFY --set-class 1:200 $ANADIR -p tcp --sport 990 -j CLASSIFY --set-class 1:200 $ANADIR -p tcp --sport 110 -j CLASSIFY --set-class 1:200 $ANADIR -p tcp --sport 993 -j CLASSIFY --set-class 1:200 $ANADIR -p tcp --sport 220 -j CLASSIFY --set-class 1:200 #$ANADIR -d 192.168.20.49 -j CLASSIFY --set-class 1:700 $INSERTAR -s 192.168.0.0/16 -p tcp --sport 3128 -j CLASSIFY --set-class 1:50 $INSERTAR -s 192.168.0.0/16 -d 192.168.0.0/16 -p tcp -j CLASSIFY --set-clas= s=20 1:10 --nextPart1698965.ciVzs2QpyD Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (GNU/Linux) iD8DBQBFzxcMMhZpJgaWlsoRAidWAJ418CuJGQ86H743feORt6RBn1aoeACgl58/ IoBeOH9kDLkA34aCY6s7WoE= =aSqE -----END PGP SIGNATURE----- --nextPart1698965.ciVzs2QpyD-- --===============0095401674== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ LARTC mailing list LARTC@mailman.ds9a.nl http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc --===============0095401674==--