-----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 UPLINK=300 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 UPLINK=300 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=4000 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/ =BFSa -----END PGP SIGNATURE-----