[LARTC] tc does'nt limit the bandwidth!
Good people, I want to thank you all for your awesome help so far and also want to make my problem clear to you all so that I can get more definite help. I have 256kpbs internet link to share among 4 customers- A=176 burstable to 256; B=16; C=32; D=32. But the problem is that my script FAILED TO LIMIT customers B, C,and D. My complete tc scripts is as follows; tc qdisc add dev eth1 root handle 1: htb default 1 #Classes tc class add dev eth1 parent 1:classid 1:1htb rate 9bps ceil9bps #Default tc class add dev eth1 parent 1:classid 1:100 htb rate 9bps ceil9bps #ICMP tc class add dev eth1 parent 1:classid 1:5htb rate 176kbps ceil 256kbps #Customer A tc class add dev eth1 parent 1:classid 1:101 htb rate 16kbps ceil 16kbps #Customer B tc class add dev eth1 parent 1:classid 1:111 htb rate 32kbps ceil 32kbps #Customer C tc class add dev eth1 parent 1:classid 1:121 htb rate 32kbps ceil 32kbps #Customer D #Leafs # A # tc class add dev eth1 parent 1:5 classid 1:90 htb rate 176kbps ceil 256kbps #Queues tc qdisc add dev eth1 parent 1:11 handle 211: sfq perturb 10 #Customer A tc qdisc add dev eth1 parent 1:101 handle 281: sfq perturb 10 # Customer B tc qdisc add dev eth1 parent 1:111 handle 282: sfq perturb 10 # Customer C tc qdisc add dev eth1 parent 1:121 handle 283: sfq perturb 10 # Customer D #Ip Assignment# U32="tc filter add dev eth1 protocol ip parent 1:0 prio 4 u32" u32="tc filter add dev eth1 protocol ip parent 1:0 prio 0 u32" # A # $U32 match ip dst 200.200.200.11 flowid 1:11 $U32 match ip src 200.200.200.11 flowid 1:11 #Customer B# $U32 match ip dst 172.16.0.11 flowid 1:101 $U32 match ip src 172.16.0.11 flowid 1:101 #Customer C# $U32 match ip dst 172.16.0.12 flowid 1:111 $U32 match ip src 172.16.0.12 flowid 1:111 #Customer D# $U32 match ip dst 172.16.0.13 flowid 1:121 $U32 match ip src 172.16.0.13 flowid 1:121 #virus ping $U32 match ip protocol 1 0xff flowid 1:100 What exactly am I doing wrong please? Can anyone re-write it for me or give me a better one please. Kind regards. Cheers! digihall7 __ Do you Yahoo!? Yahoo! Tax Center - File online by April 15th http://taxes.yahoo.com/filing.html ___ LARTC mailing list / [EMAIL PROTECTED] http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
RE: [LARTC] Bandwith control
I use Fedora 1 and its haves HTB 3 built in kernel regards -> -Mensaje original- -> De: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] -> nombre de [EMAIL PROTECTED] -> Enviado el: Miércoles, 14 de Abril de 2004 12:50 p.m. -> Para: [EMAIL PROTECTED] -> Asunto: Re: [LARTC] Bandwith control -> -> -> After read the docs at http://luxik.cdi.cz/~devik/qos/htb/ i found -> htb.init-v0.8.5.txt script, it do what i need, -> however it says i have to pach my kernel, does anyone know if -> fedora core 1 -> already have htb by default? -> -> -> Angelo -> -> - Original Message - -> From: "Corey Hickey" <[EMAIL PROTECTED]> -> To: <[EMAIL PROTECTED]> -> Sent: Tuesday, April 13, 2004 2:31 PM -> Subject: Re: [LARTC] Bandwith control -> -> -> > [EMAIL PROTECTED] wrote: -> > > Hello all, -> > > -> > > I´ve read http://lartc.org/howto/ and now i am just -> confused, i think my -> > > skills with linux are not very good, so asking for help. -> > > -> > > I have a linux box with two ethernets cards eth0(gateway 1mb) with is -> > > the host for -> > > some sites and emails and eth1(nat interface) with provide internet -> > > acess to other 5 pcs. -> > > -> > > I would like to limit the bandwith 512 k for the eth0 and -> 512 k for eth1 -> > > however whem there -> > > is free bandwith in eth0 would be nice to eth1 use that bandwith so -> > > users can download fast -> > > as there is bandwith and sites and emails don´t get slow. -> > > -> > > Can someone point some directions? -> > > -> > > Tks -> > > -> > > Angelo -> > -> > HTB is the qdisc you want. -> > http://luxik.cdi.cz/~devik/qos/htb/ -> > -> > -Corey -> > -> -> ___ -> LARTC mailing list / [EMAIL PROTECTED] -> http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/ -> --- -> Incoming mail is certified Virus Free. -> Checked by AVG anti-virus system (http://www.grisoft.com). -> Version: 6.0.657 / Virus Database: 422 - Release Date: 13/04/2004 -> --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.657 / Virus Database: 422 - Release Date: 13/04/2004 ___ LARTC mailing list / [EMAIL PROTECTED] http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
Re: [LARTC] Bandwith control
After read the docs at http://luxik.cdi.cz/~devik/qos/htb/ i found htb.init-v0.8.5.txt script, it do what i need, however it says i have to pach my kernel, does anyone know if fedora core 1 already have htb by default? Angelo - Original Message - From: "Corey Hickey" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Tuesday, April 13, 2004 2:31 PM Subject: Re: [LARTC] Bandwith control > [EMAIL PROTECTED] wrote: > > Hello all, > > > > I´ve read http://lartc.org/howto/ and now i am just confused, i think my > > skills with linux are not very good, so asking for help. > > > > I have a linux box with two ethernets cards eth0(gateway 1mb) with is > > the host for > > some sites and emails and eth1(nat interface) with provide internet > > acess to other 5 pcs. > > > > I would like to limit the bandwith 512 k for the eth0 and 512 k for eth1 > > however whem there > > is free bandwith in eth0 would be nice to eth1 use that bandwith so > > users can download fast > > as there is bandwith and sites and emails don´t get slow. > > > > Can someone point some directions? > > > > Tks > > > > Angelo > > HTB is the qdisc you want. > http://luxik.cdi.cz/~devik/qos/htb/ > > -Corey > ___ LARTC mailing list / [EMAIL PROTECTED] http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
RE: [LARTC] zph / squid syntaxis ? THANK YOU
Thank you, Evgeni It has worked !! This squid / ToS patch is excelent. Regards, Andres. -> -> ThE LinuX_KiD wrote: -> -> >Hi, -> > -> >I've used old ZPH patch under squid 2.4 Stable4 -> >and it works great ! -> > -> >Now I want to patch squid 2.4 stable 5, -> >with new patch, on http://www.it-academy.bg/zph/ -> > -> >I've patched and installed squid 2.5 stable 5 -> >succefully, but I can't get ZPH works. -> > -> >I'm trying with -> > -> >... -> >$TC class add dev $LANDEV parent 1: classid 1:7 htb rate 1Mbit -> > -> >$TC filter add dev $LANDEV parent 1:0 protocol ip prio 1 u32 \ -> > match ip protocol 0x6 0xff \ -> > match ip tos 0x10 0xff \ -> > flowid 1:7 -> > -> >And SQUID.CONF: -> > -> >zph_tos 0x10 -> >zph_tos_peer off -> > -> >(i've tried with various combinations, but I can't -> >get ZPH works as older version under squid 2.5 stable 4) -> > -> >Have you some idea ? -> > -> >Thank you very much -> > -> >andres -> >___ -> >LARTC mailing list / [EMAIL PROTECTED] -> >http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/ -> > -> > -> > -> > -> Bug:). Sorry, I haven't spotted parse_int() parses only decimal numbers. -> Workaround for now: -> instead -> zph_tos 0x10 -> write -> zph_tos 16 --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.657 / Virus Database: 422 - Release Date: 13/04/2004 ___ LARTC mailing list / [EMAIL PROTECTED] http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
Re: [LARTC] zph / squid syntaxis ?
ThE LinuX_KiD wrote: Hi, I've used old ZPH patch under squid 2.4 Stable4 and it works great ! Now I want to patch squid 2.4 stable 5, with new patch, on http://www.it-academy.bg/zph/ I've patched and installed squid 2.5 stable 5 succefully, but I can't get ZPH works. I'm trying with ... $TC class add dev $LANDEV parent 1: classid 1:7 htb rate 1Mbit $TC filter add dev $LANDEV parent 1:0 protocol ip prio 1 u32 \ match ip protocol 0x6 0xff \ match ip tos 0x10 0xff \ flowid 1:7 And SQUID.CONF: zph_tos 0x10 zph_tos_peer off (i've tried with various combinations, but I can't get ZPH works as older version under squid 2.5 stable 4) Have you some idea ? Thank you very much andres ___ LARTC mailing list / [EMAIL PROTECTED] http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/ Bug:). Sorry, I haven't spotted parse_int() parses only decimal numbers. Workaround for now: instead zph_tos 0x10 write zph_tos 16 ___ LARTC mailing list / [EMAIL PROTECTED] http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
[LARTC] Most general filter rule?
Hello! I recently noticed that the default class of my htb setup gets too much traffic (the setup otherwise runs fine for about 2 years now). Therefore I tried to track this traffic down and attached filter rules to the end of my filter chain which would IMHO match all the traffic which could possibly occur. The most general I could come up with is: tc filter add dev eth2 pref 300 protocol all parent 1: u32 match ip dst 0.0.0.0/0 flowid 1:5000 And still - the default class gets allmost the same amount of traffic as before (except for a few bps which seemed to slip through all my other filters based on src/dst ip but got matched by the filter above). Is there anything I'm missing? (probably :o) Can anyone tell me why the above filter does not match _all_ my traffic not matched by my other (lower pref) filters and why the default class still runs at many kbps? Thank you for your help! Andreas ___ LARTC mailing list / [EMAIL PROTECTED] http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/