From: Alejandro Lorenzo Gallego <alejandro_aero@yahoo.es>
To: lartc@vger.kernel.org
Subject: Re: [LARTC] Is ESFQ working?
Date: Sun, 11 Feb 2007 13:15:49 +0000 [thread overview]
Message-ID: <200702111415.56822.alejandro_aero@yahoo.es> (raw)
In-Reply-To: <200702111301.51685.alejandro_aero@yahoo.es>
[-- Attachment #1.1: Type: text/plain, Size: 4294 bytes --]
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?
> >
> > żShould i go for imq for this kind of shaping?
>
> Can you show a snippet of your script here?
>
> Bests, Tomasz Chilinski.
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
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
limit 10 depth 20
tc-esfq qdisc add dev eth1 parent 1:10 handle 10: esfq hash dst
#!/bin/sh
IPTABLES="iptables -t mangle"
ANADIR="iptables -t mangle -A POSTROUTING -o eth1"
INSERTAR="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-class
1:10
[-- Attachment #1.2: Type: application/pgp-signature, Size: 189 bytes --]
[-- Attachment #2: Type: text/plain, Size: 143 bytes --]
_______________________________________________
LARTC mailing list
LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc
next prev parent reply other threads:[~2007-02-11 13:15 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-02-11 12:01 [LARTC] Is ESFQ working? Alejandro Lorenzo Gallego
2007-02-11 12:28 ` Tomasz Chilinski
2007-02-11 13:15 ` Alejandro Lorenzo Gallego [this message]
2007-02-11 14:20 ` Tomasz Chilinski
2007-02-11 15:19 ` Alejandro Lorenzo Gallego
2007-02-11 15:48 ` Tomasz Chilinski
2007-02-11 15:59 ` Alejandro Lorenzo Gallego
2007-02-11 19:10 ` Corey Hickey
2007-02-11 21:49 ` Alejandro Lorenzo Gallego
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200702111415.56822.alejandro_aero@yahoo.es \
--to=alejandro_aero@yahoo.es \
--cc=lartc@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.