From: "GoMi" <gomiuk@hotmail.com>
To: lartc@vger.kernel.org
Subject: RE: [LARTC] Lots amounts of classes to solve the DAP problem
Date: Wed, 23 Apr 2003 21:05:17 +0000 [thread overview]
Message-ID: <marc-lartc-105113200827167@msgid-missing> (raw)
In-Reply-To: <marc-lartc-105103510025149@msgid-missing>
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Stef, let me explain the full scenario:
Two 2mbit adsl's with to ethernets to them eth0 and eth2
A third ethernet card going to my switch eth3
I red you last email, and i set up a configuration to shape eth3 as well unstead of using IMQ
I attach the three scripts for all the interfaces. The thing is, when the DAP programs start to download,
The interactive traffic does not get the rate guarated, i am really falling into desesperation here :(
Thanks for your patience :)
#!/bin/bash
UPLINK00
DEV=eth0
tc qdisc add dev $DEV root handle 1:0 htb default 766
tc class add dev $DEV parent 1:0 classid 1:1 htb rate 300kbit ceil 300kbit
echo "Qdisc primario 1:1 [OK]"
for ((a=2;a<766;a=a+3))
do
tc class add dev $DEV parent 1:1 classid 1:$a htb rate 2kbit ceil 300kbit
done
for ((a=2,b=3;a<766;a=a+3,b=b+3))
do
tc class add dev $DEV parent 1:$a classid 1:$b htb rate 1kbit ceil 300kbit
tc qdisc add dev $DEV parent 1:$b handle $b: pfifo
done
echo "Clases interactivas y Qdiscs [OK]"
for ((a=2,b=4;a<766;a=a+3,b=b+3))
do
tc class add dev $DEV parent 1:$a classid 1:$b htb rate 1kbit ceil 300kbit
tc qdisc add dev $DEV parent 1:$b handle $b: sfq perturb 10
done
echo "Clases no-interactivas y Qdiscs [OK]"
for ((a=2,b=3,c=4;a<256;a++,b=b+3,c=c+3))
do
iptables -t mangle -A FORWARD -s 192.168.2.$a -i eth3 -p icmp -j MARK --set-mark $b
iptables -t mangle -A FORWARD -s 192.168.2.$a -i eth3 -p tcp --dport :1024 -j MARK --set-mark $b
iptables -t mangle -A FORWARD -s 192.168.2.$a -i eth3 -p tcp --dport 1024: -j MARK --set-mark $c
iptables -t mangle -A FORWARD -s 192.168.2.$a -i eth3 -p udp --dport :1024 -j MARK --set-mark $b
iptables -t mangle -A FORWARD -s 192.168.2.$a -i eth3 -p udp --dport 1024: -j MARK --set-mark $c
iptables -t mangle -I PREROUTING -s 192.168.2.$a -i eth3 -p tcp -m tcp --tcp-flags SYN,RST,ACK SYN -j MARK --set-mark $b
tc filter add dev $DEV protocol ip parent 1:0 handle $b fw flowid 1:$b
tc filter add dev $DEV protocol ip parent 1:0 handle $c fw flowid 1:$c
done
echo "MANGLE y FILTROS [OK]"
######################################
#!/bin/bash
UPLINK00
DEV=eth2
tc qdisc add dev $DEV root handle 1:0 htb default 766
tc class add dev $DEV parent 1:0 classid 1:1 htb rate 300kbit ceil 300kbit
echo "Qdisc primario 1:1 [OK]"
for ((a=2;a<766;a=a+3))
do
tc class add dev $DEV parent 1:1 classid 1:$a htb rate 2kbit ceil 300kbit
done
for ((a=2,b=3;a<766;a=a+3,b=b+3))
do
tc class add dev $DEV parent 1:$a classid 1:$b htb rate 1kbit ceil 300kbit
tc qdisc add dev $DEV parent 1:$b handle $b: pfifo
done
echo "Clases interactivas y Qdiscs [OK]"
for ((a=2,b=4;a<766;a=a+3,b=b+3))
do
tc class add dev $DEV parent 1:$a classid 1:$b htb rate 1kbit ceil 300kbit
tc qdisc add dev $DEV parent 1:$b handle $b: sfq perturb 10
done
echo "Clases no-interactivas y Qdiscs [OK]"
for ((a=2,b=3,c=4;a<256;a++,b=b+3,c=c+3))
do
iptables -t mangle -A FORWARD -s 192.168.2.$a -i eth3 -p icmp -j MARK --set-mark $b
iptables -t mangle -A FORWARD -s 192.168.2.$a -i eth3 -p tcp --dport :1024 -j MARK --set-mark $b
iptables -t mangle -A FORWARD -s 192.168.2.$a -i eth3 -p tcp --dport 1024: -j MARK --set-mark $c
iptables -t mangle -A FORWARD -s 192.168.2.$a -i eth3 -p udp --dport :1024 -j MARK --set-mark $b
iptables -t mangle -A FORWARD -s 192.168.2.$a -i eth3 -p udp --dport 1024: -j MARK --set-mark $c
iptables -t mangle -I PREROUTING -s 192.168.2.$a -i eth3 -p tcp -m tcp --tcp-flags SYN,RST,ACK SYN -j MARK --set-mark $b
tc filter add dev $DEV protocol ip parent 1:0 handle $b fw flowid 1:$b
tc filter add dev $DEV protocol ip parent 1:0 handle $c fw flowid 1:$c
done
echo "MANGLE y FILTROS [OK]"
##########################################
#!/bin/bash
UPLINK@00
DEV=eth3
tc qdisc add dev $DEV root handle 1:0 htb default 766
tc class add dev $DEV parent 1:0 classid 1:1 htb rate 4mbit ceil 4mbit
echo "Qdisc primario 1:1 [OK]"
for ((a=2;a<766;a=a+3))
do
tc class add dev $DEV parent 1:1 classid 1:$a htb rate 10kbit ceil 2mbit
done
for ((a=2,b=3;a<766;a=a+3,b=b+3))
do
tc class add dev $DEV parent 1:$a classid 1:$b htb rate 5kbit ceil 2mbit
tc qdisc add dev $DEV parent 1:$b handle $b: pfifo
done
echo "Clases interactivas y Qdiscs [OK]"
for ((a=2,b=4;a<766;a=a+3,b=b+3))
do
tc class add dev $DEV parent 1:$a classid 1:$b htb rate 5kbit ceil 2mbit
tc qdisc add dev $DEV parent 1:$b handle $b: sfq perturb 10
done
echo "Clases no-interactivas y Qdiscs [OK]"
for ((a=2,b=3,c=4;a<256;a++,b=b+3,c=c+3))
do
iptables -t mangle -A FORWARD -d 192.168.2.$a -i eth3 -p icmp -j MARK --set-mark $b
iptables -t mangle -A FORWARD -d 192.168.2.$a -i ! eth3 -p tcp --sport :1024 -j MARK --set-mark $b
iptables -t mangle -A FORWARD -d 192.168.2.$a -i ! eth3 -p tcp --sport 1024: -j MARK --set-mark $c
iptables -t mangle -A FORWARD -d 192.168.2.$a -i ! eth3 -p udp --sport :1024 -j MARK --set-mark $b
iptables -t mangle -A FORWARD -d 192.168.2.$a -i ! eth3 -p udp --sport 1024: -j MARK --set-mark $c
iptables -t mangle -I PREROUTING -s 192.168.2.$a -i ! eth3 -p tcp -m tcp --tcp-flags SYN,RST,ACK SYN -j MARK --set-mark $b
tc filter add dev $DEV protocol ip parent 1:0 handle $b fw flowid 1:$b
tc filter add dev $DEV protocol ip parent 1:0 handle $c fw flowid 1:$c
done
echo "MANGLE y FILTROS [OK]"
-----BEGIN PGP SIGNATURE-----
Version: PGP 8.0
iQA/AwUBPqcACH7diNnrrZKsEQKvcQCgp05O299MzoOaaXo2SeY7RWjetU8AoIjM
QR4cewMIL+r/u0mZZlivwNa/
¿Sa
-----END PGP SIGNATURE-----
_______________________________________________
LARTC mailing list / LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
next prev parent reply other threads:[~2003-04-23 21:05 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-04-22 18:10 [LARTC] Lots amounts of classes to solve the DAP problem GoMi
2003-04-22 18:52 ` Stef Coene
2003-04-22 18:58 ` GoMi
2003-04-22 19:06 ` Stef Coene
2003-04-23 12:45 ` GoMi
2003-04-23 20:28 ` Stef Coene
2003-04-23 21:05 ` GoMi [this message]
2003-04-24 14:12 ` GoMi
2003-04-25 20:53 ` Stef Coene
2003-04-26 3:39 ` Rio Martin.
2003-04-26 4:50 ` Paul Evans
2003-04-26 8:01 ` Stef Coene
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=marc-lartc-105113200827167@msgid-missing \
--to=gomiuk@hotmail.com \
--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.