* [LARTC] newbie downloading not working
@ 2005-05-21 12:53 Paulo Ricardo Bruck
2005-05-22 17:59 ` Andy Furniss
0 siblings, 1 reply; 2+ messages in thread
From: Paulo Ricardo Bruck @ 2005-05-21 12:53 UTC (permalink / raw)
To: lartc
[-- Attachment #1.1: Type: text/plain, Size: 2324 bytes --]
Hi guys
Finally , after reading a lot of docs from larc/opalsoft/etc, I decided
to start learning some QoS
First of all I'm trying to shape only download from a iptables+squid+qos
machine for 4 machines at LAN ( eth0)
Can anyone help me , cause it is not working properly..
-----------------------------------------------------------------
#!/bin/bash
# 128Kbps 192.168.0.1
# <----- eth1 firewall eth0
# internet-adsl-----+squid---------------4 desktops
# -----> +QoS 192.168.0.5
# 450Kbps .11
# .12
# .20
#
echo -e "calling modules\n"
modprobe sch_htb sch_prio sch_sfq cls_u32
echo -e "limiting download\n"
echo -e " deleting qdisc \n"
tc qdisc del dev eth0 root
echo -e "adding HTB and SFP/PFIFO as leaves\n"
tc qdisc add dev eth0 root handle 1:0 htb
tc class add dev eth0 parent 1:0 classid 1:1 htb rate 400kbit ceil
400kbit
tc class add dev eth0 parent 1:1 classid 1:20 htb rate 300kbit ceil
400kbit
tc class add dev eth0 parent 1:1 classid 1:30 htb rate 10kbit ceil
400kbit
tc class add dev eth0 parent 1:1 classid 1:40 htb rate 10kbit ceil
400kbit
tc class add dev eth0 parent 1:1 classid 1:50 htb rate 10kbit ceil
400kbit
tc class add dev eth0 parent 1:1 classid 1:60 htb rate 10kbit ceil
400kbit
tc qdisc add dev eth0 parent 1:20 handle 20: sfq perturb 10
tc qdisc add dev eth0 parent 1:30 handle 30: sfq perturb 10
tc qdisc add dev eth0 parent 1:40 handle 40: sfq perturb 10
tc qdisc add dev eth0 parent 1:50 handle 50: sfq perturb 10
tc qdisc add dev eth0 parent 1:60 handle 60: sfq perturb 10
tc filter add dev eth0 parent 1:0 protocol ip prio 1 u32 match ip dst
192.168.0.1 flowid 1:20
tc filter add dev eth0 parent 1:0 protocol ip prio 1 u32 match ip dst
192.168.0.11 flowid 1:30
tc filter add dev eth0 parent 1:0 protocol ip prio 1 u32 match ip dst
192.168.0.12 flowid 1:40
tc filter add dev eth0 parent 1:0 protocol ip prio 1 u32 match ip dst
192.168.0.20 flowid 1:50
tc filter add dev eth0 parent 1:0 protocol ip prio 1 u32 match ip dst
192.168.0.5 flowid 1:60
thx in advanced
--
Paulo Ricardo Bruck - consultor
[-- Attachment #1.2: Esta é uma parte de mensagem assinada digitalmente --]
[-- 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
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [LARTC] newbie downloading not working
2005-05-21 12:53 [LARTC] newbie downloading not working Paulo Ricardo Bruck
@ 2005-05-22 17:59 ` Andy Furniss
0 siblings, 0 replies; 2+ messages in thread
From: Andy Furniss @ 2005-05-22 17:59 UTC (permalink / raw)
To: lartc
Paulo Ricardo Bruck wrote:
> Hi guys
>
> Finally , after reading a lot of docs from larc/opalsoft/etc, I decided
> to start learning some QoS
>
> First of all I'm trying to shape only download from a iptables+squid+qos
> machine for 4 machines at LAN ( eth0)
>
> Can anyone help me , cause it is not working properly..
>
>
> -----------------------------------------------------------------
> #!/bin/bash
>
> # 128Kbps 192.168.0.1
> # <----- eth1 firewall eth0
> # internet-adsl-----+squid---------------4 desktops
> # -----> +QoS 192.168.0.5
> # 450Kbps .11
> # .12
> # .20
> #
If you want to shape traffic from the internet to squid then you need to
use imq (www.linuximq.net) set in kernel config to hook after prerouting
nat. The traffic to squid will still have your internet address not
192.168.0.1.
Andy.
_______________________________________________
LARTC mailing list
LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2005-05-22 17:59 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-05-21 12:53 [LARTC] newbie downloading not working Paulo Ricardo Bruck
2005-05-22 17:59 ` Andy Furniss
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.