Re: [LARTC] HTB is losing packets ?

2004-10-28 Thread George Alexandru Dragoi
Well, similar things happened on a machine with 2.4.26, with about 300
classes (for 150 users with different cir/mir for metro/extern). I
remade the classes and i applyed fw filters instead of u32, and now it
works very well on 2.4.26.


On Thu, 28 Oct 2004 15:22:42 +0200, Dumitrache Ionut <[EMAIL PROTECTED]> wrote:
> 
> Hello all,
> 
>I have using htb for last 10-12 months to manage the bandwidth share.
> Until last month everything was ok, but now after a kernel upgrade (from
> 2.4.20 to 2.4.26 because a kernel bug that generate a oops) the Linux router
> is droping packets. It is weird because the "tc -s class ls dev eth1" (in the
> class I monitor) reports no packet drop, the "tc -s qdisc ls dev eth1"
> reports no packet drop (in the qdisc attached to class I monitor) and even
> the "ifconfig" reports no packet drop.
>My htb configuration consist of more than 150 classes with rates from 1.5
> kbps to 64 kbps and ceils from 8 kbps to 170 kbps. Every class have a sfq
> qdisc attached. The total bandwidth is 2 Mbps. All clases/qdisc are created
> using Stef Coene's QoS scripts. My hardware is a Dell PIV 2GHz with 512MB RAM
> and I use 2 eepro100 (Intel 82555 rev4) nics.
>The same problem appear with 2.4.24, 2.6.8 kernels and with rtl8139 nics
> and all cables and switch ports changed.
> 
> Thanks.
> 
> --
> TIMnet webmail (webmail.tim.ro)
> 
> ___
> LARTC mailing list / [EMAIL PROTECTED]
> http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
> 


-- 
Bla bla
___
LARTC mailing list / [EMAIL PROTECTED]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/


Re: [LARTC] htb

2004-10-17 Thread James Lista
andreas,

having one class per user seems cool... please buddy, have a sample script
of that ?
so, if i have 600kbit / 7 = 86kbit for each, is it that ???  if so, is it
too few for a single user ?
about something that i read that say "borrowing",  when a user borrow his
spare band to a "vampire", when will he gets it back when he needs it...?

thanks again

- Original Message -
From: "Andreas Klauer" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Sunday, October 17, 2004 11:20 AM
Subject: Re: [LARTC] htb


> Am Sunday 17 October 2004 15:02 schrieb James Lista:
> > and about that you say take a look at ipp2p or l7-filter:  errr,  can
> > they identify when a user changed edonkey or any other p2p default port
> > and limit such packet even so 
>
> They try to. I'm using IPP2P and it works okay for me.
>
> Although my shaping setup is a little different from what you want to do.
> I've got one class per user, so everyone gets the same share of bandwidth.
> This way it doesn't matter what kind of traffic a user generates, as it
> doesn't influence the others.
>
> Prioritization is then done within the user classes, the only effect of
> that is that a user can still have a lag free SSH connection while he's
> downloading stuff at the same time.
>
> So in my setup, if the user finds a way to trick the prioritization
> settings, he's only tricking himself, because he can't escape his user
> class :)
>
> Andreas
> ___
> LARTC mailing list / [EMAIL PROTECTED]
> http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
>

___
LARTC mailing list / [EMAIL PROTECTED]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/


Re: [LARTC] htb

2004-10-17 Thread Andreas Klauer
Am Sunday 17 October 2004 14:08 schrieb James Lista:
> do you have a small script example to show me ? ...

I don't know about the "small" part...
My own script: http://www.metamorpher.de/fairnat/

HTH
Andreas
___
LARTC mailing list / [EMAIL PROTECTED]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/


Re: [LARTC] htb

2004-10-17 Thread Andreas Klauer
Am Sunday 17 October 2004 15:02 schrieb James Lista:
> and about that you say take a look at ipp2p or l7-filter:  errr,  can
> they identify when a user changed edonkey or any other p2p default port
> and limit such packet even so 

They try to. I'm using IPP2P and it works okay for me.

Although my shaping setup is a little different from what you want to do. 
I've got one class per user, so everyone gets the same share of bandwidth. 
This way it doesn't matter what kind of traffic a user generates, as it 
doesn't influence the others.

Prioritization is then done within the user classes, the only effect of 
that is that a user can still have a lag free SSH connection while he's 
downloading stuff at the same time.

So in my setup, if the user finds a way to trick the prioritization 
settings, he's only tricking himself, because he can't escape his user 
class :)

Andreas
___
LARTC mailing list / [EMAIL PROTECTED]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/


Re: [LARTC] htb

2004-10-17 Thread James Lista



hey ja,
 
do you have a small script example to show me 
? ...  i am new to those thing.. wanna study examples to understand how 
things works...   tried reading some docs but my english is poor so, i 
could understand very few..
 
thanks
 

  - Original Message - 
  From: 
  ja 
  To: James Lista ; [EMAIL PROTECTED] 
  Sent: Sunday, October 17, 2004 10:53 
  AM
  Subject: Re: [LARTC] htb
  
  This is no good cause for example bittorent can 
  download on port 80 :D. So the best way is create classes with ceil parameter 
  for example 128kbit to ensure relability for every user and limit number of 
  connections to 50-80 per user. This the best (i can get a word grr- you 
  know) if you dont want to block p2p.
  
- Original Message - 
From: 
James Lista 

To: [EMAIL PROTECTED] 
Sent: Sunday, October 17, 2004 2:42 
PM
Subject: [LARTC] htb

buddies,
 
i am newbie to band control..  i have a 
linux box (as a router, NATing,) sharing internet
 
internet--eth0-[linux.box]-eth1--my.lan
  
wan = adsl 600
lan  = about 20 users
 
my problem is that due the contract i 
cannot block users from my lan from 
downloading anything, so they can use kazaa (argghh), 
edonkey(arggh), emule(arghh), soulseek(arghj) etc etc 
etc, 
 
so,
 
I want to know if using htb i can make that 
users that uses browsers (port 80) have priority then users that uses port 
(110 and 25) , then rest of the ports.as if i 
could have such thing:
 
 
600kbit    50% for port 
80
   
30% for port 25 and 110
   
20% for the rest 
 
this way no user can complain that cannot 
access his internet banking, checking his emails  and other thing that 
are essentials...
 
if it is possible (with htb) or any other 
method, please tell me a direction for me to go..
 
really thanks
 
james 
 
 
 
 
 
 


Re: [LARTC] htb

2004-10-17 Thread James Lista
andreas

first thanks for the answer and the advices.

well. let me say some things: inspite of saying that i have 600kbit for 20
users, it is really rare to have more than 7 at the same time

and about that you say take a look at ipp2p or l7-filter:  errr,  can they
identify when a user changed edonkey or any other p2p default port and limit
such packet even so 



- Original Message -
From: "Andreas Klauer" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Sunday, October 17, 2004 10:19 AM
Subject: Re: [LARTC] htb


> Am Sunday 17 October 2004 14:42 schrieb James Lista:
> > 600kbit    50% for port 80
> >30% for port 25 and 110
> >20% for the rest
>
> Sure, that's possible. That's one 600kbit class with three child classes.
>
> However, there may be many other ports besides 25, 80, and 110 that
deserve
> prioritizing. Throwing them in the same class as all filesharing traffic
> could make things even worse than before.
>
> Then there's the problem that many filesharing protocols can work on any
> port, so your users could just move to one of the prioritized ports and
> take all the bandwidth again.
>
> That's some of the reasons why I never bothered with prioritizing ports on
> a global basis. Consider using ipp2p or l7-filter for a more reliable way
> for detecting P2P traffic.
>
> No matter how you look at it, 600kbit for 20 users is a bit slow. Even
> without P2P traffic, if all of them surf the web at the same time, they
> won't be very happy with the speed.
>
> Besides traffic shaping, you should do anything possible to reduce load.
> Cache DNS queries, provide a HTTP proxy, probably squid. Make sure that
> you can't be flooded from the outside. Stuff like that.
>
> HTH
> Andreas
> ___
> LARTC mailing list / [EMAIL PROTECTED]
> http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
>

___
LARTC mailing list / [EMAIL PROTECTED]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/


Re: [LARTC] htb

2004-10-17 Thread ja



This is no good cause for example bittorent can 
download on port 80 :D. So the best way is create classes with ceil parameter 
for example 128kbit to ensure relability for every user and limit number of 
connections to 50-80 per user. This the best (i can get a word grr- you 
know) if you dont want to block p2p.

  - Original Message - 
  From: 
  James Lista 
  
  To: [EMAIL PROTECTED] 
  Sent: Sunday, October 17, 2004 2:42 
  PM
  Subject: [LARTC] htb
  
  buddies,
   
  i am newbie to band control..  i have a 
  linux box (as a router, NATing,) sharing internet
   
  internet--eth0-[linux.box]-eth1--my.lan
    
  wan = adsl 600
  lan  = about 20 users
   
  my problem is that due the contract i 
  cannot block users from my lan from 
  downloading anything, so they can use kazaa (argghh), 
  edonkey(arggh), emule(arghh), soulseek(arghj) etc etc 
  etc, 
   
  so,
   
  I want to know if using htb i can make that users 
  that uses browsers (port 80) have priority then users that uses port (110 and 
  25) , then rest of the ports.as if i could have 
  such thing:
   
   
  600kbit    50% for port 
  80
     
  30% for port 25 and 110
     
  20% for the rest 
   
  this way no user can complain that cannot access 
  his internet banking, checking his emails  and other thing that are 
  essentials...
   
  if it is possible (with htb) or any other method, 
  please tell me a direction for me to go..
   
  really thanks
   
  james 
   
   
   
   
   
   


Re: [LARTC] htb

2004-10-17 Thread Andreas Klauer
Am Sunday 17 October 2004 14:42 schrieb James Lista:
> 600kbit    50% for port 80
>30% for port 25 and 110
>20% for the rest

Sure, that's possible. That's one 600kbit class with three child classes.

However, there may be many other ports besides 25, 80, and 110 that deserve 
prioritizing. Throwing them in the same class as all filesharing traffic 
could make things even worse than before.

Then there's the problem that many filesharing protocols can work on any 
port, so your users could just move to one of the prioritized ports and 
take all the bandwidth again.

That's some of the reasons why I never bothered with prioritizing ports on 
a global basis. Consider using ipp2p or l7-filter for a more reliable way 
for detecting P2P traffic.

No matter how you look at it, 600kbit for 20 users is a bit slow. Even 
without P2P traffic, if all of them surf the web at the same time, they 
won't be very happy with the speed. 

Besides traffic shaping, you should do anything possible to reduce load. 
Cache DNS queries, provide a HTTP proxy, probably squid. Make sure that 
you can't be flooded from the outside. Stuff like that.

HTH
Andreas
___
LARTC mailing list / [EMAIL PROTECTED]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/


Re: [LARTC] HTB 2.6.8 works 2.4.27 does not!

2004-10-16 Thread gypsy
Peter Huetmannsberger wrote:
> 
> Hi again,
> 
> I have also changed the things suggested by Stef earlier on:
> - HTB hysteries
> - PSCHED_CPU
> - QLENGTH in sfq
> 
> Nothing seems to help. Kernel 2.4.27 distribution (RH9a)

Are you SURE the correct modules are being loaded?
___
LARTC mailing list / [EMAIL PROTECTED]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/


Re: [LARTC] HTB 2.6.8 works 2.4.27 does not!

2004-10-15 Thread Peter Huetmannsberger

Hi again, 

I have also changed the things suggested by Stef earlier on: 

- HTB hysteries 

- PSCHED_CPU 

- QLENGTH in sfq

Nothing seems to help. Kernel 2.4.27 distribution (RH9a)

Thanks, 

.peter

___
LARTC mailing list / [EMAIL PROTECTED]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/


Re: [LARTC] HTB

2004-10-14 Thread Jason Boxman
On Thursday 14 October 2004 14:23, sistemas wrote:
> Hi all
>
> I'm new in this list and i hope to lear and to help if possible.
>
> But firt i need help :-(
>
> I have this messege in my syslog when my classes and qdiscs goes down.
>
> Can any one know what does it mean?
>

I used to have an Oops an awful lot like that.  I upgraded to 2.6.9-rc3 and it 
resolved the problem.  Yours could be something else, though.

What `tc` configuration are you using?  What's the simplest possible 
configuration you can create that consistently reproduces the problem?

What specifically did you do to trigger this problem, if you know?

Thanks.

___
LARTC mailing list / [EMAIL PROTECTED]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/


Re: [LARTC] HTB weird problem ....

2004-10-09 Thread Andy Furniss
Drink Linux wrote:
if i remove the 1 packet ... it would be again exceed
the ceiling ... thanks ill try 
When you fix HTB you won't need it.
r u referring to this faq in docum??!?!?!
http://www.docum.org/docum.org/faq/cache/40.html
the file linux/include/net/sched/pkt_sched.h
include/net/pkt_sched.h is the one I changed on a 2.4.24.
does not have #define PSCHED_CLOCK_SOURCE PSCHED_CPU
 im using 2.4.20-22 kernel,  maybel ill try 2.4.27
2.4.27 should fix things HTB has been patched since 2.4.20.
If you have 8 Mbit wirless your ceil/master rates need to be a bit less 
to allow for overheads.

Andy.
___
LARTC mailing list / [EMAIL PROTECTED]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/


Re: [LARTC] HTB weird problem ....

2004-10-09 Thread Drink Linux
if i remove the 1 packet ... it would be again exceed
the ceiling ... thanks ill try 

r u referring to this faq in docum??!?!?!
http://www.docum.org/docum.org/faq/cache/40.html

the file linux/include/net/sched/pkt_sched.h

does not have #define PSCHED_CLOCK_SOURCE PSCHED_CPU
 im using 2.4.20-22 kernel,  maybel ill try 2.4.27

oh well i think i just have to check it out on monday
...thanks so much  :D 




--- Andy Furniss <[EMAIL PROTECTED]> wrote:

> Drink Linux wrote:
> > hello Andy , i think they are right for 
> > 256kbps = 2048kbit ...
> 
> ahh I see.
> 
> I just tried your setup on my eth0 and it works OK.
> Though HTB's stats 
> don't seem too accurate - I used wget/ftp to judge
> rates.
> 
> You may need to patch HTB/use a newer kernel - there
> was a patch posted 
> on this list a while back which may affect you.
> 
> Also you may need to set Hz higher or use psched =
> CPU for timing.
> 
> See www.docum.org .
> 
> > 
> > 
> > i have added a leaf pfifo with a limit of 1 packet
> per
> > second, coz if i have 2-10 it wont work...viola
> !!!
> > the ceiling rate for each class rule is now
> working...
> > my problem is that you can reach the ceiling class
> > only if you have 4-5 files getting through FTP, 
> > 
> > ex: 256kbps Ceil
> > 
> > 1 file ftp download = 80-90 kbps max speed 
> > 4-5 files ftp download = almost 256kbps
> > 
> > 
> > how can i make it work to 256kbps speed for 1 file
> > alone ...? 
> 
> Get rid of the 1 packet pfifo :-)
> 
> Andy.
> 
> 
> 
> 
> ___
> LARTC mailing list / [EMAIL PROTECTED]
> http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO:
> http://lartc.org/
> 




___
Do you Yahoo!?
Declare Yourself - Register online to vote today!
http://vote.yahoo.com
___
LARTC mailing list / [EMAIL PROTECTED]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/


Re: [LARTC] HTB weird problem ....

2004-10-08 Thread Jason Boxman
On Friday 08 October 2004 10:58, Andy Furniss wrote:

> Also you may need to set Hz higher or use psched = CPU for timing.

In 2.6.9 this looks like it'll be part of the `make config` process itself. :)

-- 

Jason Boxman
Perl Programmer / *NIX Systems Administrator
Shimberg Center for Affordable Housing | University of Florida
http://edseek.com/ - Linux and FOSS stuff

___
LARTC mailing list / [EMAIL PROTECTED]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/


Re: [LARTC] HTB weird problem ....

2004-10-08 Thread Andy Furniss
Drink Linux wrote:
hello Andy , i think they are right for 
256kbps = 2048kbit ...
ahh I see.
I just tried your setup on my eth0 and it works OK. Though HTB's stats 
don't seem too accurate - I used wget/ftp to judge rates.

You may need to patch HTB/use a newer kernel - there was a patch posted 
on this list a while back which may affect you.

Also you may need to set Hz higher or use psched = CPU for timing.
See www.docum.org .

i have added a leaf pfifo with a limit of 1 packet per
second, coz if i have 2-10 it wont work...viola !!!
the ceiling rate for each class rule is now working...
my problem is that you can reach the ceiling class
only if you have 4-5 files getting through FTP, 

ex: 256kbps Ceil
1 file ftp download = 80-90 kbps max speed 
4-5 files ftp download = almost 256kbps

how can i make it work to 256kbps speed for 1 file
alone ...? 
Get rid of the 1 packet pfifo :-)
Andy.

___
LARTC mailing list / [EMAIL PROTECTED]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/


Re: [LARTC] HTB weird problem ....

2004-10-08 Thread Drink Linux
hello Andy , i think they are right for 
256kbps = 2048kbit ...


i have added a leaf pfifo with a limit of 1 packet per
second, coz if i have 2-10 it wont work...viola !!!
the ceiling rate for each class rule is now working...
my problem is that you can reach the ceiling class
only if you have 4-5 files getting through FTP, 

ex: 256kbps Ceil

1 file ftp download = 80-90 kbps max speed 
4-5 files ftp download = almost 256kbps


how can i make it work to 256kbps speed for 1 file
alone ...? 


:)

 





--- Andy Furniss <[EMAIL PROTECTED]> wrote:

> Drink Linux wrote:
> > Hello good day to all ... this is my setup
> > 1 Linux Wireless Access Point, connected are 4
> > wireless gateway in which i needed to apply
> shaping
> > ...
> > ok here is the weird part... clients on each
> gateway
> > download files from the Acess Point ... a 500 mb
> file
> > through ftp
> > 
> > on gateway 1 which is up to 64 kbps ... the result
> is
> > from 60-64 kbps speed which is fine ...
> > 
> > on gateway 2 which is 128 kbps ... the result is
> > varying from 130 - 132 kbps (why does it exceed)?
> but
> > it is acceptable nevertheless
> > 
> > on gateway 3 which is up to 256 kbps ... the
> result is
> > the lowest rate clients can get is up to 285-286
> above
> > limit ?!?!! why did that happen...
> > 
> > on gateway 4 .. which is up to 512 kbps ... the
> rate
> > of the client is up to 600+ kbps ... why is that
> so ?!
> > 
> > anyway here is my script for anyone who can help
> > ...thanks
> > 
> > one thing is when i ftp 2 files ... the speed is
> > higher than the ceiling limit 
> > 
> > kernel is 2.4.22 ... with QoS enabled 
> > 
> > 
> > 
> > 
> > tc qdisc add dev wlan0 root handle 1:0 htb
> > 
> > tc class add dev wlan0 parent 1:0 classid 1:1 htb
> rate
> > 1024kbps ceil 1024kbps 
> > 
> > tc class add dev wlan0 parent 1:1 classid 1:10 htb
> > rate 1kbps ceil 64kbps  
> > tc class add dev wlan0 parent 1:1 classid 1:20 htb
> > rate 1kbps ceil 128kbps
> > tc class add dev wlan0 parent 1:1 classid 1:30 htb
> > rate 1kbps ceil 256kbps
> > tc class add dev wlan0 parent 1:1 classid 1:40 htb
> > rate 1kbps ceil 512kbps
> > 
> > 
> > tc filter add dev wlan0 parent 1:0 protocol ip u32
> > match ip dst 10.40.40.245 flowid 1:10
> > tc filter add dev wlan0 parent 1:0 protocol ip u32
> > match ip dst 10.40.40.246 flowid 1:20
> > tc filter add dev wlan0 parent 1:0 protocol ip u32
> > match ip dst 10.40.40.247 flowid 1:30
> > tc filter add dev wlan0 parent 1:0 protocol ip u32
> > match ip dst 10.40.40.248 flowid 1:40
> 
> kbps = k bytes/sec maybe you mean kbit for the
> rates.
> 
> Andy.




__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 
___
LARTC mailing list / [EMAIL PROTECTED]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/


Re: [LARTC] HTB weird problem ....

2004-10-08 Thread Andy Furniss
Drink Linux wrote:
Hello good day to all ... this is my setup
1 Linux Wireless Access Point, connected are 4
wireless gateway in which i needed to apply shaping
...
ok here is the weird part... clients on each gateway
download files from the Acess Point ... a 500 mb file
through ftp
on gateway 1 which is up to 64 kbps ... the result is
from 60-64 kbps speed which is fine ...
on gateway 2 which is 128 kbps ... the result is
varying from 130 - 132 kbps (why does it exceed)? but
it is acceptable nevertheless
on gateway 3 which is up to 256 kbps ... the result is
the lowest rate clients can get is up to 285-286 above
limit ?!?!! why did that happen...
on gateway 4 .. which is up to 512 kbps ... the rate
of the client is up to 600+ kbps ... why is that so ?!
anyway here is my script for anyone who can help
...thanks
one thing is when i ftp 2 files ... the speed is
higher than the ceiling limit 
kernel is 2.4.22 ... with QoS enabled 

tc qdisc add dev wlan0 root handle 1:0 htb
tc class add dev wlan0 parent 1:0 classid 1:1 htb rate
1024kbps ceil 1024kbps 

tc class add dev wlan0 parent 1:1 classid 1:10 htb
rate 1kbps ceil 64kbps  
tc class add dev wlan0 parent 1:1 classid 1:20 htb
rate 1kbps ceil 128kbps
tc class add dev wlan0 parent 1:1 classid 1:30 htb
rate 1kbps ceil 256kbps
tc class add dev wlan0 parent 1:1 classid 1:40 htb
rate 1kbps ceil 512kbps

tc filter add dev wlan0 parent 1:0 protocol ip u32
match ip dst 10.40.40.245 flowid 1:10
tc filter add dev wlan0 parent 1:0 protocol ip u32
match ip dst 10.40.40.246 flowid 1:20
tc filter add dev wlan0 parent 1:0 protocol ip u32
match ip dst 10.40.40.247 flowid 1:30
tc filter add dev wlan0 parent 1:0 protocol ip u32
match ip dst 10.40.40.248 flowid 1:40
kbps = k bytes/sec maybe you mean kbit for the rates.
Andy.
___
LARTC mailing list / [EMAIL PROTECTED]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/


Re: [LARTC] HTB and Openvpn

2004-10-06 Thread Andreas Klauer
Peter Huetmannsberger wrote:
I have changed my setup accordingly now, however there are still packets 
showing up on the default qdisc when I go through the tunnel, about half 
the packets don't seem to match. 
If there really only is udp traffic on port 5001, I don't see why your 
rules should match that only partially. If they were wrong, they'd 
either match everything or nothing at all, wouldn't they?

Did you see anything wrong with the filter rules. Openvpn uses port 5001 
on both ends, and tcpdump -i eth0 shows udp packets going back and forth 
on port 5001 and no other traffic, yet the default counter goes up along 
with the 1:10 qdisc.
I don't know tcpdump - when debugging filter rules, I usually adapt 
these rules to iptables and use iptables log with different prefixes to 
distinct which packets matched which rules (and which didn't match at 
all). If nothing shows up this way, then I too am clueless as to what 
might be wrong. Maybe someone else has a suggestion. :)

I don't have any experience with OpenVPN myself, so I don't know what's 
the best way to match OpenVPN traffic. Using port criteria alone, might 
not be waterproof enough, as long as anyone can use these ports for 
anything. Matching both IP and Port would probably be more reliable.

Andreas
___
LARTC mailing list / [EMAIL PROTECTED]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/


Re: [LARTC] HTB and Openvpn

2004-10-06 Thread Peter Huetmannsberger

Hi, many thanks for your help. 

I have changed my setup accordingly now, however there are still packets 
showing up on the default qdisc when I go through the tunnel, about half 
the packets don't seem to match. 

Did you see anything wrong with the filter rules. Openvpn uses port 5001 
on both ends, and tcpdump -i eth0 shows udp packets going back and forth 
on port 5001 and no other traffic, yet the default counter goes up along 
with the 1:10 qdisc.

Thanks again. 

.peter


___
LARTC mailing list / [EMAIL PROTECTED]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/


Re: [LARTC] HTB and Openvpn

2004-10-06 Thread Andreas Klauer
Peter Huetmannsberger wrote:
The idea was that all traffic going through the tunnel would have top 
priority and the rest share what's left. Sounded simple enough. 
You could use a prio queue for that. Tunnel on band 0, rest on band 1. 
Downside is that there may be nothing left for the rest to share. :-)

tc class add dev eth0 parent 1: classid 1:1 htb rate 10mbit burst 15k
Why make a 10mbit class when it's not used? I find it hard to tell what 
will happen when the rates don't add up properly.

tc class add dev eth0 parent 1:1 classid 1:10 htb rate 700kbit ceil 1mbit 
	burst 15k prio 0
Since the parent has 10mbit which is never fully used, this class will 
most likely always borrow as much as it can. So although it says 700kbit 
it's really a 1mbit class.

tc class add dev eth0 parent 1:1 classid 1:20 htb rate 1kbit ceil 28800 
	burst 15k
This class does not seem to be used at all, why does it exist?
tc class add dev eth0 parent 1:1 classid 1:30 htb rate 1kbit ceil 1mbit 
	burst 15k prio 1
Another 1mbit class. The parent has 10mbit, so there's no reason why it 
shouldn't be able to borrow another mbit, no matter what the actual 
priority of that class is. Am I wrong? :)

Any idea where I could be wrong?
Guesswork:
The logic of your class structure is flawed.
How fast is your connection to the outside world? I guess it's 1mbit, 
because you set the ceil of your VPN/rest class to 1mbit? However, the 
parent class of those two is a 10mbit class, so both borrow one 1mbit 
from that (they don't share the same one single mbit). In that case, no 
proper shaping is done at all.

10mbit then would be your LAN?
Then how about this class setup:
1:1  10mbit (LAN interface)
|
\--- 1:2 09mbit (LAN only traffic)
\--- 1:3 01mbit (Outside world traffic)
 |
 \--- 1:31 700kbit (VPN)
 \--- 1:32 300kbit (Rest)
This is (about) the kind of setup I use at home.
Make sure your rates add up.
If you intend to give your (Rest) class 1kbit only, throw HTB away and 
use PRIO instead. If (Rest) doesn't need any bandwidth at all, you can 
as well let it starve completely by using prio. And that's much less 
complicated than HTB.

Andreas
___
LARTC mailing list / [EMAIL PROTECTED]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/


Re: [LARTC] HTB problem...

2004-09-07 Thread Andreas Klauer
Am Tuesday 07 September 2004 23:18 schrieb Cow:
> zytec: (?)
> > I assume that you want somethink like:
> > data from server to LAN (PC1,PC2) unshaped (full 100mbit)
> > data from Internet to LAN shaped
>
> Correct.

Not really an example, but you may have a look at my script [1].

It solves the 100Mbit LAN vs internet traffic by using a class setup which 
looks like [2], which reminds me that I did a modification to wondershaper 
once [3] that does the same. I think this modification was reported to 
work, however I haven't tested it nor do I support it. Maybe it serves as 
an example...

I'm using a fat HTB class which knows the true interface bandwidth (100MBit 
isn't actually right, you should measure what rates you really get). Then 
there's a child class for the internet traffic and one for the actual LAN 
traffic. If HTB works correctly, this way you get full speed for LAN-only 
transfers, without letting them interfere with the internet traffic.

The script [1] is the one I'm (more or less) actively working on; it 
doesn't support custom rates per user yet, but that's something that'll be 
added for sure in one of the next releases.

HTH
Andreas

[1] http://www.metamorpher.de/fairnat/
[2] http://www.metamorpher.de/files/wshaper-over-lan.png
[3] http://www.metamorpher.de/files/wshaper-over-lan.htb
___
LARTC mailing list / [EMAIL PROTECTED]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/


Re: [LARTC] HTB problem...

2004-09-07 Thread zytek
Dnia poniedziałek 06 wrzesień 2004 23:56, Cow napisał:
> Hi folks.
>
> Let's say I would like to make some bandwidth control on my network
> using HTB. I have 2 clients:
[...]
> I think a script as i described, could be very complex to write,
> therefore i ask, whoever is here, for help.
> Thank you all in advance.


Hello all, my first post here, maybe even I will help someone;)

I assume that you want somethink like:
data from server to LAN (PC1,PC2) unshaped (full 100mbit)
data from Internet to LAN shaped

Then all you need to do is make classes with source 192.168.0.1 and 
destination 192.168.0.2(3) and 100mbit rate and then make classes with 
destination 192.168.0.2(3) with download rate. I believe that you understand 
what I am thinkig of.

Or you can use iptables and mark traffic going from server to LAN, and other 
mark for traffic in FORWARD chain. (iptables -t mangle -A FORWARD -j MARK 
--set-mark SOME_MARK)
When using iptables you will be able to shape upload speed, just mark traffic 
in forward going from PC1/2 with output interface eth2 (-o eth2) - it will be 
hosts upload.

I won't write you full script, make it yourself, visit LARTC and firstly try 
"htb.init" for simple class creation. Good fun!


-- 
.: Jakub Głazik (zytek)
.: email:[EMAIL PROTECTED]
.: JID:[EMAIL PROTECTED]
.: http://www.misiaj.sie.pl [obsolete]
___
LARTC mailing list / [EMAIL PROTECTED]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/


Re: [LARTC] HTB mpu and overhead settings for PPPoE ADSL?

2004-08-23 Thread Andy Furniss
Stefan Gold wrote:
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Hello,
I'm using HTB to shape my outgoing traffic over a ADSL-link with PPPoE with a 
nominal bandwidth of 128kbit/s. My goal is to favour small packets like ACKs 
and interactive services like ssh; in other words, I want to achieve low 
lantency.

If there are some big packets going over the wire, everything works fine. But 
if there are many small packets saturating my uplink, I get pings of 1000ms 
and above. To minimize this effect I've set the HTB qdisc rate to 100kbit/s. 
But even now, throttling my uplink to lower than 80% of physical bandwidth, 
pings go up to 800ms in some cases.

Today I've noticed, that two additional parameters have been added recently to 
the HTB-shaper: mpu and overhead. Are this new parameters suitable for 
solving my problem?
Which are smart values for this two settings? I'm shaping the ppp-device 
directly, not the ethernet-device on which the dsl-modem is connected and I'm 
using the kernel pppoe driver (if this is important for you to know).

You could use Ed Wildgooses' patch -
http://mailman.ds9a.nl/pipermail/lartc/2004q2/012752.html
But you need to know your ppp overhead - which may be hard unless you 
can get a cell count out of your modem.

http://www.mail-archive.com/[EMAIL PROTECTED]/msg06895.html
Andy.
___
LARTC mailing list / [EMAIL PROTECTED]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/


Re: [LARTC] htb and fw problems

2004-08-04 Thread Ing Isianto Istiadi
On Thu, 5 Aug 2004 01:40:48 +0200

> Please write what commands do you use to see "the counter" and what counter
> do you mean? I think counter for ip packets isn't it?
I'm using iptables -L -v -x -t mangle
and look for my rule. My assumptions is that if the counter is counting up in the 
iptables rules, then the iptable rules catches the packet, and it should mark the 
catched packet with whatever marking I put. Is it correct (my assumptions)?

I've read your archieve before, I asked but I can't find any solutions since (in my 
case I really want to limit per ip for web only).

Thanks
___
LARTC mailing list / [EMAIL PROTECTED]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/


Re: [LARTC] htb and fw problems

2004-08-04 Thread mjoachimiak
>>I can see the counter works in iptables, but in the htb, it doesn't go to
the right class
Please write what commands do you use to see "the counter" and what counter
do you mean? I think counter for ip packets isn't it?

You can try to see my problem in LARTC archive: "HTB 3.13 please help".

 In my opinion you have bad configured packet marking.
See my configuration of packet marking. I included it with archive posts in
"HTB 3.13 please help"

-
> Dear All,
> I'm using the kernel 2.6.6, iproute2-2.4.7.20020116, iptables v1.2.9, and
gentoo.
> I have a leased-line 64 kbps.
> I can see the counter works in iptables, but in the htb, it doesn't go to
the right class (it always go to the default class).
>
> Any help will be appreciated
>
>
> here's my htb conf
> #!/bin/bash
>
> tc qdisc del dev eth1 root
>
> tc qdisc add dev eth1 root handle 1: htb default 80
> tc class add dev eth1 parent 1: classid 1:1 htb rate 65kbps ceil 65kbps
> tc class add dev eth1 parent 1:1 classid 1:10 htb rate 20kbps ceil 35kbps
prio 3
> tc class add dev eth1 parent 1:1 classid 1:20 htb rate 5kbps ceil 10kbps
prio 0
> tc class add dev eth1 parent 1:1 classid 1:30 htb rate 8kbps ceil 11kbps
prio 2
> tc class add dev eth1 parent 1:1 classid 1:40 htb rate 23kbps ceil 40kbps
prio 1
> tc class add dev eth1 parent 1:1 classid 1:80 htb rate 8kbps ceil 10kbps
prio 4
>
> tc qdisc add dev eth1 parent 1:10 handle 10: sfq perturb 10
> tc qdisc add dev eth1 parent 1:20 handle 20: sfq perturb 10
> tc qdisc add dev eth1 parent 1:30 handle 30: sfq perturb 10
> tc qdisc add dev eth1 parent 1:40 handle 40: sfq perturb 10
> tc qdisc add dev eth1 parent 1:80 handle 80: sfq perturb 10
>
> tc filter add dev eth1 parent 1:0 protocol ip  handle 10 fw flowid 1:10
> tc filter add dev eth1 parent 1:0 protocol ip  handle 20 fw flowid 1:20
> tc filter add dev eth1 protocol ip parent 1:0  handle 30 fw flowid 1:30
> tc filter add dev eth1 parent 1:0 protocol ip handle  40 fw classid 1:40
> tc filter add dev eth1 protocol ip parent 1:0  handle 80 fw flowid 1:80
>
> Here's my iptables rules*mangle
> :PREROUTING ACCEPT [1061:863210]
> :INPUT ACCEPT [1022:857788]
> :FORWARD ACCEPT [0:0]
> :OUTPUT ACCEPT [947:201743]
> :POSTROUTING ACCEPT [947:201743]
> -N personal
> -N others
> -N personal1
> #-A OUTPUT -p tcp -m tcp --sport 3128 -j MARK --set-mark 0x2
> -A OUTPUT -p tcp -m tcp --sport 3128 --destination 192.168.1.145 -j
personal
> #-A OUTPUT -p tcp -m tcp --dport 80 -j MARK --set-mark 20
> -A OUTPUT -p tcp -m tcp --dport 80 -j others
> -A personal -j MARK --set-mark 40
> -A others -j MARK --set-mark 20
>
>
> Here's my iptables -L -v -t mangle -x output
> Chain PREROUTING (policy ACCEPT 580535 packets, 176796832 bytes)
> pkts  bytes target prot opt in out source
destination
>
> Chain INPUT (policy ACCEPT 573475 packets, 174919251 bytes)
> pkts  bytes target prot opt in out source
destination
>
> Chain FORWARD (policy ACCEPT 5656 packets, 1810367 bytes)
> pkts  bytes target prot opt in out source
destination
>
> Chain OUTPUT (policy ACCEPT 598621 packets, 392036436 bytes)
> pkts  bytes target prot opt in out source
destination
>11105 14785525 personal   tcp  --  anyany anywhere
192.168.1.145   tcp spt:webcache
>28465  2233910 others tcp  --  anyany anywhere
anywheretcp dpt:www
>
> Chain POSTROUTING (policy ACCEPT 604295 packets, 393851150 bytes)
> pkts  bytes target prot opt in out source
destination
>
> Chain others (1 references)
> pkts  bytes target prot opt in out source
destination
>28465  2233910 MARK   all  --  anyany anywhere
anywhereMARK set 0x14
>
> Chain personal (1 references)
> pkts  bytes target prot opt in out source
destination
>11105 14785525 MARK   all  --  anyany anywhere
anywhereMARK set 0x28
>
> Chain personal1 (0 references)
> pkts  bytes target prot opt in out source
destination
>
> Here's my
>
> /sbin/tc -s qdisc show dev eth1
>
> qdisc sfq 80: limit 128p quantum 1514b perturb 10sec
>  Sent 386 bytes 5 pkts (dropped 0, overlimits 0)
> qdisc sfq 40: limit 128p quantum 1514b perturb 10sec
>  Sent 0 bytes 0 pkts (dropped 0, overlimits 0)
> qdisc sfq 30: limit 128p quantum 1514b perturb 10sec
>  Sent 0 bytes 0 pkts (dropped 0, overlimits 0)
> qdisc sfq 20: limit 128p quantum 1514b perturb 10sec
>  Sent 12272 bytes 72 pkts (dropped 0, overlimits 0)
> qdisc sfq 10: limit 128p quantum 1514b perturb 10sec
>  Sent 0 bytes 0 pkts (dropped 0, overlimits 0)
> qdisc htb 1: r2q 10 default 80 direct_packets_stat 0
>  Sent 12658 bytes 77 pkts (dropped 0, overlimits 0)
>
>
> tc -s -d filter show dev eth1
>
> filter parent 1: protocol ip pref 49151 fw
> filter parent 1: protocol ip pref 49151 fw handle 0x50 clas

Re: [LARTC] htb and fw problems

2004-08-04 Thread Ing Isianto Istiadi
On Wed, 04 Aug 2004 14:31:06 +
[EMAIL PROTECTED] wrote:

> it looks like you might have a problem with your marking with the FW.
That's what I thought, but I can't troubleshoot any other way.
I tried both ways 0x80, 80 to the same affect.
The strange problem is if I omitted the source ip part, so
iptables -A OUTPUT -p tcp -t mangle --dport www -j MARK --set-mark 40
it works
I'm out of my head
 ^_^

> 
> From Looking at this I see the first commented link that as the mark in hex, Don't
> all the marks need to be written this way?  0x80 0x40 0x20 ?
> 
> This is just a guess I don't really know.
> 
> 
> Ing Isianto Istiadi ([EMAIL PROTECTED]) wrote:
> >
> >Dear All,
> >I'm using the kernel 2.6.6, iproute2-2.4.7.20020116, iptables v1.2.9, and gentoo.
> >I have a leased-line 64 kbps.
> >I can see the counter works in iptables, but in the htb, it doesn't go to the right
> class (it always go to the default class).
> >
> >Any help will be appreciated
> >
> >
> >here's my htb conf
> >#!/bin/bash
> >
> >tc qdisc del dev eth1 root
> >
> >tc qdisc add dev eth1 root handle 1: htb default 80
> >tc class add dev eth1 parent 1: classid 1:1 htb rate 65kbps ceil 65kbps
> >tc class add dev eth1 parent 1:1 classid 1:10 htb rate 20kbps ceil 35kbps prio 3
> >tc class add dev eth1 parent 1:1 classid 1:20 htb rate 5kbps ceil 10kbps prio 0
> >tc class add dev eth1 parent 1:1 classid 1:30 htb rate 8kbps ceil 11kbps prio 2
> >tc class add dev eth1 parent 1:1 classid 1:40 htb rate 23kbps ceil 40kbps prio 1
> >tc class add dev eth1 parent 1:1 classid 1:80 htb rate 8kbps ceil 10kbps prio 4
> >
> >tc qdisc add dev eth1 parent 1:10 handle 10: sfq perturb 10
> >tc qdisc add dev eth1 parent 1:20 handle 20: sfq perturb 10
> >tc qdisc add dev eth1 parent 1:30 handle 30: sfq perturb 10
> >tc qdisc add dev eth1 parent 1:40 handle 40: sfq perturb 10
> >tc qdisc add dev eth1 parent 1:80 handle 80: sfq perturb 10
> >
> >tc filter add dev eth1 parent 1:0 protocol ip  handle 10 fw flowid 1:10
> >tc filter add dev eth1 parent 1:0 protocol ip  handle 20 fw flowid 1:20
> >tc filter add dev eth1 protocol ip parent 1:0  handle 30 fw flowid 1:30
> >tc filter add dev eth1 parent 1:0 protocol ip handle  40 fw classid 1:40
> >tc filter add dev eth1 protocol ip parent 1:0  handle 80 fw flowid 1:80
> >
> >Here's my iptables rules*mangle
> >:PREROUTING ACCEPT [1061:863210]
> >:INPUT ACCEPT [1022:857788]
> >:FORWARD ACCEPT [0:0]
> >:OUTPUT ACCEPT [947:201743]
> >:POSTROUTING ACCEPT [947:201743]
> >-N personal
> >-N others
> >-N personal1
> >#-A OUTPUT -p tcp -m tcp --sport 3128 -j MARK --set-mark 0x2
> >-A OUTPUT -p tcp -m tcp --sport 3128 --destination 192.168.1.145 -j personal
> >#-A OUTPUT -p tcp -m tcp --dport 80 -j MARK --set-mark 20
> >-A OUTPUT -p tcp -m tcp --dport 80 -j others
> >-A personal -j MARK --set-mark 40
> >-A others -j MARK --set-mark 20
> >
> >
> >Here's my iptables -L -v -t mangle -x output
> >Chain PREROUTING (policy ACCEPT 580535 packets, 176796832 bytes)
> >pkts  bytes target prot opt in out source   
> > destination
> >
> >Chain INPUT (policy ACCEPT 573475 packets, 174919251 bytes)
> >pkts  bytes target prot opt in out source   
> > destination
> >
> >Chain FORWARD (policy ACCEPT 5656 packets, 1810367 bytes)
> >pkts  bytes target prot opt in out source   
> > destination
> >
> >Chain OUTPUT (policy ACCEPT 598621 packets, 392036436 bytes)
> >pkts  bytes target prot opt in out source   
> > destination
> >   11105 14785525 personal   tcp  --  anyany anywhere
> 192.168.1.145   tcp spt:webcache
> >   28465  2233910 others tcp  --  anyany anywhere anywhere
>tcp dpt:www
> >
> >Chain POSTROUTING (policy ACCEPT 604295 packets, 393851150 bytes)
> >pkts  bytes target prot opt in out source   
> > destination
> >
> >Chain others (1 references)
> >pkts  bytes target prot opt in out source   
> > destination
> >   28465  2233910 MARK   all  --  anyany anywhere anywhere
>MARK set 0x14
> >
> >Chain personal (1 references)
> >pkts  bytes target prot opt in out source   
> > destination
> >   11105 14785525 MARK   all  --  anyany anywhere anywhere
>MARK set 0x28
> >
> >Chain personal1 (0 references)
> >pkts  bytes target prot opt in out source   
> > destination
> >
> >Here's my
> >
> >/sbin/tc -s qdisc show dev eth1
> >
> >qdisc sfq 80: limit 128p quantum 1514b perturb 10sec
> > Sent 386 bytes 5 pkts (dropped 0, overlimits 0)
> >qdisc sfq 40: limit 128p quantum 1514b perturb 10sec
> > Sent 0 bytes 0 pkts (dropped 0, overlimits 0)
> >qdisc sfq 30: limit 128p quantum 1514b perturb 10sec
> > Sent 0 bytes 0 pkts (dropped 0, overlimits 0)
> >qdisc sfq 20: limit 128p quantum 1514b per

Re: [LARTC] htb and fw problems

2004-08-04 Thread zoop
it looks like you might have a problem with your marking with the FW.

>#-A OUTPUT -p tcp -m tcp --sport 3128 -j MARK --set-mark 0x2
>-A OUTPUT -p tcp -m tcp --dport 80 -j others
>-A personal -j MARK --set-mark 40
>-A others -j MARK --set-mark 20

>From Looking at this I see the first commented link that as the mark in hex, Don't
all the marks need to be written this way?  0x80 0x40 0x20 ?

This is just a guess I don't really know.


Ing Isianto Istiadi ([EMAIL PROTECTED]) wrote:
>
>Dear All,
>I'm using the kernel 2.6.6, iproute2-2.4.7.20020116, iptables v1.2.9, and gentoo.
>I have a leased-line 64 kbps.
>I can see the counter works in iptables, but in the htb, it doesn't go to the right
class (it always go to the default class).
>
>Any help will be appreciated
>
>
>here's my htb conf
>#!/bin/bash
>
>tc qdisc del dev eth1 root
>
>tc qdisc add dev eth1 root handle 1: htb default 80
>tc class add dev eth1 parent 1: classid 1:1 htb rate 65kbps ceil 65kbps
>tc class add dev eth1 parent 1:1 classid 1:10 htb rate 20kbps ceil 35kbps prio 3
>tc class add dev eth1 parent 1:1 classid 1:20 htb rate 5kbps ceil 10kbps prio 0
>tc class add dev eth1 parent 1:1 classid 1:30 htb rate 8kbps ceil 11kbps prio 2
>tc class add dev eth1 parent 1:1 classid 1:40 htb rate 23kbps ceil 40kbps prio 1
>tc class add dev eth1 parent 1:1 classid 1:80 htb rate 8kbps ceil 10kbps prio 4
>
>tc qdisc add dev eth1 parent 1:10 handle 10: sfq perturb 10
>tc qdisc add dev eth1 parent 1:20 handle 20: sfq perturb 10
>tc qdisc add dev eth1 parent 1:30 handle 30: sfq perturb 10
>tc qdisc add dev eth1 parent 1:40 handle 40: sfq perturb 10
>tc qdisc add dev eth1 parent 1:80 handle 80: sfq perturb 10
>
>tc filter add dev eth1 parent 1:0 protocol ip  handle 10 fw flowid 1:10
>tc filter add dev eth1 parent 1:0 protocol ip  handle 20 fw flowid 1:20
>tc filter add dev eth1 protocol ip parent 1:0  handle 30 fw flowid 1:30
>tc filter add dev eth1 parent 1:0 protocol ip handle  40 fw classid 1:40
>tc filter add dev eth1 protocol ip parent 1:0  handle 80 fw flowid 1:80
>
>Here's my iptables rules*mangle
>:PREROUTING ACCEPT [1061:863210]
>:INPUT ACCEPT [1022:857788]
>:FORWARD ACCEPT [0:0]
>:OUTPUT ACCEPT [947:201743]
>:POSTROUTING ACCEPT [947:201743]
>-N personal
>-N others
>-N personal1
>#-A OUTPUT -p tcp -m tcp --sport 3128 -j MARK --set-mark 0x2
>-A OUTPUT -p tcp -m tcp --sport 3128 --destination 192.168.1.145 -j personal
>#-A OUTPUT -p tcp -m tcp --dport 80 -j MARK --set-mark 20
>-A OUTPUT -p tcp -m tcp --dport 80 -j others
>-A personal -j MARK --set-mark 40
>-A others -j MARK --set-mark 20
>
>
>Here's my iptables -L -v -t mangle -x output
>Chain PREROUTING (policy ACCEPT 580535 packets, 176796832 bytes)
>pkts  bytes target prot opt in out source   
> destination
>
>Chain INPUT (policy ACCEPT 573475 packets, 174919251 bytes)
>pkts  bytes target prot opt in out source   
> destination
>
>Chain FORWARD (policy ACCEPT 5656 packets, 1810367 bytes)
>pkts  bytes target prot opt in out source   
> destination
>
>Chain OUTPUT (policy ACCEPT 598621 packets, 392036436 bytes)
>pkts  bytes target prot opt in out source   
> destination
>   11105 14785525 personal   tcp  --  anyany anywhere
192.168.1.145   tcp spt:webcache
>   28465  2233910 others tcp  --  anyany anywhere anywhere
   tcp dpt:www
>
>Chain POSTROUTING (policy ACCEPT 604295 packets, 393851150 bytes)
>pkts  bytes target prot opt in out source   
> destination
>
>Chain others (1 references)
>pkts  bytes target prot opt in out source   
> destination
>   28465  2233910 MARK   all  --  anyany anywhere anywhere
   MARK set 0x14
>
>Chain personal (1 references)
>pkts  bytes target prot opt in out source   
> destination
>   11105 14785525 MARK   all  --  anyany anywhere anywhere
   MARK set 0x28
>
>Chain personal1 (0 references)
>pkts  bytes target prot opt in out source   
> destination
>
>Here's my
>
>/sbin/tc -s qdisc show dev eth1
>
>qdisc sfq 80: limit 128p quantum 1514b perturb 10sec
> Sent 386 bytes 5 pkts (dropped 0, overlimits 0)
>qdisc sfq 40: limit 128p quantum 1514b perturb 10sec
> Sent 0 bytes 0 pkts (dropped 0, overlimits 0)
>qdisc sfq 30: limit 128p quantum 1514b perturb 10sec
> Sent 0 bytes 0 pkts (dropped 0, overlimits 0)
>qdisc sfq 20: limit 128p quantum 1514b perturb 10sec
> Sent 12272 bytes 72 pkts (dropped 0, overlimits 0)
>qdisc sfq 10: limit 128p quantum 1514b perturb 10sec
> Sent 0 bytes 0 pkts (dropped 0, overlimits 0)
>qdisc htb 1: r2q 10 default 80 direct_packets_stat 0
> Sent 12658 bytes 77 pkts (dropped 0, overlimits 0)
>
>
>tc -s -d filter show dev eth1
>
>filter parent 1: protocol ip pref 49151 fw
>filter parent 1: protocol i

Re: [LARTC] htb and fw problems

2004-08-04 Thread Ing Isianto Istiadi
Ok, 
here's my new htb config

#!/bin/bash

tc qdisc del dev eth1 root

tc qdisc add dev eth1 root handle 1: htb default 80 debug 333
tc class add dev eth1 parent 1: classid 1:1 htb rate 60kbit ceil 60kbit
tc class add dev eth1 parent 1:1 classid 1:10 htb rate 20kbit ceil 65kbit prio 3
tc class add dev eth1 parent 1:1 classid 1:20 htb rate 10kbit ceil 15kbit prio 0
tc class add dev eth1 parent 1:1 classid 1:30 htb rate 5kbit ceil 11kbit prio 2
tc class add dev eth1 parent 1:1 classid 1:40 htb rate 20kbit ceil 23kbit prio 1
tc class add dev eth1 parent 1:1 classid 1:80 htb rate 5kbit ceil 10kbit prio 4

tc qdisc add dev eth1 parent 1:10 handle 10: sfq perturb 10
tc qdisc add dev eth1 parent 1:20 handle 20: sfq perturb 10
tc qdisc add dev eth1 parent 1:30 handle 30: sfq perturb 10
tc qdisc add dev eth1 parent 1:40 handle 40: sfq perturb 10
tc qdisc add dev eth1 parent 1:80 handle 80: sfq perturb 10



tc filter add dev eth1 parent 1:0 protocol ip  handle 1 fw flowid 1:10
tc filter add dev eth1 parent 1:0 protocol ip  handle 2 fw flowid 1:20
tc filter add dev eth1 protocol ip parent 1:0  handle 3 fw flowid 1:30
tc filter add dev eth1 parent 1:0 protocol ip handle  4 fw flowid 1:40
tc filter add dev eth1 protocol ip parent 1:0  handle 80 fw flowid 1:80

whith the same effect.
Thanks for pointing out the parent's rate. it's my mistakes ^_^


> > > > > Here's my iptables rules*mangle
> > > > > :PREROUTING ACCEPT [1061:863210]
> > > > > :INPUT ACCEPT [1022:857788]
> > > > > :FORWARD ACCEPT [0:0]
> > > > > :OUTPUT ACCEPT [947:201743]
> > > > > :POSTROUTING ACCEPT [947:201743]
> > > > > -N personal
> > > > > -N others
> > > > > -N personal1
> > > > > #-A OUTPUT -p tcp -m tcp --sport 3128 -j MARK --set-mark 0x2
> > > > > -A OUTPUT -p tcp -m tcp --sport 3128 --destination 192.168.1.145 -j
> > > > personal
> > > > > #-A OUTPUT -p tcp -m tcp --dport 80 -j MARK --set-mark 20
> > > > > -A OUTPUT -p tcp -m tcp --dport 80 -j others
> > > > > -A personal -j MARK --set-mark 40
> > > > > -A others -j MARK --set-mark 20
> > > > >
> > > > >
> > > > > Here's my iptables -L -v -t mangle -x output
> > > > > Chain PREROUTING (policy ACCEPT 580535 packets, 176796832 bytes)
> > > > > pkts  bytes target prot opt in out source
> > > > destination
> > > > >
> > > > > Chain INPUT (policy ACCEPT 573475 packets, 174919251 bytes)
> > > > > pkts  bytes target prot opt in out source
> > > > destination
> > > > >
> > > > > Chain FORWARD (policy ACCEPT 5656 packets, 1810367 bytes)
> > > > > pkts  bytes target prot opt in out source
> > > > destination
> > > > >
> > > > > Chain OUTPUT (policy ACCEPT 598621 packets, 392036436 bytes)
> > > > > pkts  bytes target prot opt in out source
> > > > destination
> > > > >11105 14785525 personal   tcp  --  anyany anywhere
> > > > 192.168.1.145   tcp spt:webcache
> > > > >28465  2233910 others tcp  --  anyany anywhere
> > > > anywheretcp dpt:www
> > > > >
> > > > > Chain POSTROUTING (policy ACCEPT 604295 packets, 393851150 bytes)
> > > > > pkts  bytes target prot opt in out source
> > > > destination
> > > > >
> > > > > Chain others (1 references)
> > > > > pkts  bytes target prot opt in out source
> > > > destination
> > > > >28465  2233910 MARK   all  --  anyany anywhere
> > > > anywhereMARK set 0x14
> > > > >
> > > > > Chain personal (1 references)
> > > > > pkts  bytes target prot opt in out source
> > > > destination
> > > > >11105 14785525 MARK   all  --  anyany anywhere
> > > > anywhereMARK set 0x28
> > > > >
> > > > > Chain personal1 (0 references)
> > > > > pkts  bytes target prot opt in out source
> > > > destination
> > > > >
> > > > > Here's my
> > > > >
> > > > > /sbin/tc -s qdisc show dev eth1
> > > > >
> > > > > qdisc sfq 80: limit 128p quantum 1514b perturb 10sec
> > > > >  Sent 386 bytes 5 pkts (dropped 0, overlimits 0)
> > > > > qdisc sfq 40: limit 128p quantum 1514b perturb 10sec
> > > > >  Sent 0 bytes 0 pkts (dropped 0, overlimits 0)
> > > > > qdisc sfq 30: limit 128p quantum 1514b perturb 10sec
> > > > >  Sent 0 bytes 0 pkts (dropped 0, overlimits 0)
> > > > > qdisc sfq 20: limit 128p quantum 1514b perturb 10sec
> > > > >  Sent 12272 bytes 72 pkts (dropped 0, overlimits 0)
> > > > > qdisc sfq 10: limit 128p quantum 1514b perturb 10sec
> > > > >  Sent 0 bytes 0 pkts (dropped 0, overlimits 0)
> > > > > qdisc htb 1: r2q 10 default 80 direct_packets_stat 0
> > > > >  Sent 12658 bytes 77 pkts (dropped 0, overlimits 0)
> > > > >
> > > > >
> > > > > tc -s -d filter show dev eth1
> > > > >
> > > > > filter parent 1: protocol ip pref 49151 fw
> > > > > filter parent 1: protocol ip pref 49151 fw handle 0x50 classid 1:80
> > > > > filter parent 1: protocol ip pref 49151 fw
> > > > > filter parent 1: protocol ip pref 49151 fw handle 0x28 

Re: [LARTC] htb and fw problems

2004-08-04 Thread Morten Kramer
only short answer test

sorry


- Original Message -
From: "Ing Isianto Istiadi" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, August 04, 2004 3:11 PM
Subject: Re: [LARTC] htb and fw problems


> Dear, I have change
> tc class add dev eth1 parent 1: classid 1:1 htb rate 65kbps ceil 65kbps
> to
> tc class add dev eth1 parent 1: classid 1:1 htb rate 60kbps ceil 60kbps
> still with the same result
> any other tips?
>
> On Wed, 4 Aug 2004 13:41:34 +0200
> <[EMAIL PROTECTED]> wrote:
>
> >
> > - Original Message -
> > From: <[EMAIL PROTECTED]>
> > To: "Ing Isianto Istiadi" <[EMAIL PROTECTED]>
> > Sent: Wednesday, August 04, 2004 1:40 PM
> > Subject: Re: [LARTC] htb and fw problems
> >
> >
> > > hi!
> > > your default class must not have rate grater than your desired speed
rate.
> > > If you have 64kbps your class shoud have 60kbps or less. Without this
htb
> > > will not work as you except!
> > > tc class add dev eth1 parent 1: classid 1:1 htb rate 65kbps ceil
65kbps
> > > - Original Message -
> > > From: "Ing Isianto Istiadi" <[EMAIL PROTECTED]>
> > > To: <[EMAIL PROTECTED]>
> > > Sent: Wednesday, August 04, 2004 11:00 AM
> > > Subject: [LARTC] htb and fw problems
> > >
> > >
> > > > Dear All,
> > > > I'm using the kernel 2.6.6, iproute2-2.4.7.20020116, iptables
v1.2.9,
> > and
> > > gentoo.
> > > > I have a leased-line 64 kbps.
> > > > I can see the counter works in iptables, but in the htb, it doesn't
go
> > to
> > > the right class (it always go to the default class).
> > > >
> > > > Any help will be appreciated
> > > >
> > > >
> > > > here's my htb conf
> > > > #!/bin/bash
> > > >
> > > > tc qdisc del dev eth1 root
> > > >
> > > > tc qdisc add dev eth1 root handle 1: htb default 80
> > > > tc class add dev eth1 parent 1: classid 1:1 htb rate 65kbps ceil
65kbps
> > > > tc class add dev eth1 parent 1:1 classid 1:10 htb rate 20kbps ceil
> > 35kbps
> > > prio 3
> > > > tc class add dev eth1 parent 1:1 classid 1:20 htb rate 5kbps ceil
10kbps
> > > prio 0
> > > > tc class add dev eth1 parent 1:1 classid 1:30 htb rate 8kbps ceil
11kbps
> > > prio 2
> > > > tc class add dev eth1 parent 1:1 classid 1:40 htb rate 23kbps ceil
> > 40kbps
> > > prio 1
> > > > tc class add dev eth1 parent 1:1 classid 1:80 htb rate 8kbps ceil
10kbps
> > > prio 4
> > > >
> > > > tc qdisc add dev eth1 parent 1:10 handle 10: sfq perturb 10
> > > > tc qdisc add dev eth1 parent 1:20 handle 20: sfq perturb 10
> > > > tc qdisc add dev eth1 parent 1:30 handle 30: sfq perturb 10
> > > > tc qdisc add dev eth1 parent 1:40 handle 40: sfq perturb 10
> > > > tc qdisc add dev eth1 parent 1:80 handle 80: sfq perturb 10
> > > >
> > > > tc filter add dev eth1 parent 1:0 protocol ip  handle 10 fw flowid
1:10
> > > > tc filter add dev eth1 parent 1:0 protocol ip  handle 20 fw flowid
1:20
> > > > tc filter add dev eth1 protocol ip parent 1:0  handle 30 fw flowid
1:30
> > > > tc filter add dev eth1 parent 1:0 protocol ip handle  40 fw classid
1:40
> > > > tc filter add dev eth1 protocol ip parent 1:0  handle 80 fw flowid
1:80
> > > >
> > > > Here's my iptables rules*mangle
> > > > :PREROUTING ACCEPT [1061:863210]
> > > > :INPUT ACCEPT [1022:857788]
> > > > :FORWARD ACCEPT [0:0]
> > > > :OUTPUT ACCEPT [947:201743]
> > > > :POSTROUTING ACCEPT [947:201743]
> > > > -N personal
> > > > -N others
> > > > -N personal1
> > > > #-A OUTPUT -p tcp -m tcp --sport 3128 -j MARK --set-mark 0x2
> > > > -A OUTPUT -p tcp -m tcp --sport 3128 --destination 192.168.1.145 -j
> > > personal
> > > > #-A OUTPUT -p tcp -m tcp --dport 80 -j MARK --set-mark 20
> > > > -A OUTPUT -p tcp -m tcp --dport 80 -j others
> > > > -A personal -j MARK --set-mark 40
> > > > -A others -j MARK --set-mark 20
> > > >
> > > >
> > > > Here's my iptables -L -v -t mangle -x output
> > > > Chain PREROUTING (policy ACCEPT 580535 packets, 176796832 bytes)
> > > > pkts  bytes target prot opt in out source
> > > destination
> > > >

Re: [LARTC] htb and fw problems

2004-08-04 Thread Martin A. Brown
Dear Isianto Istiadi,

Here are your class creation statements:

 : [ snip ]  1: classid 1:1 htb rate 65kbps ceil 65kbps
 : [ snip ]  1:1 classid 1:10 htb rate 20kbps ceil 35kbps prio 3
 : [ snip ]  1:1 classid 1:20 htb rate 5kbps ceil 10kbps prio 0
 : [ snip ]  1:1 classid 1:30 htb rate 8kbps ceil 11kbps prio 2
 : [ snip ]  1:1 classid 1:40 htb rate 23kbps ceil 40kbps prio 1
 : [ snip ]  1:1 classid 1:80 htb rate 8kbps ceil 10kbps prio 4

You are configuring HTB to guarantee exactly 64kbps to the children
classes.

  - Leaf class rate is guaranteed.  HTB does not check parent classes.
This may be non-intuitive or even counter-intuitive.
  - Your rates, then total 64kbps: 20 + 5 + 8 + 23 + 8 = 64

Perhaps you could try dropping the guaranteed bandwidth (sum of
rates of leaf classes) below 60kbps.

-Martin

--
Martin A. Brown --- SecurePipe, Inc. --- [EMAIL PROTECTED]
___
LARTC mailing list / [EMAIL PROTECTED]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/


Re: [LARTC] htb and fw problems

2004-08-04 Thread Arno
Hello,

On Wednesday 04 August 2004 11:00, Ing Isianto Istiadi wrote:

> I'm using the kernel 2.6.6, iproute2-2.4.7.20020116, iptables v1.2.9, and
> gentoo. I have a leased-line 64 kbps.
> I can see the counter works in iptables, but in the htb, it doesn't go to
> the right class (it always go to the default class).
>
> Any help will be appreciated
>
>
> here's my htb conf
> #!/bin/bash
>
> tc qdisc del dev eth1 root
>
> tc qdisc add dev eth1 root handle 1: htb default 80
> tc class add dev eth1 parent 1: classid 1:1 htb rate 65kbps ceil 65kbps
> tc class add dev eth1 parent 1:1 classid 1:10 htb rate 20kbps ceil 35kbps
> prio 3 tc class add dev eth1 parent 1:1 classid 1:20 htb rate 5kbps ceil
> 10kbps prio 0 tc class add dev eth1 parent 1:1 classid 1:30 htb rate 8kbps
> ceil 11kbps prio 2 tc class add dev eth1 parent 1:1 classid 1:40 htb rate
> 23kbps ceil 40kbps prio 1 tc class add dev eth1 parent 1:1 classid 1:80 htb
> rate 8kbps ceil 10kbps prio 4

Well, it's just a wild guess, but do you really have a 64 k-byte/second leased 
line or could it be a 64 k-bit/second line? If it's the latter you should 
try:

tc class add dev eth1 parent 1: classid 1:1 htb rate 64kbit ceil 64kbit

and see if that works out.

I'd also highly recommend reading

http://www.docum.org/docum.org/faq/cache/74.html

rgds,

Arno
___
LARTC mailing list / [EMAIL PROTECTED]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/


Re: [LARTC] htb and fw problems

2004-08-04 Thread Ing Isianto Istiadi
Dear, I have change 
tc class add dev eth1 parent 1: classid 1:1 htb rate 65kbps ceil 65kbps
to
tc class add dev eth1 parent 1: classid 1:1 htb rate 60kbps ceil 60kbps
still with the same result
any other tips?

On Wed, 4 Aug 2004 13:41:34 +0200
<[EMAIL PROTECTED]> wrote:

> 
> - Original Message - 
> From: <[EMAIL PROTECTED]>
> To: "Ing Isianto Istiadi" <[EMAIL PROTECTED]>
> Sent: Wednesday, August 04, 2004 1:40 PM
> Subject: Re: [LARTC] htb and fw problems
> 
> 
> > hi!
> > your default class must not have rate grater than your desired speed rate.
> > If you have 64kbps your class shoud have 60kbps or less. Without this htb
> > will not work as you except!
> > tc class add dev eth1 parent 1: classid 1:1 htb rate 65kbps ceil 65kbps
> > - Original Message - 
> > From: "Ing Isianto Istiadi" <[EMAIL PROTECTED]>
> > To: <[EMAIL PROTECTED]>
> > Sent: Wednesday, August 04, 2004 11:00 AM
> > Subject: [LARTC] htb and fw problems
> >
> >
> > > Dear All,
> > > I'm using the kernel 2.6.6, iproute2-2.4.7.20020116, iptables v1.2.9,
> and
> > gentoo.
> > > I have a leased-line 64 kbps.
> > > I can see the counter works in iptables, but in the htb, it doesn't go
> to
> > the right class (it always go to the default class).
> > >
> > > Any help will be appreciated
> > >
> > >
> > > here's my htb conf
> > > #!/bin/bash
> > >
> > > tc qdisc del dev eth1 root
> > >
> > > tc qdisc add dev eth1 root handle 1: htb default 80
> > > tc class add dev eth1 parent 1: classid 1:1 htb rate 65kbps ceil 65kbps
> > > tc class add dev eth1 parent 1:1 classid 1:10 htb rate 20kbps ceil
> 35kbps
> > prio 3
> > > tc class add dev eth1 parent 1:1 classid 1:20 htb rate 5kbps ceil 10kbps
> > prio 0
> > > tc class add dev eth1 parent 1:1 classid 1:30 htb rate 8kbps ceil 11kbps
> > prio 2
> > > tc class add dev eth1 parent 1:1 classid 1:40 htb rate 23kbps ceil
> 40kbps
> > prio 1
> > > tc class add dev eth1 parent 1:1 classid 1:80 htb rate 8kbps ceil 10kbps
> > prio 4
> > >
> > > tc qdisc add dev eth1 parent 1:10 handle 10: sfq perturb 10
> > > tc qdisc add dev eth1 parent 1:20 handle 20: sfq perturb 10
> > > tc qdisc add dev eth1 parent 1:30 handle 30: sfq perturb 10
> > > tc qdisc add dev eth1 parent 1:40 handle 40: sfq perturb 10
> > > tc qdisc add dev eth1 parent 1:80 handle 80: sfq perturb 10
> > >
> > > tc filter add dev eth1 parent 1:0 protocol ip  handle 10 fw flowid 1:10
> > > tc filter add dev eth1 parent 1:0 protocol ip  handle 20 fw flowid 1:20
> > > tc filter add dev eth1 protocol ip parent 1:0  handle 30 fw flowid 1:30
> > > tc filter add dev eth1 parent 1:0 protocol ip handle  40 fw classid 1:40
> > > tc filter add dev eth1 protocol ip parent 1:0  handle 80 fw flowid 1:80
> > >
> > > Here's my iptables rules*mangle
> > > :PREROUTING ACCEPT [1061:863210]
> > > :INPUT ACCEPT [1022:857788]
> > > :FORWARD ACCEPT [0:0]
> > > :OUTPUT ACCEPT [947:201743]
> > > :POSTROUTING ACCEPT [947:201743]
> > > -N personal
> > > -N others
> > > -N personal1
> > > #-A OUTPUT -p tcp -m tcp --sport 3128 -j MARK --set-mark 0x2
> > > -A OUTPUT -p tcp -m tcp --sport 3128 --destination 192.168.1.145 -j
> > personal
> > > #-A OUTPUT -p tcp -m tcp --dport 80 -j MARK --set-mark 20
> > > -A OUTPUT -p tcp -m tcp --dport 80 -j others
> > > -A personal -j MARK --set-mark 40
> > > -A others -j MARK --set-mark 20
> > >
> > >
> > > Here's my iptables -L -v -t mangle -x output
> > > Chain PREROUTING (policy ACCEPT 580535 packets, 176796832 bytes)
> > > pkts  bytes target prot opt in out source
> > destination
> > >
> > > Chain INPUT (policy ACCEPT 573475 packets, 174919251 bytes)
> > > pkts  bytes target prot opt in out source
> > destination
> > >
> > > Chain FORWARD (policy ACCEPT 5656 packets, 1810367 bytes)
> > > pkts  bytes target prot opt in out source
> > destination
> > >
> > > Chain OUTPUT (policy ACCEPT 598621 packets, 392036436 bytes)
> > > pkts  bytes target prot opt in out source
> > destination
> > >11105 14785525 personal   tcp  --  anyany anywhere
> > 192.168.1.145   tcp spt:webcache
> > >28465  2233910 others t

Re: [LARTC] htb and fw problems

2004-08-04 Thread mjoachimiak

- Original Message - 
From: <[EMAIL PROTECTED]>
To: "Ing Isianto Istiadi" <[EMAIL PROTECTED]>
Sent: Wednesday, August 04, 2004 1:40 PM
Subject: Re: [LARTC] htb and fw problems


> hi!
> your default class must not have rate grater than your desired speed rate.
> If you have 64kbps your class shoud have 60kbps or less. Without this htb
> will not work as you except!
> tc class add dev eth1 parent 1: classid 1:1 htb rate 65kbps ceil 65kbps
> - Original Message - 
> From: "Ing Isianto Istiadi" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Wednesday, August 04, 2004 11:00 AM
> Subject: [LARTC] htb and fw problems
>
>
> > Dear All,
> > I'm using the kernel 2.6.6, iproute2-2.4.7.20020116, iptables v1.2.9,
and
> gentoo.
> > I have a leased-line 64 kbps.
> > I can see the counter works in iptables, but in the htb, it doesn't go
to
> the right class (it always go to the default class).
> >
> > Any help will be appreciated
> >
> >
> > here's my htb conf
> > #!/bin/bash
> >
> > tc qdisc del dev eth1 root
> >
> > tc qdisc add dev eth1 root handle 1: htb default 80
> > tc class add dev eth1 parent 1: classid 1:1 htb rate 65kbps ceil 65kbps
> > tc class add dev eth1 parent 1:1 classid 1:10 htb rate 20kbps ceil
35kbps
> prio 3
> > tc class add dev eth1 parent 1:1 classid 1:20 htb rate 5kbps ceil 10kbps
> prio 0
> > tc class add dev eth1 parent 1:1 classid 1:30 htb rate 8kbps ceil 11kbps
> prio 2
> > tc class add dev eth1 parent 1:1 classid 1:40 htb rate 23kbps ceil
40kbps
> prio 1
> > tc class add dev eth1 parent 1:1 classid 1:80 htb rate 8kbps ceil 10kbps
> prio 4
> >
> > tc qdisc add dev eth1 parent 1:10 handle 10: sfq perturb 10
> > tc qdisc add dev eth1 parent 1:20 handle 20: sfq perturb 10
> > tc qdisc add dev eth1 parent 1:30 handle 30: sfq perturb 10
> > tc qdisc add dev eth1 parent 1:40 handle 40: sfq perturb 10
> > tc qdisc add dev eth1 parent 1:80 handle 80: sfq perturb 10
> >
> > tc filter add dev eth1 parent 1:0 protocol ip  handle 10 fw flowid 1:10
> > tc filter add dev eth1 parent 1:0 protocol ip  handle 20 fw flowid 1:20
> > tc filter add dev eth1 protocol ip parent 1:0  handle 30 fw flowid 1:30
> > tc filter add dev eth1 parent 1:0 protocol ip handle  40 fw classid 1:40
> > tc filter add dev eth1 protocol ip parent 1:0  handle 80 fw flowid 1:80
> >
> > Here's my iptables rules*mangle
> > :PREROUTING ACCEPT [1061:863210]
> > :INPUT ACCEPT [1022:857788]
> > :FORWARD ACCEPT [0:0]
> > :OUTPUT ACCEPT [947:201743]
> > :POSTROUTING ACCEPT [947:201743]
> > -N personal
> > -N others
> > -N personal1
> > #-A OUTPUT -p tcp -m tcp --sport 3128 -j MARK --set-mark 0x2
> > -A OUTPUT -p tcp -m tcp --sport 3128 --destination 192.168.1.145 -j
> personal
> > #-A OUTPUT -p tcp -m tcp --dport 80 -j MARK --set-mark 20
> > -A OUTPUT -p tcp -m tcp --dport 80 -j others
> > -A personal -j MARK --set-mark 40
> > -A others -j MARK --set-mark 20
> >
> >
> > Here's my iptables -L -v -t mangle -x output
> > Chain PREROUTING (policy ACCEPT 580535 packets, 176796832 bytes)
> > pkts  bytes target prot opt in out source
> destination
> >
> > Chain INPUT (policy ACCEPT 573475 packets, 174919251 bytes)
> > pkts  bytes target prot opt in out source
> destination
> >
> > Chain FORWARD (policy ACCEPT 5656 packets, 1810367 bytes)
> > pkts  bytes target prot opt in out source
> destination
> >
> > Chain OUTPUT (policy ACCEPT 598621 packets, 392036436 bytes)
> > pkts  bytes target prot opt in out source
> destination
> >11105 14785525 personal   tcp  --  anyany anywhere
> 192.168.1.145   tcp spt:webcache
> >28465  2233910 others tcp  --  anyany anywhere
> anywheretcp dpt:www
> >
> > Chain POSTROUTING (policy ACCEPT 604295 packets, 393851150 bytes)
> > pkts  bytes target prot opt in out source
> destination
> >
> > Chain others (1 references)
> > pkts  bytes target prot opt in out source
> destination
> >28465  2233910 MARK   all  --  anyany anywhere
> anywhereMARK set 0x14
> >
> > Chain personal (1 references)
> > pkts  bytes target prot opt in out source
> destination
> >11105 14785525 MARK   all  --  anyany anywhere
> anywhereMARK set 0x28
> >
> > Chain personal1 (0 refer

Re: [LARTC] HTB classifying

2004-07-25 Thread mjoachimiak
Martin Brown has right but his answer is not full.
I see at least one error in your script.
I see you arew shaping on wlan0. You must know that you can only shape
outgoing traffic so if your node is downloading by ftp i'ts ok, but if the
node start to upload shaping on wlan0 won't work. In that case you must
shape on eth0.
And second thing:
Because you shape towards 192.168.2.224 you can not write ...ip src
192.168.2.224/32.
You must write ...ip dst 192.168.2.224.
>/sbin/tc filter add dev wlan0 parent 1:0 protocol ip prio 100 u32 \
>   match ip src 192.168.2.224/32 \
>  match ip sport 80 0x classid 1:11
Take some more reading :)
Good luck.
- Original Message - 
From: "Mpourtounis Dimitris" <[EMAIL PROTECTED]>
To: "lartc" <[EMAIL PROTECTED]>
Sent: Saturday, July 24, 2004 11:39 PM
Subject: Re: [LARTC] HTB classifying


> Ok then...
>
> BOX with 2 ifaces
> eth0 : 192.168.1.3/24 , NAT 192.168.2.0/24
> wlan0:192.168.2.3/24 ,
>
> gw 192.168.1.1(it is an adsl mode in fact)
>
> All i want to do is make sure that
> a)node 192.168.2.224 doesnt get more than 50 bits/sec
> b)its ssh,sftp (port 22) traffic is limited at 30 bits/sec
>
> and
> c)add more shaped nodes in my script.
>
> When i start downloading from node, its http taffic for examle is really
> shaped
> at 50.
> When i start downloading via sftp (port 22), its sftp traffic is really
> shaped
> at 30.
> But, if when there is an http as well as an sftp session at the same time,
> total bandwidth
> is at 80.
>
> Thanks in advance (and sorry for being so short, i will get used to
> explaining my problems
> briefly...)
>
>
> #My.notworking.script
> /sbin/tc qdisc add  dev wlan0 root handle 1:0 htb r2q 100
> /sbin/tc class add dev wlan0 parent 1: classid 1:10 htb rate 50
>
> /sbin/tc class add dev wlan0 parent 1:10 classid 1:11 htb rate 30
> /sbin/tc filter add dev wlan0 parent 1:0 protocol ip prio 100 u32 \
> match ip src 192.168.2.224/32 \
> match ip sport 80 0x classid 1:11
>
> /sbin/tc class add dev wlan0 parent 1:10 classid 1:12 htb rate 50
>  /sbin/tc filter add dev wlan0 parent 1:0 protocol ip prio 100 u32 match \
>  ip src 192.168.2.224/32 classid 1:12
>
>
>
> ----- Original Message - 
> From: <[EMAIL PROTECTED]>
> To: "lartc" <[EMAIL PROTECTED]>; "Mpourtounis Dimitris" <[EMAIL PROTECTED]>
> Sent: Friday, January 24, 2003 2:13 AM
> Subject: Re: [LARTC] HTB classifying
>
>
> > OK what's the address of eth0?  Is the BOX with NAT ?
> > I think you could send a bit of your true script and describe a bit of
> your
> > network especially the part when this situation is happeniing . If you
> > really afraid of smth like hack attack change IP adressess.
> >
> > > Although i have done so ,you are right. I should have included this
too
> in
> > > my (e-mail) configuration...
> > > BTW,Any idea of the situation
> > >
> > > - Original Message - 
> > > From: <[EMAIL PROTECTED]>
> > > To: "lartc" <[EMAIL PROTECTED]>; "Mpourtounis Dimitris"
> <[EMAIL PROTECTED]>
> > > Sent: Friday, January 24, 2003 1:21 AM
> > > Subject: Re: [LARTC] HTB classifying
> > >
> > >
> > > > Maybe it's my oversight but shoudn't you have "tc qdisc add  dev
eth0
> > root
> > > > handle 1:0 htb"  before rest of your instructions ??
> > > >
> > > > > I am trying to shape a client (somewhat advanced).
> > > > >
> > > > > This is my target:
> > > > > Client is 192.168.2.224. I would like to allow him to download
with
> > > > > 50 bits/sec in general. But, for a specific port(say 22), i
> would
> > > > > like him to download with 30 bit/sec only. The problem is that
> my
> > > > > configuration (maybe wrong) allows him to download with 80
> > bit/sec.
> > > > > (50 generally + 30 on port 22)
> > > > > I thought that having classes 1:11 and 1:12 being children of a
> class
> > > > > with rate 50, 50 would be the maximum...
> > > > > Can htb to this? Can another queue do this?
> > > > >
> > > > > /sbin/tc class add dev eth0 parent 1: classid 1:10 htb rate 50
> > > > >
> > > > > /sbin/tc class add dev eth0 parent 1:10 classid 1:11 htb rate
30
> > > > > /sbin/tc filter add dev eth0 pare

Re: [LARTC] HTB classifying

2004-07-24 Thread Martin A. Brown
Hello Mpourtounis,

 : When i start downloading from node, its http taffic for examle is
 : really shaped at 50. When i start downloading via sftp (port 22),
 : its sftp traffic is really shaped at 30. But, if when there is an
 : http as well as an sftp session at the same time, total bandwidth is at
 : 80.

You are missing one key piece in your understanding of HTB and that is the
difference between using "rate" and using "ceil".

 : /sbin/tc qdisc add  dev wlan0 root handle 1:0 htb r2q 100
 : /sbin/tc class add dev wlan0 parent 1: classid 1:10 htb rate 50
 :
 : /sbin/tc class add dev wlan0 parent 1:10 classid 1:11 htb rate 30
 : /sbin/tc filter add dev wlan0 parent 1:0 protocol ip prio 100 u32 \
 : match ip src 192.168.2.224/32 \
 : match ip sport 80 0x classid 1:11
 :
 : /sbin/tc class add dev wlan0 parent 1:10 classid 1:12 htb rate 50
 :  /sbin/tc filter add dev wlan0 parent 1:0 protocol ip prio 100 u32 match \
 :  ip src 192.168.2.224/32 classid 1:12

You have a class structure which looks roughly like this:


  class 1:10, rate 50 [ ceil 50 ]
   |
   +-class 1:11, rate 30 [ ceil 30 ] (rate M)
\
 class 1:12, rate 50 [ ceil 50 ] (rate L)

Because you have specified a rate in each leaf class (1:11 and 1:12), your
two leaf classes are getting the guaranteed 'rate'.  You have guaranteed
rate M, 30 (units???) (seems to be 37500bps with my tc) to your class
1:11.  You have guaranteed rate L to your class 1:12.  HTB will dequeue
packets entering this class until rate without examining any other parent
class.  Because each class is getting its guaranteed rate, HTB is
effectively transmitting (dequeuing) packets at 80 (30 + 50).

I believe you wish to do the following.  Note that I have used the same
ratios, but have eliminated some zeroes and changed the units, but simply
for readability.

  class 1:10, rate 500 kbps, ceil 500 kbps
   |
   +-class 1:11, rate 100 kbps, ceil 300 kbps
\
 class 1:12, rate 400 kbps, ceil 500 kbps

Thes means that classes 1:11 and 1:12 can transmit up to rates 100 kbps
and 400 kbps respectively before HTB starts to calculate borrowing.  For
more on the borrowing model, see [0], [1] and [2].  The rule you are
unwittingly violating is this rule [3].

In short, since HTB will not check any rates or perform any shaping or
borrowing until rate is met (exceeded), you must make sure that the sum of
the rates of your leaf classes does not exceed the parent classes.

As a final note, if you wish to limit your total outgoing bandwidth to
only 50 and let HTB help a bit with the borrowing, I would recommend
the following model:

  class 1:10, rate 50, ceil 50
   |
   +-class 1:11, rate 10, ceil 30
\
 class 1:12, rate 20, ceil 50

Best of luck,

-Martin

  [0] http://luxik.cdi.cz/~devik/qos/htb/manual/userg.htm#hsharing
  [1] http://tldp.org/HOWTO/Traffic-Control-HOWTO/classful-qdiscs.html#qc-htb-borrowing
  [2] http://opalsoft.net/qos/DS-28.htm
  [3] http://www.docum.org/docum.org/faq/cache/13.html

P.S. Just a reminder that with the command line "tc", kbps means kilobytes
 per second.  If you want to talk about kilobits per second, use kbit.

-- 
Martin A. Brown --- SecurePipe, Inc. --- [EMAIL PROTECTED]

___
LARTC mailing list / [EMAIL PROTECTED]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/


Re: [LARTC] HTB classifying

2004-07-24 Thread Mpourtounis Dimitris
Ok then...

BOX with 2 ifaces
eth0 : 192.168.1.3/24 , NAT 192.168.2.0/24
wlan0:192.168.2.3/24 ,

gw 192.168.1.1(it is an adsl mode in fact)

All i want to do is make sure that
a)node 192.168.2.224 doesnt get more than 50 bits/sec
b)its ssh,sftp (port 22) traffic is limited at 30 bits/sec

and
c)add more shaped nodes in my script.

When i start downloading from node, its http taffic for examle is really
shaped
at 50.
When i start downloading via sftp (port 22), its sftp traffic is really
shaped
at 30.
But, if when there is an http as well as an sftp session at the same time,
total bandwidth
is at 80.

Thanks in advance (and sorry for being so short, i will get used to
explaining my problems
briefly...)


#My.notworking.script
/sbin/tc qdisc add  dev wlan0 root handle 1:0 htb r2q 100
/sbin/tc class add dev wlan0 parent 1: classid 1:10 htb rate 50

/sbin/tc class add dev wlan0 parent 1:10 classid 1:11 htb rate 30
/sbin/tc filter add dev wlan0 parent 1:0 protocol ip prio 100 u32 \
match ip src 192.168.2.224/32 \
match ip sport 80 0x classid 1:11

/sbin/tc class add dev wlan0 parent 1:10 classid 1:12 htb rate 50
 /sbin/tc filter add dev wlan0 parent 1:0 protocol ip prio 100 u32 match \
 ip src 192.168.2.224/32 classid 1:12



- Original Message - 
From: <[EMAIL PROTECTED]>
To: "lartc" <[EMAIL PROTECTED]>; "Mpourtounis Dimitris" <[EMAIL PROTECTED]>
Sent: Friday, January 24, 2003 2:13 AM
Subject: Re: [LARTC] HTB classifying


> OK what's the address of eth0?  Is the BOX with NAT ?
> I think you could send a bit of your true script and describe a bit of
your
> network especially the part when this situation is happeniing . If you
> really afraid of smth like hack attack change IP adressess.
>
> > Although i have done so ,you are right. I should have included this too
in
> > my (e-mail) configuration...
> > BTW,Any idea of the situation
> >
> > - Original Message - 
> > From: <[EMAIL PROTECTED]>
> > To: "lartc" <[EMAIL PROTECTED]>; "Mpourtounis Dimitris"
<[EMAIL PROTECTED]>
> > Sent: Friday, January 24, 2003 1:21 AM
> > Subject: Re: [LARTC] HTB classifying
> >
> >
> > > Maybe it's my oversight but shoudn't you have "tc qdisc add  dev eth0
> root
> > > handle 1:0 htb"  before rest of your instructions ??
> > >
> > > > I am trying to shape a client (somewhat advanced).
> > > >
> > > > This is my target:
> > > > Client is 192.168.2.224. I would like to allow him to download with
> > > > 50 bits/sec in general. But, for a specific port(say 22), i
would
> > > > like him to download with 30 bit/sec only. The problem is that
my
> > > > configuration (maybe wrong) allows him to download with 80
> bit/sec.
> > > > (50 generally + 30 on port 22)
> > > > I thought that having classes 1:11 and 1:12 being children of a
class
> > > > with rate 50, 50 would be the maximum...
> > > > Can htb to this? Can another queue do this?
> > > >
> > > > /sbin/tc class add dev eth0 parent 1: classid 1:10 htb rate 50
> > > >
> > > > /sbin/tc class add dev eth0 parent 1:10 classid 1:11 htb rate 30
> > > > /sbin/tc filter add dev eth0 parent 1:0 protocol ip prio 100 u32
match
> > ip
> > > src 192.168.2.224/32 \
> > > > match ip sport 80 0x classid 1:11
> > > >
> > > > /sbin/tc class add dev eth0 parent 1:10 classid 1:12 htb rate 50
> > > > /sbin/tc filter add dev eth0 parent 1:0 protocol ip prio 100 u32
match
> > ip
> > > src 192.168.2.224/32 classid 1:12
> > > >
> > > >
> > > > ___
> > > > LARTC mailing list / [EMAIL PROTECTED]
> > > > http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO:
http://lartc.org/
> >
> >
>


___
LARTC mailing list / [EMAIL PROTECTED]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/


Re: [LARTC] HTB classifying

2004-07-24 Thread mjoachimiak
OK what's the address of eth0?  Is the BOX with NAT ?
I think you could send a bit of your true script and describe a bit of your
network especially the part when this situation is happeniing . If you
really afraid of smth like hack attack change IP adressess.

> Although i have done so ,you are right. I should have included this too in
> my (e-mail) configuration...
> BTW,Any idea of the situation
>
> - Original Message - 
> From: <[EMAIL PROTECTED]>
> To: "lartc" <[EMAIL PROTECTED]>; "Mpourtounis Dimitris" <[EMAIL PROTECTED]>
> Sent: Friday, January 24, 2003 1:21 AM
> Subject: Re: [LARTC] HTB classifying
>
>
> > Maybe it's my oversight but shoudn't you have "tc qdisc add  dev eth0
root
> > handle 1:0 htb"  before rest of your instructions ??
> >
> > > I am trying to shape a client (somewhat advanced).
> > >
> > > This is my target:
> > > Client is 192.168.2.224. I would like to allow him to download with
> > > 50 bits/sec in general. But, for a specific port(say 22), i would
> > > like him to download with 30 bit/sec only. The problem is that my
> > > configuration (maybe wrong) allows him to download with 80
bit/sec.
> > > (50 generally + 30 on port 22)
> > > I thought that having classes 1:11 and 1:12 being children of a class
> > > with rate 50, 50 would be the maximum...
> > > Can htb to this? Can another queue do this?
> > >
> > > /sbin/tc class add dev eth0 parent 1: classid 1:10 htb rate 50
> > >
> > > /sbin/tc class add dev eth0 parent 1:10 classid 1:11 htb rate 30
> > > /sbin/tc filter add dev eth0 parent 1:0 protocol ip prio 100 u32 match
> ip
> > src 192.168.2.224/32 \
> > > match ip sport 80 0x classid 1:11
> > >
> > > /sbin/tc class add dev eth0 parent 1:10 classid 1:12 htb rate 50
> > > /sbin/tc filter add dev eth0 parent 1:0 protocol ip prio 100 u32 match
> ip
> > src 192.168.2.224/32 classid 1:12
> > >
> > >
> > > ___
> > > LARTC mailing list / [EMAIL PROTECTED]
> > > http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
>
>

___
LARTC mailing list / [EMAIL PROTECTED]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/


Re: [LARTC] HTB classifying

2004-07-24 Thread mjoachimiak
Maybe it's my oversight but shoudn't you have "tc qdisc add  dev eth0 root
handle 1:0 htb"  before rest of your instructions ??

> I am trying to shape a client (somewhat advanced).
>
> This is my target:
> Client is 192.168.2.224. I would like to allow him to download with
> 50 bits/sec in general. But, for a specific port(say 22), i would
> like him to download with 30 bit/sec only. The problem is that my
> configuration (maybe wrong) allows him to download with 80 bit/sec.
> (50 generally + 30 on port 22)
> I thought that having classes 1:11 and 1:12 being children of a class
> with rate 50, 50 would be the maximum...
> Can htb to this? Can another queue do this?
>
> /sbin/tc class add dev eth0 parent 1: classid 1:10 htb rate 50
>
> /sbin/tc class add dev eth0 parent 1:10 classid 1:11 htb rate 30
> /sbin/tc filter add dev eth0 parent 1:0 protocol ip prio 100 u32 match ip
src 192.168.2.224/32 \
> match ip sport 80 0x classid 1:11
>
> /sbin/tc class add dev eth0 parent 1:10 classid 1:12 htb rate 50
> /sbin/tc filter add dev eth0 parent 1:0 protocol ip prio 100 u32 match ip
src 192.168.2.224/32 classid 1:12
>
>
> ___
> LARTC mailing list / [EMAIL PROTECTED]
> http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/

___
LARTC mailing list / [EMAIL PROTECTED]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/


Re: [LARTC] HTB & tc

2004-07-22 Thread mjoachimiak
Check if you have HTB support in your kernel.
it must be in kernel/net/sched
- Original Message - 
From: "Antonin Karasek" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, July 22, 2004 6:58 PM
Subject: [LARTC] HTB & tc


> Hi,
> I'm trying to make run a simple shaping *through HTB*. I have compiled a
> new kernel 2.4.21.
>
> First command from
> http://luxik.cdi.cz/~devik/qos/htb/manual/userg.htm
> said:
> # tc qdisc add dev eth0 root handle 1: htb default 12
> RTNETLINK answers: Invalid argument
>
> I tryed both standard tc from Debian stable and
> http://luxik.cdi.cz/~devik/qos/htb/v2/tc.gz
> this one...
>
> I tryed htb.init-v0.8.5 from SourceForge with htb-lartc.tar.gz
> configuration from the same site. The script doesn't report any error, but
:
> skatach:~/bin# ./htb.init-v0.8.5 start
> skatach:~/bin# tc filter show dev eth0
> skatach:~/bin# tc class show dev eth0
> skatach:~/bin# tc qdisc show
>
> As I guess, it means, that there isn't any class. It isn't, what I want :(
>
> Any ideas, where the problem can be?
>
> Many thanks.
> ___
> LARTC mailing list / [EMAIL PROTECTED]
> http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/

___
LARTC mailing list / [EMAIL PROTECTED]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/


Re: [LARTC] HTB & tc

2004-07-22 Thread George Alexandru Dragoi
OT: Dudes, why i have to reedit To field and delete CC field, gmail
see this as spam

Now, make sure you compiled the kernel with htb, latest stable kernel
is 2.4.26 or 2.6.7


On Thu, 22 Jul 2004 19:58:40 +0200, Antonin Karasek
<[EMAIL PROTECTED]> wrote:
> Hi,
> I'm trying to make run a simple shaping *through HTB*. I have compiled a
> new kernel 2.4.21.
> 
> First command from
> http://luxik.cdi.cz/~devik/qos/htb/manual/userg.htm
> said:
> # tc qdisc add dev eth0 root handle 1: htb default 12
> RTNETLINK answers: Invalid argument
> 
> I tryed both standard tc from Debian stable and
> http://luxik.cdi.cz/~devik/qos/htb/v2/tc.gz
> this one...
> 
> I tryed htb.init-v0.8.5 from SourceForge with htb-lartc.tar.gz
> configuration from the same site. The script doesn't report any error, but :
> skatach:~/bin# ./htb.init-v0.8.5 start
> skatach:~/bin# tc filter show dev eth0
> skatach:~/bin# tc class show dev eth0
> skatach:~/bin# tc qdisc show
> 
> As I guess, it means, that there isn't any class. It isn't, what I want :(
> 
> Any ideas, where the problem can be?
> 
> Many thanks.
> ___
> LARTC mailing list / [EMAIL PROTECTED]
> http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
>
___
LARTC mailing list / [EMAIL PROTECTED]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/


Re: [LARTC] : HTB - Really Big problem

2004-07-21 Thread mjoachimiak
I've found that i have messagess like this in /var/log/messages:

Jul 20 20:11:26 (none) last message repeated 9 times
Jul 20 20:11:30 (none) kernel: NET: 173 messages suppressed.
Jul 20 20:11:30 (none) kernel: dst cache overflow
Jul 20 20:12:59 (none) kernel: NET: 14 messages suppressed.


- Original Message - 
From: <[EMAIL PROTECTED]>
To: "lartc" <[EMAIL PROTECTED]>
Sent: Tuesday, July 20, 2004 6:28 PM
Subject: Re: [LARTC] Fw: HTB - Really Big problem


> Here are the stats. If you want full stats please write then i'll send as
> attachment but it is 0,5MB.
> tc qdisc show
> qdisc sfq 3: dev eth0 quantum 1514b perturb 10sec
> qdisc sfq 138: dev eth0 quantum 1514b perturb 10sec
> qdisc sfq 53: dev eth0 quantum 1514b perturb 10sec
> qdisc sfq 54: dev eth0 quantum 1514b perturb 10sec
> qdisc sfq 140: dev eth0 quantum 1514b perturb 10sec
> qdisc sfq 137: dev eth0 quantum 1514b perturb 10sec
> ..
> qdisc sfq 11: dev eth0 quantum 1514b perturb 10sec
> qdisc sfq 10: dev eth0 quantum 1514b perturb 10sec
> qdisc sfq 9: dev eth0 quantum 1514b perturb 10sec
> qdisc htb 2: dev eth0 r2q 1 default 4 direct_packets_stat 0
> qdisc sfq 3: dev eth1 quantum 1514b perturb 10sec
> qdisc sfq 138: dev eth1 quantum 1514b perturb 10sec
> .
> qdisc sfq 10: dev eth1 quantum 1514b perturb 10sec
> qdisc sfq 9: dev eth1 quantum 1514b perturb 10sec
> qdisc htb 1: dev eth1 r2q 1 default 2 direct_packets_stat 2
> EOF
>
> tc filter show dev eth1:
>
> filter parent 1: protocol ip pref 49151 u32
> filter parent 1: protocol ip pref 49151 u32 fh 831: ht divisor 1
> filter parent 1: protocol ip pref 49151 u32 fh 831::800 order 2048 key ht
> 831 bkt 0 flowid 1:3
>   match c0a80502/ at 16
> filter parent 1: protocol ip pref 49151 u32 fh 830: ht divisor 1
> filter parent 1: protocol ip pref 49151 u32 fh 830::800 order 2048 key ht
> 830 bkt 0 flowid 1:138
>   match 3e57c18a/ at 16
> filter parent 1: protocol ip pref 49151 u32 fh 82f: ht divisor 1
> filter parent 1: protocol ip pref 49151 u32 fh 82f::800 order 2048 key ht
> 82f bkt 0 flowid 1:53
>   match c0a80235/ at 16
> filter parent 1: protocol ip pref 49151 u32 fh 82e: ht divisor 1
> filter parent 1: protocol ip pref 49151 u32 fh 82e::800 order 2048 key
> . #many lines
> filter parent 1: protocol ip pref 49152 u32 fh 802: ht divisor 1
> filter parent 1: protocol ip pref 49152 u32 fh 802::800 order 2048 key ht
> 802 bkt 0 flowid 1:11
>   match c0a8010b/ at 16
> filter parent 1: protocol ip pref 49152 u32 fh 801: ht divisor 1
> filter parent 1: protocol ip pref 49152 u32 fh 801::800 order 2048 key ht
> 801 bkt 0 flowid 1:10
>   match c0a8010a/ at 16
> filter parent 1: protocol ip pref 49152 u32 fh 800: ht divisor 1
> filter parent 1: protocol ip pref 49152 u32 fh 800::800 order 2048 key ht
> 800 bkt 0 flowid 1:9
>   match c0a80109/ at 16
>
> tc filter show dev eth0:
>
> tc filter show dev eth0
> filter parent 2: protocol ip pref 1 fw
> filter parent 2: protocol ip pref 1 fw handle 0x3 classid 2:3
> filter parent 2: protocol ip pref 1 fw handle 0x8 classid 2:8
> filter parent 2: protocol ip pref 1 fw handle 0x9 classid 2:9
> filter parent 2: protocol ip pref 1 fw handle 0xa classid 2:10
> filter parent 2: protocol ip pref 1 fw handle 0xb classid 2:11
> filter parent 2: protocol ip pref 1 fw handle 0xc classid 2:12
> filter parent 2: protocol ip pref 1 fw handle 0xf classid 2:15
> filter parent 2: protocol ip pref 1 fw handle 0x11 classid 2:17
> ...#many lines
> filter parent 2: protocol ip pref 1 fw handle 0x97 classid 2:151
> filter parent 2: protocol ip pref 1 fw handle 0x98 classid 2:152
> filter parent 2: protocol ip pref 1 fw handle 0xbd classid 2:189
>
>
> tc class show dev eth1:
> class htb 1:11 parent 1:1 leaf 11: prio 0 rate 17Kbit ceil 250Kbit burst
> 1620b cburst 1919b
> class htb 1:22 parent 1:1 leaf 22: prio 0 rate 17Kbit ceil 250Kbit burst
> 1620b
> ...
> class htb 1:189 parent 1:1 leaf 189: prio 0 rate 17Kbit ceil 128Kbit burst
> 1620b cburst 1762b
> class htb 1:1 root rate 900Kbit ceil 900Kbit burst 2751b cburst 2751b
> class htb 1:10 parent 1:1 leaf 10: prio 0 rate 17Kbit ceil 250Kbit burst
> 1620b cburst 1919b
> class htb 1:23 parent 1:1 leaf 23: prio 0 rate 17Kbit ceil 250Kbit burst
> 1620b cburst 1919b
> class htb 1:32 parent 1:1 leaf 32: prio 0 rate 17Kbit ceil 250Kbit burst
> 1620b cburst 1919b
> class htb 1:54 parent 1:1 leaf 54: prio 0 rate 17Kbit ceil 64Kbit burst
> 1620b cburst 1680b
> class htb 1:2 parent 1:1 prio 0 rate 10Kbit ceil 10Kbit burst 1611b cburst
> 1611b
> class htb 1:20 parent 1:1 leaf 20: prio 0 rate 17Kbit ceil 250Kbit burst
> 1620b cburst 1919b
> class htb 1:64 parent 1:1 leaf 64: prio 0 rate 17Kbit ceil 250Kbit burst
> 1620b
> 
> class htb 1:59 parent 1:1 leaf 59: prio 0 rate 17Kbit ceil 250Kbit burst
> 1620b cburst 1919b
> class htb 1:58 parent 1:1 leaf 58: prio 0 rate 17Kbit ceil 250Kbit burst
> 1620b cburst 1919b
>
>
> tc class show dev eth0:
> class htb 2:11 parent 2:1 leaf 11

Re: [LARTC] HTB & Bdw Guarantee

2004-07-10 Thread Dmitry Golubev
Shouldn't you assign priorities to your classes? Also make RED a leaf queue 
for more more smooth TCP experience

Dmitry

On Saturday 10 July 2004 01:48, toto toto <[EMAIL PROTECTED]> wrote:
> Hello,
>
> I have problems setting up HTB.
> This is my setup :
>
> NET 1024/256 ADSL
>
> eth1
> Linux Firewall
> eth0
>
> LAN 10.a.a.a
>
> I want to GUARANTEE for an IP (10.x.y.z) a 800kbit
> bandwidth for HTTP download.
> But When 10.x.y.z does no HTTP download, other trafic
> must get the whole bandwidth, of course.
>
> The script I use (see below) is quite the same as
> presented at (the grat page) :
> http://luxik.cdi.cz/~devik/qos/htb/manual/userg.htm,
> the only difference is that I use only 2 classes (HTTP
> trafic vs other)
>
> BUT ( :-(( )
> When I
> [EMAIL PROTECTED] wget ftp.fr.debian.org/debian/ls-lR
> (...)
> 21% [==>  ] 4,984,704106.39K/s
> [EMAIL PROTECTED]
>
> It goes at ~110 Ko, as expected when no other trafic
> is generated.
> But if I
> [EMAIL PROTECTED] wget ftp://ftp.fr.debian.org/debian/ls-lR
>
> after the beginning of the HTTP download, the latter
> goes dooown, and if I run a second wget ftp://...,
> the HTTP download goes UNDER (really under) the 800
> kbits...??!!
> It seems like there's no difference whether the
> shaping is done or not.
>
> Trafic seems to be classified (tc -s -d class show dev
> eth0 / eth1), but...
>
> Actually my goal is more complicated than HTTP
> downloads (I need to guarantee bandwidth for
> H323 -> Netmeeting & co, so both down&up-loads), but
> I'm just testing for now, and if I can't shape such a
> simple trafic as HTTP download...
>
> Could anyone tell me what I did wrong, or didn't
> understand...
> Is this only because one can't shape incoming trafic ?
>
> Could Ingress solve my pb ? I don't think so, as
> Ingress seems to limit the WHOLE bandwidth...
> Is it a "prio" question ?
>
> Thanks for your help
>
> PSes :
> - has anyone experienced H323 trafic shaping ?? if so,
> scripts are welcome !!!
> - If CBQ can do better, then I'll turn to CBQ, but
> it's just like chinese for me...
> HTB is more simple
>
>
>
> Here's the script :
> #!/bin/bash
>
> OUT=eth1
> IN=eth0
>
> IP=10.x.y.z
>
> BDW_IN=1024kbit
> BDW_OUT=256kbit
>
> BDW_WEB_IN=800kbit
> BDW_OTHER_IN=224kbit
> BDW_WEB_OUT=176kbit
> BDW_OTHER_OUT=80kbit
>
> #---#
>
> function start_out () {
>
> tc qdisc add dev $OUT root handle 1: htb default 11
>
> tc class add dev $OUT parent 1: classid 1:1 htb rate
> $BDW_OUT ceil $BDW_OUT
> tc class add dev $OUT parent 1:1 classid 1:10 htb rate
> $BDW_WEB_OUT ceil $BDW_OUT
> tc class add dev $OUT parent 1:1 classid 1:11 htb rate
> $BDW_OTHER_OUT ceil $BDW_OUT
>
> tc qdisc add dev $OUT parent 1:10 handle 20: pfifo
> limit 5
> tc qdisc add dev $OUT parent 1:11 handle 40: sfq
> perturb 10
>
> tc filter add dev $OUT protocol ip parent 1:0 prio 1
> u32 \
> match ip src $IP match ip dport 80 0x
> flowid 1:10
> }
>
> function start_in () {
>
> tc qdisc add dev $IN root handle 1: htb default 11
>
> tc class add dev $IN parent 1: classid 1:1 htb rate
> $BDW_IN ceil $BDW_IN
> tc class add dev $IN parent 1:1 classid 1:10 htb rate
> $BDW_WEB_IN ceil $BDW_IN
> tc class add dev $IN parent 1:1 classid 1:11 htb rate
> $BDW_OTHER_IN ceil $BDW_IN
>
> tc qdisc add dev $IN parent 1:10 handle 20: pfifo
> limit 5
> tc qdisc add dev $IN parent 1:11 handle 40: sfq
> perturb 10
>
> tc filter add dev $IN protocol ip parent 1:0 prio 1
> u32 \
> match ip dst $IP match ip sport 80 0x
> flowid 1:10
> }
>
> #---#
>
> function stop_out () {
>
> tc filter del dev $OUT protocol ip parent 1:0 prio 1
> u32
>
> tc class del dev $OUT parent 1:1 classid 1:11
> tc class del dev $OUT parent 1:1 classid 1:10
>
> tc class del dev $OUT parent 1: classid 1:1
> tc qdisc del dev $OUT root handle 1: htb
> }
>
> function stop_in() {
>
> tc filter del dev $IN protocol ip parent 1:0 prio 1
> u32
>
> tc class del dev $IN parent 1:1 classid 1:11
> tc class del dev $IN parent 1:1 classid 1:10
>
> tc class del dev $IN parent 1: classid 1:1
> tc qdisc del dev $IN root handle 1: htb
> }
>
> case $1 in
> start)
> echo
> start_out
> start_in
> echo
> ;;
> stop)
> echo
> stop_out
> stop_in
> echo
> ;;
> *)
> echo "Usage : $0 {start|stop|restart}"
> ;;
> esac
>
>
>
>
>
>
>
>
> Créez gratuitement votre Yahoo! Mail avec 100 Mo de stockage !
> Créez votre Yahoo! Mail sur http://fr.benefits.yahoo.com/
>
> Dialoguez en direct avec vos amis grâce à Yahoo! Messenger !Téléchargez
> Yahoo! Messenger sur http://fr.messenger.yahoo.com
> ___
> LARTC mailing list / [EMAIL PROTECTED]
> http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
___
LARTC mailing list / [EMAIL PROTECTED]
http://mailma

Re: [LARTC] HTB & BDW Guarantee

2004-07-09 Thread Rio Martin
On Saturday 10 July 2004 05:54, toto toto wrote:
> Hello,
> I have problems setting up HTB.
> This is my setup :
> NET
> 1024/256 ADSL
> eth1
> Linux Firewall
> eth0
> LAN 10.a.a.a
> I want to GUARANTEE for an IP (10.x.y.z) a 800kbit
> bandwidth for HTTP download.
> But When 10.x.y.z does no HTTP download, other trafic
> must get the whole bandwidth, of course.
> The script I use (see below) is quite the same as
> presented at (the grat page) :
> http://luxik.cdi.cz/~devik/qos/htb/manual/userg.htm,
> the only difference is that I use only 2 classes (HTTP
> trafic vs other)
> BUT :-((
> When I
> [EMAIL PROTECTED] wget ftp.fr.debian.org/debian/ls-lR
> (...)
> 21% [==>] 4,984,704106.39K/s
> [EMAIL PROTECTED]
> It goes at ~100 Ko, as expected when no other trafic
> is generated.
> But if I
> [EMAIL PROTECTED] wget ftp://ftp.fr.debian.org/debian/ls-lR

I completely disagree with the way you performed the test.
Debian.Org is not on your local network isnt it ?? How far from your host 
until it reach Debian.Org as destination host ? Are you sure your ISP or 
Debian.Org ISP or perhaps Debian.Org itself doesnt perform traffic per 
session management, or any QoS ?
My suggestion is to test the performance of your HTB using your own local 
network. Because you know completely your network condition and you can 
analyze it perfectly.

Regards,
Rio Martin.
___
LARTC mailing list / [EMAIL PROTECTED]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/


Re: [LARTC] HTB Packet Scheduling for Linux 2.4.14 kernel

2004-07-08 Thread Martin Devera
yes but I'm not sure if RB three lib is in 2.4.14

On Wed, 7 Jul 2004 [EMAIL PROTECTED] wrote:

> Hi All,
>
> Can I backport 2.4.20 kernel version's HTB related changes to 2.4.14 ? Will this 
> work w/o any issues ?
> Please consider this urgent and replay asap.
>
> Thanks in advance,
> Reema.
> ___
> LARTC mailing list / [EMAIL PROTECTED]
> http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
>
>
>

___
LARTC mailing list / [EMAIL PROTECTED]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/


Re: [LARTC] htb: class 10007 isn't work conserving ?!

2004-07-05 Thread Catalin BOIE
Yes, that's what I was trying to ask below.  I'm still trying to figure
out which class (in the : format) the error message is
referring to.
It's about class 1:7.
So, since I'm not sure which class it is (and I have several htb
qdiscs; oh, I just realized that I neglected to mention that I'm using
HTB), I'm not sure which qdisc this refers to.
I [think I] understand that htb is a non-work-conserving qdisc, and I
[think I] have configured things so that every htb qdisc I instantiate
limits the bandwidth, so I don't understand why this situation would
invoke a warning message.
Also -- is there some way to correlate this identifier "10007" with a
classid?
I'm just starting back on working on this problem this morning, and I'll
approach it via a process of elimination, but I just thought there
surely must be some sort of deterministic mapping between the
: label and this one given in the warning message.
Thank you --
Glen
--
**
Glen W. Mabey
[EMAIL PROTECTED]
http://mabeys.homelinux.com/glen/
**
---
Catalin(ux aka Dino) BOIE
catab at deuroconsult.ro
http://kernel.umbrella.ro/
___
LARTC mailing list / [EMAIL PROTECTED]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/


Re: [LARTC] htb: class 10007 isn't work conserving ?!

2004-07-05 Thread Glen Mabey
On Mon, Jul 05, 2004 at 09:18:11AM +0300, Catalin BOIE wrote:
> On Fri, 2 Jul 2004, Glen Mabey wrote:
> 
> >I'm getting the following error/warning at some point in my config
> >script, and I'm not sure which class it is referring to.
> >
> >htb: class 10007 isn't work conserving ?!
> 
> What qdisc is attached to this class?

Yes, that's what I was trying to ask below.  I'm still trying to figure
out which class (in the : format) the error message is
referring to.  

So, since I'm not sure which class it is (and I have several htb
qdiscs; oh, I just realized that I neglected to mention that I'm using
HTB), I'm not sure which qdisc this refers to.

> >I [think I] understand that htb is a non-work-conserving qdisc, and I
> >[think I] have configured things so that every htb qdisc I instantiate
> >limits the bandwidth, so I don't understand why this situation would
> >invoke a warning message.
> >
> >Also -- is there some way to correlate this identifier "10007" with a
> >classid?

I'm just starting back on working on this problem this morning, and I'll
approach it via a process of elimination, but I just thought there
surely must be some sort of deterministic mapping between the
: label and this one given in the warning message.

Thank you --
Glen

-- 
**
Glen W. Mabey
[EMAIL PROTECTED]
http://mabeys.homelinux.com/glen/
**
___
LARTC mailing list / [EMAIL PROTECTED]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/


Re: [LARTC] htb: class 10007 isn't work conserving ?!

2004-07-05 Thread Ed Wildgoose

Our ISP has given us 5 static IP address plus one router IP address and I
was wondering if I could get rid of their stupid EN5861 router and set up
the linux machine to handle all the static addresses and routing.  I figured
I'd have to set up alises for other IP addresses eg ifconfig eth0:0
xx.xx.xx.193 but once I've done that I've found out I cant use ip route to
configure it eg ip route add default dev eth0:0 table server.  Whats the
best way to go about this?
Cheers.
By the way I'm running redhat 9 with two adsl connections, on is a
speedtouch USB modem and the other is the EN5861 router.
 

I'm not quite sure why you tagged this on to the end of a thread about 
htb classes?  As a result many people may not even read your question...? 

I have one of those EN5861 router things, and actually I find it pretty 
good.  The biggest issue is that it's a bit of a timebomb, the 
powersupply dies after a few years, and unless you have a spare it's a 
bit of a weak link

Do you need to do some particularly advanced routing that's stopping you 
just using the en5861?

Good luck
Ed W
___
LARTC mailing list / [EMAIL PROTECTED]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/


RE: [LARTC] htb: class 10007 isn't work conserving ?!

2004-07-05 Thread Chris Bolton
Hi all,

Our ISP has given us 5 static IP address plus one router IP address and I
was wondering if I could get rid of their stupid EN5861 router and set up
the linux machine to handle all the static addresses and routing.  I figured
I'd have to set up alises for other IP addresses eg ifconfig eth0:0
xx.xx.xx.193 but once I've done that I've found out I cant use ip route to
configure it eg ip route add default dev eth0:0 table server.  Whats the
best way to go about this?

Cheers.

By the way I'm running redhat 9 with two adsl connections, on is a
speedtouch USB modem and the other is the EN5861 router.





___
LARTC mailing list / [EMAIL PROTECTED]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/


Re: [LARTC] htb: class 10007 isn't work conserving ?!

2004-07-04 Thread Catalin BOIE
On Fri, 2 Jul 2004, Glen Mabey wrote:
I'm getting the following error/warning at some point in my config
script, and I'm not sure which class it is referring to.
htb: class 10007 isn't work conserving ?!
What qdisc is attached to this class?
I [think I] understand that htb is a non-work-conserving qdisc, and I
[think I] have configured things so that every htb qdisc I instantiate
limits the bandwidth, so I don't understand why this situation would
invoke a warning message.
Also -- is there some way to correlate this identifier "10007" with a
classid?
Thank you,
Glen Mabey
--
**
Glen W. Mabey
[EMAIL PROTECTED]
http://mabeys.homelinux.com/glen/
**
___
LARTC mailing list / [EMAIL PROTECTED]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
---
Catalin(ux aka Dino) BOIE
catab at deuroconsult.ro
http://kernel.umbrella.ro/
___
LARTC mailing list / [EMAIL PROTECTED]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/


Re: [LARTC] HTB and iptables statistics

2004-07-01 Thread Andreas Klauer
Am Thursday 01 July 2004 22:52 schrieb Stef Coene:
> So it's possible to drag the tokens negative if the child class is more
> sending packets then the parent allows.

If I understand you right, it's only the parent classes that can get 
negative tokens this way. But I also have leaf classes with negative 
tokens. Does this mean there's something wrong?

Are negative tokens a good thing, or rather a bad thing?
Any way to prevent them?

Andreas
___
LARTC mailing list / [EMAIL PROTECTED]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/


Re: [LARTC] HTB and iptables statistics

2004-07-01 Thread Stef Coene
On Wednesday 30 June 2004 19:13, Alexander Kotelnikov wrote:
> Hello.
>
> The problems are:
> 1. Using HTB I get negative values for tokens and ctokens in tc -s
> output, for example:
This is perfectly possible.  It depends on your configuration and the 
parent-child relation ship between the classes.
If a class has a token, it can send a packet.  But if a child class is sending 
a packet, a token of the parent class is also used.  And a class can use it 
tokens even if the parent class has no tokens left.  So it's possible to drag 
the tokens negative if the child class is more sending packets then the 
parent allows.  But the parent can not forbid this.

Stef


-- 
[EMAIL PROTECTED]
 "Using Linux as bandwidth manager"
     http://www.docum.org/
___
LARTC mailing list / [EMAIL PROTECTED]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/


Re: [LARTC] HTB and iptables statistics

2004-06-30 Thread Andreas Klauer
Am Wednesday 30 June 2004 19:13 schrieb Alexander Kotelnikov:

> Using HTB I get negative values for tokens and ctokens in tc -s output

Can't help you there.

> class htb 1:13 parent 1:1 prio 7 quantum 1024 rate 8Kbit ceil 16Kbit
[...]
> 12307 pkts (dropped 20013, overlimits 0)


> I get traffic speed up to 12kbs, even my
> uplink is no more than 32Kbit. How can this be?

My guess: Not every packet that passes your IPTables rule does actually 
find it's way to the uplink. The 'dropped' counter of your 1:13 class
indicates that many packets are just thrown away.

Andreas
___
LARTC mailing list / [EMAIL PROTECTED]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/


Re: [LARTC] HTB patch - fairness

2004-06-25 Thread Andre Correa
Hi Devik, I played with your htbfair patch on 2.6.6 and found some 
diferences between 2.4 to 2.6 that cause problems when applying it. 
Diferences include rb_node that was rb_node_t and some other minor probs.

After "fixing" those diff troubles I still get the following error 
compiling the kernel that I couldn't repair:

make[1]: `arch/i386/kernel/asm-offsets.s' is up to date.
  CHK include/linux/compile.h
  CC  net/sched/sch_htb.o
net/sched/sch_htb.c:916: parse error before `*'
net/sched/sch_htb.c:917: parse error before `rb_node'
net/sched/sch_htb.c:918: warning: return-type defaults to `int'
net/sched/sch_htb.c:918: warning: function declaration isn't a prototype
net/sched/sch_htb.c: In function `htb_id_find_next_upper':
net/sched/sch_htb.c:919: `rb_node' undeclared (first use in this function)
net/sched/sch_htb.c:919: (Each undeclared identifier is reported only once
net/sched/sch_htb.c:919: for each function it appears in.)
net/sched/sch_htb.c:919: `r' undeclared (first use in this function)
net/sched/sch_htb.c:920: `n' undeclared (first use in this function)
net/sched/sch_htb.c:921: `prio' undeclared (first use in this function)
net/sched/sch_htb.c:922: `id' undeclared (first use in this function)
net/sched/sch_htb.c:931: warning: control reaches end of non-void function
net/sched/sch_htb.c: In function `htb_lookup_leaf':
net/sched/sch_htb.c:951: `pid' undeclared (first use in this function)
net/sched/sch_htb.c:954: `q' undeclared (first use in this function)
net/sched/sch_htb.c:959: warning: assignment from incompatible pointer type
net/sched/sch_htb.c: In function `htb_dequeue_tree':
net/sched/sch_htb.c:996: warning: passing arg 1 of `htb_lookup_leaf' 
from incompatible pointer type
net/sched/sch_htb.c:996: warning: passing arg 2 of `htb_lookup_leaf' 
makes integer from pointer without a cast
net/sched/sch_htb.c:996: warning: passing arg 3 of `htb_lookup_leaf' 
makes pointer from integer without a cast
net/sched/sch_htb.c:996: too many arguments to function `htb_lookup_leaf'
net/sched/sch_htb.c:1018: warning: passing arg 1 of `htb_lookup_leaf' 
from incompatible pointer type
net/sched/sch_htb.c:1018: warning: passing arg 2 of `htb_lookup_leaf' 
makes integer from pointer without a cast
net/sched/sch_htb.c:1018: warning: passing arg 3 of `htb_lookup_leaf' 
makes pointer from integer without a cast
net/sched/sch_htb.c:1018: too many arguments to function `htb_lookup_leaf'
net/sched/sch_htb.c:1034: warning: passing arg 1 of `htb_lookup_leaf' 
from incompatible pointer type
net/sched/sch_htb.c:1034: warning: passing arg 2 of `htb_lookup_leaf' 
makes integer from pointer without a cast
net/sched/sch_htb.c:1034: warning: passing arg 3 of `htb_lookup_leaf' 
makes pointer from integer without a cast
net/sched/sch_htb.c:1034: too many arguments to function `htb_lookup_leaf'
make[2]: *** [net/sched/sch_htb.o] Error 1
make[1]: *** [net/sched] Error 2
make: *** [net] Error 2

The "fixed" patch for 2.6.6 can be downloaded here:
http://www.linuximq.net/testing/htbfair-2.6.6-testing.diff
tks for the good work on HTB.
cheers...
Andre

devik wrote:
Witold Szczerba spent his time evaluating fairness of borrowing. His
troubles inspired me enough to analyze the problem: When a class changes
from yellow to green it disconnects itself from parent's feedlist.
Unfortunately it resets feed pointer to the first child. I created a patch
where the class uses classid to remember its position in the feedlist. The
patch for 2.4.24 and hopefully others is at:
http://luxik.cdi.cz/~devik/qos/htb/#changes
PLEASE report me any problems with it !
---
Martin Devera aka devik
Linux kernel QoS/HTB maintainer
  http://luxik.cdi.cz/~devik/
___
LARTC mailing list / [EMAIL PROTECTED]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/

___
LARTC mailing list / [EMAIL PROTECTED]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/


Re: [LARTC] HTB is nor fair when 'borrowing? *bug* confirmed?

2004-06-24 Thread pljosh
I assume you saw the patch - and it's OK now?
Andy.
Yes, I was the one who tested it before Devik made it public :)
(and he wrote my name together with info about this patch)
I wrote to him about that after you confirmed you can see the same 
behavior of htb.
Now it works PERFECT!
(three times 'hip-hip-hurray' for HTB :)

-josh
___
LARTC mailing list / [EMAIL PROTECTED]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/


Re: [LARTC] htb vs hsfc

2004-06-24 Thread Patrick McHardy
Vincent Perrier wrote:
HTB versus HFSC, both qdisc offer the same kind of service,
if you want to see comparative test results, go to
http://www.rawsoft.org
at the line "TEST RESULTS" you will find the results for
a sharing test and a burst test.
You will see that both qdisc are good.
Nice comparision, very interesting. Note that you have a small
misconfiguration in your HFSC setup. On page 8 you say "The
shaping is impacted by real time bursts". This is only because
your real-time classes are not part of the link-sharing hierarchy.
If you add link-share curves to the real-time classes which are
equal to the real-time curves shaping won't be impacted.
Regards
Patrick
___
LARTC mailing list / [EMAIL PROTECTED]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/


Re: [LARTC] HTB patch - fairness

2004-06-24 Thread Andy Furniss
Andy Furniss wrote:
I finally got this to work - I forgot to use gcc 2.59.3 to do the module 
- the one 3.3.3 made segfaulted and stopped tc and ifconfig from working 
 thereafter.

I tested and found that the same happens without the patch.
It works - It has fixed the problem pljosh described :-)
___
LARTC mailing list / [EMAIL PROTECTED]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/


Re: [LARTC] htb vs hsfc

2004-06-24 Thread Jason Boxman
On Thursday 24 June 2004 13:21, Vincent Perrier wrote:
> HTB versus HFSC, both qdisc offer the same kind of service,
> if you want to see comparative test results, go to
> http://www.rawsoft.org
> at the line "TEST RESULTS" you will find the results for
> a sharing test and a burst test.
> You will see that both qdisc are good.

Excellent information!

Thanks!

___
LARTC mailing list / [EMAIL PROTECTED]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/


Re: [LARTC] HTB patch - fairness

2004-06-24 Thread Andy Furniss
devik wrote:
Witold Szczerba spent his time evaluating fairness of borrowing. His
troubles inspired me enough to analyze the problem: When a class changes
from yellow to green it disconnects itself from parent's feedlist.
Unfortunately it resets feed pointer to the first child. I created a patch
where the class uses classid to remember its position in the feedlist. The
patch for 2.4.24 and hopefully others is at:
http://luxik.cdi.cz/~devik/qos/htb/#changes
PLEASE report me any problems with it !
I finally got this to work - I forgot to use gcc 2.59.3 to do the module 
- the one 3.3.3 made segfaulted and stopped tc and ifconfig from working 
 thereafter.

It works - It has fixed the problem pljosh described :-)
Andy.
___
LARTC mailing list / [EMAIL PROTECTED]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/


Re: [LARTC] HTB is nor fair when 'borrowing? *bug* confirmed?

2004-06-24 Thread Andy Furniss
pljosh wrote:
Użytkownik Andy Furniss napisał:
I just tried with 2 d/l and 3 classes - I see the same as you now.
Andy.

I am happy that there is finally confirmation of what I've seen :)
But what now? I am just starting with traffic shaping and my question 
is: how is that - that so many people are using HTB for so long time and 
nobody noticed it is not fair?
I suppose with more complex configurtions which are propably more common 
 the fact that some part of HTB is not fair (borrowing I suppose) is 
blured and hard to notice some incorrect behavior.

Does Devik work on HTB yet. Maybe he could look at this problem closer? 
Should I notice him about that? What do you think?
I assume you saw the patch - and it's OK now?
Andy.
___
LARTC mailing list / [EMAIL PROTECTED]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/


Re: [LARTC] HTB: 3. Sharing hierarchy

2004-06-23 Thread Mike Mestnik
I finaly found why my filters woulden't work, I was using grouping maches
up with quotation(") chars.  This caused tc to silently IGNORE thoes
matches while letting other non-quotated matches to work normaly, within
the same tc cmd.

I reworked my whole script to use 10:0 as the parent for filters, where's
b4 I was able to group all the port 8080 stuff into flowid 10:35 and then
use that as a parent.  I know that the docs say other-wise, but dose any
one know if it's safe thing todo?

http://www.technofoundry.com/cheako/
Has my tc modified scripts.





__
Do you Yahoo!?
New and Improved Yahoo! Mail - 100MB free storage!
http://promotions.yahoo.com/new_mail 
___
LARTC mailing list / [EMAIL PROTECTED]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/


Re: [LARTC] HTB: 3. Sharing hierarchy

2004-06-23 Thread Mike Mestnik
I finaly found why my filters woulden't work, I was using grouping maches
up with quotation(") chars.  This caused tc to silently IGNORE thoes
matches while letting other non-quotated matches to work normaly, within
the same tc cmd.

I reworked my whole script to use 10:0 as the parent for filters, where's
b4 I was able to group all the port 8080 stuff into flowid 10:35 and then
use that as a parent.  I know that the docs say other-wise, but dose any
one know if it's safe thing todo?

http://www.technofoundry.com/cheako/
Has my tc modified scripts.





__
Do you Yahoo!?
New and Improved Yahoo! Mail - 100MB free storage!
http://promotions.yahoo.com/new_mail 
___
LARTC mailing list / [EMAIL PROTECTED]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/


Re: [LARTC] HTB: 3. Sharing hierarchy

2004-06-23 Thread Stef Coene
On Tuesday 22 June 2004 06:19, Mike Mestnik wrote:
> On http://luxik.cdi.cz/~devik/qos/htb/manual/userg.htm...
> There is a nice explanation on how/why to setup a hierarchy with HTB.
> Howerver what is missing is how to setup finters for this case?
For more information and examples: http://docum.org/

> I had this working when I was using a seperat qdisc for each ?layer?,
> making each HTB only one level deep.  Described in the attached
> qdisc.sh.GOOD.
Not such a good idea.

> Described in the attached qdisc.sh is my current script, is my new config
> script.
>
> Described in the attached qdisc-undo.sh is the output of my ifup-mkundo.sh
> script, a reversed(read from the bottom up) list of del cmds for the given
> up script.
The command
tc qdisc del dev eth1 root
is enough to delete everything.

Stef

-- 
[EMAIL PROTECTED]
 "Using Linux as bandwidth manager"
     http://www.docum.org/
___
LARTC mailing list / [EMAIL PROTECTED]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/


Re: [LARTC] htb filter

2004-06-22 Thread Jason Boxman
On Wednesday 23 June 2004 01:57, Svetozar Mihailov wrote:
> > Shouldn't this:
> > > tc class add dev eth0 parent 2:0 classid 2:200 htb rate 100Mbit prio 10
> >
> > be "parent 2:"?
> >
> > Ed W
>
> That change nothing. I have running system with 800 PC , 4 classes for
> each. There is no difference for me in using "parent 2:" vs "parent 2:0".
> Both give same result.

Exactly.  2: is simply a short hand for 2:0, for example.

-- 

Jason Boxman
Perl Programmer / *NIX Systems Administrator
Shimberg Center for Affordable Housing | University of Florida
http://edseek.com/ - Linux and FOSS stuff

___
LARTC mailing list / [EMAIL PROTECTED]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/


Re: [LARTC] htb filter

2004-06-22 Thread Svetozar Mihailov
> Shouldn't this:
>
> >
> > tc class add dev eth0 parent 2:0 classid 2:200 htb rate 100Mbit prio 10
>
>
> be "parent 2:"?
>
> Ed W
>

That change nothing. I have running system with 800 PC , 4 classes for each.
There is no difference for me in using "parent 2:" vs "parent 2:0". Both
give same result.

Svetozar.

___
LARTC mailing list / [EMAIL PROTECTED]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/


Re: [LARTC] htb filter

2004-06-22 Thread Ed Wildgoose
Shouldn't this:  

tc class add dev eth0 parent 2:0 classid 2:200 htb rate 100Mbit prio 10

be "parent 2:"?
Ed W
___
LARTC mailing list / [EMAIL PROTECTED]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/


Re: [LARTC] htb and 2.6.5> ?

2004-06-22 Thread Catalin BOIE
On Tue, 22 Jun 2004, [EMAIL PROTECTED] wrote:
does someone have expirience with HTB and kernel 2.6.5 and up...
Does anyone have tested it with thousand of classes and filters..
How it behaves..
Depends on how many filters/classes, how much traffic. If you have a lot 
of filters, you must use hashes.

Basicaly, the 2.4 and 2.6 are the same regarding traffic control.
At the network driver level there is NAPI but I think it is in 2.4 also.
tia
___
LARTC mailing list / [EMAIL PROTECTED]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
---
Catalin(ux aka Dino) BOIE
catab at deuroconsult.ro
http://kernel.umbrella.ro/
___
LARTC mailing list / [EMAIL PROTECTED]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/


Re: [LARTC] HTB is nor fair when 'borrowing? *bug* confirmed?

2004-06-20 Thread pljosh
Użytkownik Andy Furniss napisał:
I just tried with 2 d/l and 3 classes - I see the same as you now.
Andy.
I am happy that there is finally confirmation of what I've seen :)
But what now? I am just starting with traffic shaping and my question 
is: how is that - that so many people are using HTB for so long time and 
nobody noticed it is not fair?
I suppose with more complex configurtions which are propably more common 
 the fact that some part of HTB is not fair (borrowing I suppose) is 
blured and hard to notice some incorrect behavior.

Does Devik work on HTB yet. Maybe he could look at this problem closer? 
Should I notice him about that? What do you think?

-josh

___
LARTC mailing list / [EMAIL PROTECTED]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/


Re: [LARTC] HTB is nor fair when 'borrowing? *bug* in HTB or some coincidence?

2004-06-20 Thread Andy Furniss
Andy Furniss wrote:
pljosh wrote:
Użytkownik Andy Furniss napisał:
I tried with your rc.shape script on my LAN using scp. I couldn't get 
the bash to work - it looks to me like it will only set one user. But I 

Did you launch it passing argument in "" or ''?
./rc.shape "4 5 6"
is quite far different than
./rc.shape 4 5 6
hardcoded my settings in it and checked with tc -s class ls dev eth0 
that my 2 classes existed.

I dont get it: you prepared two classes for two PCs which is 
equivalent to "t5" on my graph which shows that HTB acts PERFECT in 
such conditions.

Oops I was thinking less classes were worse - I should have reread the 
post. I'll try later with more.

I just tried with 2 d/l and 3 classes - I see the same as you now.
Andy.
___
LARTC mailing list / [EMAIL PROTECTED]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/


Re: [LARTC] HTB is nor fair when 'borrowing? *bug* in HTB or some coincidence?

2004-06-20 Thread Ed Wildgoose

p.s.
I made same test on other network with other PCs and different kernel 
version and it was the same...

Have you got something recent?  Try a 2.6.5 or newer kernel perhaps - 
this has 1000Hz scheduling (I think) and presumably the latest HTB 
patches.  I guess make sure your tc is up to date as well

Of the wall, but you never know
Ed W
___
LARTC mailing list / [EMAIL PROTECTED]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/


Re: [LARTC] HTB is nor fair when 'borrowing? *bug* in HTB or some coincidence?

2004-06-20 Thread Andy Furniss
pljosh wrote:
Użytkownik Andy Furniss napisał:
I tried with your rc.shape script on my LAN using scp. I couldn't get 
the bash to work - it looks to me like it will only set one user. But I 

Did you launch it passing argument in "" or ''?
./rc.shape "4 5 6"
is quite far different than
./rc.shape 4 5 6
hardcoded my settings in it and checked with tc -s class ls dev eth0 
that my 2 classes existed.

I dont get it: you prepared two classes for two PCs which is equivalent 
to "t5" on my graph which shows that HTB acts PERFECT in such conditions.
Oops I was thinking less classes were worse - I should have reread the 
post. I'll try later with more.

Andy.
___
LARTC mailing list / [EMAIL PROTECTED]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/


Re: [LARTC] HTB is nor fair when 'borrowing? *bug* in HTB or some coincidence?

2004-06-20 Thread pljosh
Użytkownik Andy Furniss napisał:
I tried with your rc.shape script on my LAN using scp. I couldn't get 
the bash to work - it looks to me like it will only set one user. But I 
Did you launch it passing argument in "" or ''?
./rc.shape "4 5 6"
is quite far different than
./rc.shape 4 5 6
hardcoded my settings in it and checked with tc -s class ls dev eth0 
that my 2 classes existed.
I dont get it: you prepared two classes for two PCs which is equivalent 
to "t5" on my graph which shows that HTB acts PERFECT in such conditions.

I SCPd a file from gateway to 2 PCs and thay were shaped OK and came in 
second perfect. It was the same for 500,1000 and 5000 ceils. The 500 
test took 15 mins.
So I don't really know whats going on for you.
Andy.
Try the same using 3 classes and stress it with 2 PCs only (each class 
has rate=1/3 of max bw and ceil=max bw. You will se that first class 
will get from HTB almost TWICE as much as secound one one!

-josh
p.s.
I made same test on other network with other PCs and different kernel 
version and it was the same...

___
LARTC mailing list / [EMAIL PROTECTED]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/


Re: [LARTC] HTB is nor fair when 'borrowing? *bug* in HTB or some coincidence?

2004-06-20 Thread Andy Furniss
pljosh wrote:

HTB_HYSTERESIS 0 in net/sched/sch_htb.c.
I did it, recompiled, launched... and i looks like it is even a little 
bit worser: user1 has almost twice as much BW as user3...
I DO NOT GET IT
IT LOOKS LIKE HTB WORKS FOR EVERYONE EXCEPT ME :(


I tried with your rc.shape script on my LAN using scp. I couldn't get 
the bash to work - it looks to me like it will only set one user. But I 
hardcoded my settings in it and checked with tc -s class ls dev eth0 
that my 2 classes existed.

I SCPd a file from gateway to 2 PCs and thay were shaped OK and came in 
second perfect. It was the same for 500,1000 and 5000 ceils. The 500 
test took 15 mins.

So I don't really know whats going on for you.
Andy.

___
LARTC mailing list / [EMAIL PROTECTED]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/


Re: [LARTC] HTB is nor fair when 'borrowing? *bug* in HTB or some coincidence?

2004-06-18 Thread pljosh

HTB_HYSTERESIS 0 in net/sched/sch_htb.c.
I did it, recompiled, launched... and i looks like it is even a little 
bit worser: user1 has almost twice as much BW as user3...
I DO NOT GET IT
IT LOOKS LIKE HTB WORKS FOR EVERYONE EXCEPT ME :(

___
LARTC mailing list / [EMAIL PROTECTED]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/


Re: [LARTC] HTB is nor fair when 'borrowing? *bug* in HTB or some coincidence?

2004-06-18 Thread pljosh
I meant to say aswell, that if you are doing the tests on downloads you 
need to throttle to about 80% of your rate, so you can build up queues 
and have a bit of spare for latency.
This 80% rule doesnt affect me as I am doing this on my local 100mbit 
network. I mean all the traffic is local - inside one phisical network.
[.1.1/24]--100mbit---[/eth0/-.1.70-.3.1-/eth1/]--100mbit--[.3.4]&[.3.6]

HTB is shaping at eth1 at 999kbps on a 100mbit network link.
.3.4 and .3.6 are downloading from .1.1 through linux router ([EMAIL PROTECTED] 
and [EMAIL PROTECTED]).

___
LARTC mailing list / [EMAIL PROTECTED]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/


Re: [LARTC] HTB is nor fair when 'borrowing? *bug* in HTB or some coincidence?

2004-06-18 Thread Andy Furniss
Andy Furniss wrote:
I also have half your bandwidth - and it was set at 400kbit for the test.
I meant to say aswell, that if you are doing the tests on downloads you 
need to throttle to about 80% of your rate, so you can build up queues 
and have a bit of spare for latency.

Andy.
___
LARTC mailing list / [EMAIL PROTECTED]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/


Re: [LARTC] HTB is nor fair when 'borrowing? *bug* in HTB or some coincidence?

2004-06-18 Thread Andy Furniss
pljosh wrote:
I just tested with my script and also see a 5-8% advantage for the 
lower  handle class.

I wouldn't call it a bug though - HTB is written for high traffic 
setups   and trade off needs to be made between perfect behaviour and 
CPU usage and you say it gets better with more classes.

Andy.

Well - you had 5-8% while I noticed 50-80% difference! (user1 ~76kB/s 
and user3 ~45kB/s).
I did notice on the graph I looked at, that it was a bit higher - I only 
tested with wget. I was going to repeat properly and if you were still 
higher suggest that you set quantums to mtu, low bursts and set

HTB_HYSTERESIS 0 in net/sched/sch_htb.c.
I also have esfq attached to classes

Of course - as you can see on the graph I created: with more classes 
difference beteween u1&u3 is smaller...
Hmm I only have 2+default shared by IP - but two more "above".
Can you send me the script you used for your test which gave you only 
5-8%? Maybe there is something wrong with the one of mine?
OK but it won't work for you - I guess. It needs connbytes a hacked IMQ 
and esfq. It's just a test evolved from digriz script really.

I also have half your bandwidth - and it was set at 400kbit for the test.
Andy.
___
LARTC mailing list / [EMAIL PROTECTED]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/


Re: [LARTC] HTB is nor fair when 'borrowing? *bug* in HTB or some coincidence?

2004-06-18 Thread pljosh
I just tested with my script and also see a 5-8% advantage for the lower 
 handle class.

I wouldn't call it a bug though - HTB is written for high traffic setups 
  and trade off needs to be made between perfect behaviour and CPU usage 
and you say it gets better with more classes.

Andy.
Well - you had 5-8% while I noticed 50-80% difference! (user1 ~76kB/s 
and user3 ~45kB/s).
Of course - as you can see on the graph I created: with more classes 
difference beteween u1&u3 is smaller...

Can you send me the script you used for your test which gave you only 
5-8%? Maybe there is something wrong with the one of mine?

-josh
___
LARTC mailing list / [EMAIL PROTECTED]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/


Re: [LARTC] HTB is nor fair when 'borrowing? *bug* in HTB or some coincidence?

2004-06-18 Thread Andy Furniss
pljosh wrote:
Ed Wildgoose wrote:
Hmm, interesting.  Can you switch the order of your IP mappings around 
on this test so that you can prove that it is some feature of HTB that 
user1 always gets more bandwidth, and no something about that machine 
(ie if you swap ip's for user1 and 3 that it still remains (the new) 
user1 who gets all the b/w?

Obviously this should not be so, just curious to eliminate other 
possibilities

Ed W

I did it already. When I set filter to direct 192.168.3.4 packets to 
1:60 and 192.168.3.6 to 1:40 then lines on my graph switch: now blue is 
over red...
The same switch happens when i set higher prio of 1:60...
So it means than when two classes at the same level have same "prio" 
then class with lower minor id has higher priority than classes with 
lower minor id... So there is no possibility to set them to be equal 
when borrowing occurs.

Now I am in trouble as I am writing my thesis and I wanted to show in my 
paper that HTB is excellent to share BW between users... what am I to 
write about this case?

BTW: maybe someone could repeat my experiment? Maybe it is something 
wrong with my hadrware or some unbelievable coincidence?
I just tested with my script and also see a 5-8% advantage for the lower 
 handle class.

I wouldn't call it a bug though - HTB is written for high traffic setups 
  and trade off needs to be made between perfect behaviour and CPU 
usage and you say it gets better with more classes.

Andy.
___
LARTC mailing list / [EMAIL PROTECTED]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/


Re: [LARTC] HTB is nor fair when 'borrowing? *bug* in HTB or some coincidence?

2004-06-18 Thread pljosh
Użytkownik Ed Wildgoose napisał:
(see the "htb_lookup_leaf" function for details)
Hope that helps...
Hmm... My greatest C program was the most simple snmp client you can 
ever imagine - and I was writing it for 2 weeks to finish my classes... 
So I think it is not good idea for me to patch (or even to take a look 
at) HTB code :)
-josh

___
LARTC mailing list / [EMAIL PROTECTED]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/


Re: [LARTC] HTB is nor fair when 'borrowing? *bug* in HTB or some coincidence?

2004-06-18 Thread Ed Wildgoose
Ed Wildgoose wrote:
pljosh wrote:
Ed Wildgoose wrote:
Hmm, interesting.  Can you switch the order of your IP mappings 
around on this test so that you can prove that it is some feature of 
HTB that user1 always gets more bandwidth, and no something about 
that machine (ie if you swap ip's for user1 and 3 that it still 
remains (the new) user1 who gets all the b/w?

Obviously this should not be so, just curious to eliminate other 
possibilities

Ed W

I did it already. When I set filter to direct 192.168.3.4 packets to 
1:60 and 192.168.3.6 to 1:40 then lines on my graph switch: now blue 
is over red...
The same switch happens when i set higher prio of 1:60...
So it means than when two classes at the same level have same "prio" 
then class with lower minor id has higher priority than classes with 
lower minor id... So there is no possibility to set them to be equal 
when borrowing occurs.

Now I am in trouble as I am writing my thesis and I wanted to show in 
my paper that HTB is excellent to share BW between users... what am I 
to write about this case?

BTW: maybe someone could repeat my experiment? Maybe it is something 
wrong with my hadrware or some unbelievable coincidence?

Have a read through the dequeue code.  Perhaps you can spot a problem 
- there are plenty of debug flags you can switch on

If I had to guess, then I would suspect the following: When there is 
spare bandwidth available, then there is some kind of round robin 
scheduler which gives the spare stuff away by visiting each lower node 
in ascending priority order.  However, I suspect that the order is 
deterministic and hence the first node with prio 1 effectively gets 
visited more often than the next node with prio1 and so on (makes 
sense from a computing implementation point of view - it's fast and 
efficient, etc)

It would also imply that the spare bandwidth is only allocated on a 
per time slice point of view, ie there are no long term timers 
checking that node 1 is not getting a little more than node 2 and 
hence biasing the allocation to node 2.  All that kind of code would 
add overhead and is presumably therefore justified in not being there...?

OK, have a look at "dequeue" and "htb_dequeue_tree".  The algorithm is 
simply this:

i = 0;
while (some_spare_bw_available())
{
   queue = find_a_queue_with_given_prio_and_some_packets (i);
   if (queue) {
  Dequeue_one_packet(queue);
   } else {
  i++;
   }
}
So it finds a queue for a given priority, dequeues a packet and repeats 
until we have done eveything for that prio.

What I can't quite see, but suspect, is that the "find_a_queue" function 
is supposed to rotate through each of the queues at a given prioriy each 
time, hence it *shouldn't* be biased towards any one queue...  (see the 
"htb_lookup_leaf" function for details)

Hope that helps...
___
LARTC mailing list / [EMAIL PROTECTED]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/


Re: [LARTC] HTB is nor fair when 'borrowing? *bug* in HTB or some coincidence?

2004-06-18 Thread Ed Wildgoose
pljosh wrote:
Ed Wildgoose wrote:
Hmm, interesting.  Can you switch the order of your IP mappings 
around on this test so that you can prove that it is some feature of 
HTB that user1 always gets more bandwidth, and no something about 
that machine (ie if you swap ip's for user1 and 3 that it still 
remains (the new) user1 who gets all the b/w?

Obviously this should not be so, just curious to eliminate other 
possibilities

Ed W

I did it already. When I set filter to direct 192.168.3.4 packets to 
1:60 and 192.168.3.6 to 1:40 then lines on my graph switch: now blue 
is over red...
The same switch happens when i set higher prio of 1:60...
So it means than when two classes at the same level have same "prio" 
then class with lower minor id has higher priority than classes with 
lower minor id... So there is no possibility to set them to be equal 
when borrowing occurs.

Now I am in trouble as I am writing my thesis and I wanted to show in 
my paper that HTB is excellent to share BW between users... what am I 
to write about this case?

BTW: maybe someone could repeat my experiment? Maybe it is something 
wrong with my hadrware or some unbelievable coincidence?

Have a read through the dequeue code.  Perhaps you can spot a problem - 
there are plenty of debug flags you can switch on

If I had to guess, then I would suspect the following: When there is 
spare bandwidth available, then there is some kind of round robin 
scheduler which gives the spare stuff away by visiting each lower node 
in ascending priority order.  However, I suspect that the order is 
deterministic and hence the first node with prio 1 effectively gets 
visited more often than the next node with prio1 and so on (makes sense 
from a computing implementation point of view - it's fast and efficient, 
etc)

It would also imply that the spare bandwidth is only allocated on a per 
time slice point of view, ie there are no long term timers checking that 
node 1 is not getting a little more than node 2 and hence biasing the 
allocation to node 2.  All that kind of code would add overhead and is 
presumably therefore justified in not being there...?

This would be my hunch, but there is plenty of info on the HTB site on 
the theory, and I should think it worth checking the dequeue code with 
some debug statements to prove this (or not).  Fixing it looks a little 
harder though...

Ed W
___
LARTC mailing list / [EMAIL PROTECTED]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/


Re: [LARTC] HTB is nor fair when 'borrowing? *bug* in HTB or some coincidence?

2004-06-18 Thread pljosh
Ed Wildgoose wrote:
Hmm, interesting.  Can you switch the order of your IP mappings around 
on this test so that you can prove that it is some feature of HTB that 
user1 always gets more bandwidth, and no something about that machine 
(ie if you swap ip's for user1 and 3 that it still remains (the new) 
user1 who gets all the b/w?

Obviously this should not be so, just curious to eliminate other 
possibilities

Ed W
I did it already. When I set filter to direct 192.168.3.4 packets to 
1:60 and 192.168.3.6 to 1:40 then lines on my graph switch: now blue is 
over red...
The same switch happens when i set higher prio of 1:60...
So it means than when two classes at the same level have same "prio" 
then class with lower minor id has higher priority than classes with 
lower minor id... So there is no possibility to set them to be equal 
when borrowing occurs.

Now I am in trouble as I am writing my thesis and I wanted to show in my 
paper that HTB is excellent to share BW between users... what am I to 
write about this case?

BTW: maybe someone could repeat my experiment? Maybe it is something 
wrong with my hadrware or some unbelievable coincidence?

-josh
___
LARTC mailing list / [EMAIL PROTECTED]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/


Re: [LARTC] HTB is nor fair when 'borrowing? Can someone correct me or maybe Devik's HTB has a bug?

2004-06-18 Thread Ed Wildgoose

HTB should give fifty-fifty to U1 and U3... but it is not...
What is happening is that HTB gives about 350-380kbit for user3 and 
everything else(more than 600kbit) for user1... this period is marked 
as "t1" on my graph...

Hmm, interesting.  Can you switch the order of your IP mappings around 
on this test so that you can prove that it is some feature of HTB that 
user1 always gets more bandwidth, and no something about that machine 
(ie if you swap ip's for user1 and 3 that it still remains (the new) 
user1 who gets all the b/w?

Obviously this should not be so, just curious to eliminate other 
possibilities

Ed W
___
LARTC mailing list / [EMAIL PROTECTED]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/


Re: [LARTC] HTB theory?

2004-06-16 Thread Dmitry Golubev
Thanks very much, Devik and Andy, I had seminar today and I think it has some 
success, and (for now?) I do not feel like having unanswered questions.

Dmitry

On Sunday 13 June 2004 21:41, Martin Devera <[EMAIL PROTECTED]> wrote:
> > 1. In order of priority, we satisfy all leaf classes' rates (while the
> > class is ?green?)
> > 2. When the leaf classes' rate is reached (all the leaf classes are
> > ?yellow?), borrow the unused speed from parent classes if they have
> > something to give (if they are not ?red?). In this case, each leaf class
> > is equal to others until their ceil is met or until they will have no
> > parent to borrow from... Or maybe their level matters?
>
> In both cases DRR is used to cycle classes to dequeue - this gives us
> fairness (weighted by "quantums").
>
> > I also think that:
> > 1. Until all leaf classes' rate is met we even do not check anything else
> > (including ceil of parent classes)
>
> correct
>
> > 2. the root queue is unlimited feed for the classes which are attached to
> > it directly
>
> yes
>
> > One think I do not understand neither for SFQ nor for HTB (please explain
> > for both) - how can we maintain fairness in case of differently-sizes
> > packets. As I understand, one packet is atomic unit, and interface is
> > requesting not more and not less than one packet. Now given a quantum for
> > each leaf class in HTB or the same for SQF (are they different in this
> > process?) of 1500 bytes - do they wait for more packets from one subclass
> > (asking it once again in the next turn, of course, if they have nothing
> > to send, we switch to the next...)? And if one subclass is providing 1500
> > packets in each turn, and another subclass is providing 800-byte packets
> > - will they be equal on the amount of traffic they are allowed to send in
> > case the real channel is smaller than the sum of their effective ceil
> > values?
>
> both SFQ and HTB (and CBQ) uses DRR which uses BYTES as count not packets.
> Look into literature for "leaky bucket" description. To answer your last
> mail, cannonical HTB theory (v.3 = latest one) is:
> http://luxik.cdi.cz/~devik/qos/htb/manual/theory.htm. It is up to date -
> mainly because algorithm is the same since 2002.
>
> > (I am preparing for a seminar in which I will tell people how it works,
> > so I need to know this perfectly :))) )
>
> Hmm I have talk at SUCON (http://www.suug.ch/sucon/04/speakers.html#7) so
> that
> I'll need to refresh it too :)
>
> devik
>
> ___
> LARTC mailing list / [EMAIL PROTECTED]
> http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
___
LARTC mailing list / [EMAIL PROTECTED]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/


Re: [LARTC] HTB theory?

2004-06-13 Thread Martin Devera
> 1. In order of priority, we satisfy all leaf classes' rates (while the class
> is ?green?)
> 2. When the leaf classes' rate is reached (all the leaf classes are ?yellow?),
> borrow the unused speed from parent classes if they have something to give
> (if they are not ?red?). In this case, each leaf class is equal to others
> until their ceil is met or until they will have no parent to borrow from...
> Or maybe their level matters?

In both cases DRR is used to cycle classes to dequeue - this gives us
fairness (weighted by "quantums").

> I also think that:
> 1. Until all leaf classes' rate is met we even do not check anything else
> (including ceil of parent classes)

correct

> 2. the root queue is unlimited feed for the classes which are attached to it
> directly

yes

> One think I do not understand neither for SFQ nor for HTB (please explain for
> both) - how can we maintain fairness in case of differently-sizes packets. As
> I understand, one packet is atomic unit, and interface is requesting not more
> and not less than one packet. Now given a quantum for each leaf class in HTB
> or the same for SQF (are they different in this process?) of 1500 bytes - do
> they wait for more packets from one subclass (asking it once again in the
> next turn, of course, if they have nothing to send, we switch to the
> next...)? And if one subclass is providing 1500 packets in each turn, and
> another subclass is providing 800-byte packets - will they be equal on the
> amount of traffic they are allowed to send in case the real channel is
> smaller than the sum of their effective ceil values?

both SFQ and HTB (and CBQ) uses DRR which uses BYTES as count not packets.
Look into literature for "leaky bucket" description. To answer your last
mail, cannonical HTB theory (v.3 = latest one) is:
http://luxik.cdi.cz/~devik/qos/htb/manual/theory.htm. It is up to date -
mainly because algorithm is the same since 2002.

> (I am preparing for a seminar in which I will tell people how it works, so I
> need to know this perfectly :))) )

Hmm I have talk at SUCON (http://www.suug.ch/sucon/04/speakers.html#7) so
that
I'll need to refresh it too :)

devik

___
LARTC mailing list / [EMAIL PROTECTED]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/


Re: [LARTC] HTB theory?

2004-06-13 Thread Andy Furniss
Dmitry Golubev wrote:

One think I do not understand neither for SFQ nor for HTB (please explain for 
both) - how can we maintain fairness in case of differently-sizes packets. As 
I understand, one packet is atomic unit, and interface is requesting not more 
and not less than one packet. 
I don't know about HTB, but SFQ uses quantum (= MTU by default). When a 
packet is dequeued its length is taken away from a counter for the flow. 
If it's <=0 then the next flow is set up for the next dequeue and 
credited with quantum bytes. If its >0 then it will be called again next 
dequeue. SFQ returns the skb for the dequeued packet - so HTB can look 
up  its len, I don't know the HTB code - but that's the next level of 
documentation for you.

Andy.
___
LARTC mailing list / [EMAIL PROTECTED]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/


Re: [LARTC] HTB theory?

2004-06-12 Thread Dmitry Golubev
OK then, could you tell if I understand correctly and correct me if not?

1. In order of priority, we satisfy all leaf classes' rates (while the class 
is “green”)
2. When the leaf classes' rate is reached (all the leaf classes are “yellow”), 
borrow the unused speed from parent classes if they have something to give 
(if they are not “red”). In this case, each leaf class is equal to others 
until their ceil is met or until they will have no parent to borrow from... 
Or maybe their level matters?

I also think that:
1. Until all leaf classes' rate is met we even do not check anything else 
(including ceil of parent classes)
2. the root queue is unlimited feed for the classes which are attached to it 
directly

One think I do not understand neither for SFQ nor for HTB (please explain for 
both) - how can we maintain fairness in case of differently-sizes packets. As 
I understand, one packet is atomic unit, and interface is requesting not more 
and not less than one packet. Now given a quantum for each leaf class in HTB 
or the same for SQF (are they different in this process?) of 1500 bytes - do 
they wait for more packets from one subclass (asking it once again in the 
next turn, of course, if they have nothing to send, we switch to the 
next...)? And if one subclass is providing 1500 packets in each turn, and 
another subclass is providing 800-byte packets - will they be equal on the 
amount of traffic they are allowed to send in case the real channel is 
smaller than the sum of their effective ceil values?

(I am preparing for a seminar in which I will tell people how it works, so I 
need to know this perfectly :))) )

Thanks,
Dmitry

On Saturday 12 June 2004 15:39, Stef Coene <[EMAIL PROTECTED]> wrote:
> On Saturday 12 June 2004 13:46, Dmitry Golubev wrote:
> > Hello,
> >
> > I have been searching for HTB theory documentation and found two
> > interesting sources - Devik's page and docum.org FAQ. In some places they
> > are
> > contradictory which make me think that Devik's theoretic document (marked
> > "actual") is just too old and does not reflect the latest changes. After
> > reading http://www.docum.org/docum.org/faq/cache/30.html and others, I
> > feel that I do not understand anything ...
>
> I know some information in the faq pages on docum.org is outdated.  Some
> information is for htb2, other information changed in htb3 (like the max
> and min for quantum).
> I had a problem with my faq pages (memory problem with faqomatic), but they
> are working again.  I'm checking and updating all pages (I also converted
> them all to php) and soon I will check the faq pages for errors.
>
> > Where can I find the current and actual documentation on how HTB3 is
> > working (I am interested in in-depth theoretical material)?
>
> Htb pages and htb sources.
>
> Stef
___
LARTC mailing list / [EMAIL PROTECTED]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/


Re: [LARTC] HTB theory?

2004-06-12 Thread Stef Coene
On Saturday 12 June 2004 13:46, Dmitry Golubev wrote:
> Hello,
>
> I have been searching for HTB theory documentation and found two
> interesting sources - Devik's page and docum.org FAQ. In some places they
> are
> contradictory which make me think that Devik's theoretic document (marked
> "actual") is just too old and does not reflect the latest changes. After
> reading http://www.docum.org/docum.org/faq/cache/30.html and others, I feel
> that I do not understand anything ...
I know some information in the faq pages on docum.org is outdated.  Some 
information is for htb2, other information changed in htb3 (like the max and 
min for quantum).
I had a problem with my faq pages (memory problem with faqomatic), but they 
are working again.  I'm checking and updating all pages (I also converted 
them all to php) and soon I will check the faq pages for errors.

> Where can I find the current and actual documentation on how HTB3 is
> working (I am interested in in-depth theoretical material)?
Htb pages and htb sources.

Stef

-- 
[EMAIL PROTECTED]
 "Using Linux as bandwidth manager"
     http://www.docum.org/
___
LARTC mailing list / [EMAIL PROTECTED]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/


Re: [LARTC] HTB latency

2004-06-09 Thread miller69
> tc qdisc add dev ethX parent HTBCLASS handle QDISC pfifo limit 10
Thanks guys, reducing the queue length to 10 packets the delay decreased
from about 2600ms (2.6 seconds) to 80ms. That helps a lot!

Regards

-- 
"Sie haben neue Mails!" - Die GMX Toolbar informiert Sie beim Surfen!
Jetzt aktivieren unter http://www.gmx.net/info

___
LARTC mailing list / [EMAIL PROTECTED]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/


Re: [LARTC] HTB Bug report.

2004-06-04 Thread Catalin BOIE
On Fri, 4 Jun 2004, Thierry Coutelier wrote:
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Hello,
We got the following message on the console of one of our server:
~  HTB: dequeue bug (8,12140714,12140714), report it please !
The server is a Dell Poweredge with 2 CPUs running a 2.5.25 Kernel.
It is used as a ppp gateway to server l2tp connections.
2.5.25 is way old.
The bug was corrected. You need to upgrade.
The iproute2 package has the version [020116].
We set the filters using the handle as flowid. For example:
~  tc filter add dev eth1 protocol ip parent 1: prio 1 handle ::240 u32 match 
\
	ip dst 172.23.98.5 flowid 1:240
~  tc class add dev eth1 parent 1:1 classid 1:240 htb rate 10 ceil 10

We use this method instead of using the priority to differentiate the filters 
to not
have the square amount of lines when doing a "tc filter ls".

What could be the consequence of this error message except from making us 
report it ;)

- --
Thierry Coutelier
No Patents on Software: http://www.linux.lu/epatent
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.2.3 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFAwG/zPOfrcNNQX7oRArtJAJwMcnXUeM4OXphVfVUcWWCu1sUDdgCfcc2B
LBVb/Hdl5WDvzD2VCQbtYbk=
=mPCT
-END PGP SIGNATURE-
___
LARTC mailing list / [EMAIL PROTECTED]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
---
Catalin(ux aka Dino) BOIE
catab at deuroconsult.ro
http://kernel.umbrella.ro/
___
LARTC mailing list / [EMAIL PROTECTED]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/


Re: [LARTC] HTB latency

2004-06-01 Thread Marton Sandor
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1


Hi, 
> Can someone point me how to reduce this queue length or wich else qdisc I
> can use to improve latency? All I need is a short queue in addition to the
> shaping accuracy of HTB. Things like SFQ don't help. CBQ is a bit faster but
>  far more inaccurate.

tc qdisc add dev ethX parent HTBCLASS handle QDISC pfifo limit 10
HTBCLASS - parent class (like 1:10)
QDISC - id of the new qdisc (like 10:0 )

will add the 10: pfifo qdisc with a queue length of 10 packets.

- -- 
 Marton Sandor  -  [EMAIL PROTECTED] 
 GPG id: 0x32825B5A , www.keyserver.net 
Ne kapkodjunk, mert meg leverunk valamit
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.2.2 (GNU/Linux)

iD8DBQFAvTKLKiUXNzKCW1oRAktmAJ4zbpzjGFi670Oie8bt+BQC8dn+JwCgiSKw
E0rborpXewFfX7eoWQB7E6c=
=9AjQ
-END PGP SIGNATURE-

___
LARTC mailing list / [EMAIL PROTECTED]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/


Re: [LARTC] HTB MPU

2004-05-30 Thread Andy Furniss
Ed Wildgoose wrote:

Reading your other post I see your small traffic is ~100b - this would 
use three cells, so as a temporary kludge you could set your mpu to 
159 and see how it goes.

AFAIK the author of the HTB patch is looking into modifying it to do 
the sums properly for DSL. There isn't one answer though - Eds' 
formula is fine doing the cells bit, but before this you need to add a 
ppp overhead to the IP packet length and this varies with pppoa+vc 
mux/pppoe/bridged pppoe and probably other varieties of dsl 
implementations.

I think he said that he is on BT atm based adsl?  Can we perhaps tweak 
that formula (which is already hardwired) and try to get him something 
useful.  It sounds like it would be a good vindication for the technique 
and if it works then we can retro fit it to some modular params which 
work for more people.  Can't be any worse than the current patch which 
already doesn't help most adsl users completely...
In other words, how would I calc the overhead for BT's ppp system?  
Happy to help write the patch if you can supply the info
See my post to Jason - I think it should be doable, I was just waiting 
to see if it got put into the patch - as the author knows the code and 
has done most of the work already.

Andy.

___
LARTC mailing list / [EMAIL PROTECTED]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/


Re: [LARTC] HTB MPU

2004-05-30 Thread Andy Furniss
Jason Boxman wrote:
On Friday 28 May 2004 14:54, Andy Furniss wrote:

Reading your other post I see your small traffic is ~100b - this would
use three cells, so as a temporary kludge you could set your mpu to 159
and see how it goes.
AFAIK the author of the HTB patch is looking into modifying it to do the
sums properly for DSL. There isn't one answer though - Eds' formula is
fine doing the cells bit, but before this you need to add a ppp overhead
to the IP packet length and this varies with pppoa+vc mux/pppoe/bridged
pppoe and probably other varieties of dsl implementations.

But there's no tried and true method of determining that information?
You mention at least three methods of mangling PPP with Ethernet/ATM.  And the 
overhead of each kind of setup also would vary depending on the specifics of 
that setup?  (i.e., knowing you have bridged PPPoE doesn't instantly qualify 
you as having an overhread of 123i.)

Sounds particularly complicated.
But the overhead would be a fixed cost, no?  If that is the case you can play 
whack-a-mole with that until you find a 'good' number.  But, as I see it, 
without a realtime ATM cost scheduler, even if I figure out my true 
'overhead' it won't make much difference.

Thoughts, anyone?
You can find it by experementation - if you get a cell count from your 
modem it's easy.

If you are on BT in the UK using pppoa/vc mux it's 10 (you can't even 
look that up - the RFC says 9 or 10). ping -s 10 uses 1 cell -s 11 2. 10 
data + 20 IP + 8 ICMP = 38, ATM cell data size = 48 so ppp overhead is 10.

Like ED I haven't really looked at the code - but will eventually If it 
doesn't get done by anyone else first :-)

Andy.

___
LARTC mailing list / [EMAIL PROTECTED]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/


Re: [LARTC] HTB MPU

2004-05-28 Thread Ed Wildgoose

Reading your other post I see your small traffic is ~100b - this would 
use three cells, so as a temporary kludge you could set your mpu to 
159 and see how it goes.

AFAIK the author of the HTB patch is looking into modifying it to do 
the sums properly for DSL. There isn't one answer though - Eds' 
formula is fine doing the cells bit, but before this you need to add a 
ppp overhead to the IP packet length and this varies with pppoa+vc 
mux/pppoe/bridged pppoe and probably other varieties of dsl 
implementations.

I think he said that he is on BT atm based adsl?  Can we perhaps tweak 
that formula (which is already hardwired) and try to get him something 
useful.  It sounds like it would be a good vindication for the technique 
and if it works then we can retro fit it to some modular params which 
work for more people.  Can't be any worse than the current patch which 
already doesn't help most adsl users completely... 

In other words, how would I calc the overhead for BT's ppp system?  
Happy to help write the patch if you can supply the info

Ed W
___
LARTC mailing list / [EMAIL PROTECTED]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/


Re: [LARTC] HTB MPU

2004-05-28 Thread Jason Boxman
On Friday 28 May 2004 14:54, Andy Furniss wrote:

> Reading your other post I see your small traffic is ~100b - this would
> use three cells, so as a temporary kludge you could set your mpu to 159
> and see how it goes.
>
> AFAIK the author of the HTB patch is looking into modifying it to do the
> sums properly for DSL. There isn't one answer though - Eds' formula is
> fine doing the cells bit, but before this you need to add a ppp overhead
> to the IP packet length and this varies with pppoa+vc mux/pppoe/bridged
> pppoe and probably other varieties of dsl implementations.

But there's no tried and true method of determining that information?

You mention at least three methods of mangling PPP with Ethernet/ATM.  And the 
overhead of each kind of setup also would vary depending on the specifics of 
that setup?  (i.e., knowing you have bridged PPPoE doesn't instantly qualify 
you as having an overhread of 123i.)

Sounds particularly complicated.

But the overhead would be a fixed cost, no?  If that is the case you can play 
whack-a-mole with that until you find a 'good' number.  But, as I see it, 
without a realtime ATM cost scheduler, even if I figure out my true 
'overhead' it won't make much difference.

Thoughts, anyone?

> Andy.
>

___
LARTC mailing list / [EMAIL PROTECTED]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/


Re: [LARTC] HTB MPU

2004-05-28 Thread Andy Furniss
Jason Boxman wrote:
On Friday 14 May 2004 03:05, Ed Wildgoose wrote:

I appears that you could change the patch in tc/core in fn
tc_calc_rtable, from:
 + if (overhead)
 + sz += overhead;
to something like:
 + if (overhead)
 + sz += (((sz-1)/mpu)+1) * overhead;

I did that and recompiled iproute2.  I kicked my rate up to my actual 
connection, 256Kbps, and I was nailed as usual.  No measurable change using 
the above with an mpu of 54 for each class.  Nothing changed at my 
handicapped rate of 160kbit either.

tc qdisc add dev eth0 root handle 1: htb default 90
tc class add dev eth0 parent 1: classid 1:1 htb rate 160kbit ceil 160kbit \
  mpu 54
tc class add dev eth0 parent 1:1 classid 1:10 htb rate 64kbit ceil 64kbit \
  mpu 54 prio 0
tc class add dev eth0 parent 1:1 classid 1:20 htb rate 80kbit ceil 160kbit \
  mpu 54 prio 1
tc class add dev eth0 parent 1:1 classid 1:50 htb rate 8kbit ceil 160kbit \
  mpu 54 prio 1
tc class add dev eth0 parent 1:1 classid 1:90 htb rate 8kbit ceil 160kbit \
  mpu 54 prio 1

Can someone with a working setup try this out and see if it helps?

No joy.  I had more success modifying the HTB_HYSTERESIS compile time option.
What would be nice is something that would calculate the actual PPPo(E|A) 
overhead on the fly at runtime and schedule accordingly.

Afterall, this whole [your rate] * 0.8/.75/.65 (I'm stuck with the latter 
value) is kind of a hack.  If a scheduler existed that understood the packets 
were ATM'd and the overhead imposed therein, you could simply specify your 
rate as what it really is.  By using a fraction of your actual egress 
bandwidth you're configuring for the worst case scenario.  In reality, 
depending on your traffic I think you can approach your actual rate more 
closely.

(The classical example being sending an unloaded TCP ACK costing your two ATM 
cells and essentially wasting an entire ATM cell.  But in some situations 
your traffic might be mostly large IP packets and then your waste overhead is 
greatly reduced...)

Anyway, is there any known work on such a scheduler?  I'd be interested in 
beta testing anything under development.
Reading your other post I see your small traffic is ~100b - this would 
use three cells, so as a temporary kludge you could set your mpu to 159 
and see how it goes.

AFAIK the author of the HTB patch is looking into modifying it to do the 
sums properly for DSL. There isn't one answer though - Eds' formula is 
fine doing the cells bit, but before this you need to add a ppp overhead 
to the IP packet length and this varies with pppoa+vc mux/pppoe/bridged 
pppoe and probably other varieties of dsl implementations.

Andy.
___
LARTC mailing list / [EMAIL PROTECTED]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/


Re: [LARTC] HTB, MPU, and suitable values

2004-05-25 Thread Ed Wildgoose
Andreas Klauer wrote:
Am Tuesday 18 May 2004 08:38 schrieb Ed Wildgoose:
 

I would code this as:
size = (  (int)((datasize-1)/48) + 1) * 53
You could hardcode something similar into your tc and see if it helps
(just remove PMU and overhead code added by the existing patch).
   

How does modifying the tc code affect the way rates are calculated and 
limited in the kernel? Isn't it just a userspace tool to create qdisc / 
class structures and read statistics?
 

Dunno, haven't had time to read through the code much.  It started 
because someone earlier in this thread pointed out that there was a 
patch available on the tc website to better handle overhead and MPU.  I 
just altered the patch in a different way based on what looked fairly 
obvious.

However, I notice that tc is noted to "have a full implementation of HTB 
inside it".  Perhaps there are two HTB implementations kicking around?

If I get a chance I will have a poke around in the code.  If the flow is 
this straightforward in most of the kernel modules then it looks pretty 
straightforward to implement some options to control padding packets to 
simulate the underlying protocol.  However, since no one else has done 
it, I doubt it is so...

Ed W
___
LARTC mailing list / [EMAIL PROTECTED]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/


Re: [LARTC] HTB, MPU, and suitable values

2004-05-25 Thread Andreas Klauer
Am Tuesday 18 May 2004 08:38 schrieb Ed Wildgoose:
> I would code this as:
>
> size = (  (int)((datasize-1)/48) + 1) * 53
>
> You could hardcode something similar into your tc and see if it helps
> (just remove PMU and overhead code added by the existing patch).

How does modifying the tc code affect the way rates are calculated and 
limited in the kernel? Isn't it just a userspace tool to create qdisc / 
class structures and read statistics?

Andreas
___
LARTC mailing list / [EMAIL PROTECTED]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/


Re: [LARTC] HTB MPU

2004-05-24 Thread Ed Wildgoose
Jason Boxman wrote:
On Friday 14 May 2004 03:05, Ed Wildgoose wrote:

 

I appears that you could change the patch in tc/core in fn
tc_calc_rtable, from:
 + if (overhead)
 + sz += overhead;
to something like:
 + if (overhead)
 + sz += (((sz-1)/mpu)+1) * overhead;
   

I did that and recompiled iproute2.  I kicked my rate up to my actual 
connection, 256Kbps, and I was nailed as usual.  No measurable change using 
the above with an mpu of 54 for each class.  Nothing changed at my 
handicapped rate of 160kbit either.

 

I think that calculation needs to be changed so that the divisor "mpu" 
should become 48, and the overhead will be 5

You could change the whole size calculation to be this instead (ie no IF):
sz = (  (int)((sz-1)/48) + 1) * 53;
Note I don't have the code in front of me, so you may need to tweak that 
a bit.  The idea though is that you get 48 data bytes in each ATM cell, 
hence we work out how many cells are required.  Then we multiply by 53 
which is that actual size of the atm cell.  Clear as mud?

What would be nice is something that would calculate the actual PPPo(E|A) 
overhead on the fly at runtime and schedule accordingly.
 

That's what it ought to do...
Please try this alteration and see if it works any better.  (Note: I 
think that MPU will need to be 48 for the purposes of this code?  Check 
my logic, but setting it to 48 is a little low, but the above 
calculation will then kick in and change it to 53 which is your real min 
packet size.  Otherwise we will double count.

Interested to hear if this works...
Ed W
___
LARTC mailing list / [EMAIL PROTECTED]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/


Re: [LARTC] HTB MPU

2004-05-24 Thread Jason Boxman
On Friday 14 May 2004 03:05, Ed Wildgoose wrote:

> I appears that you could change the patch in tc/core in fn
> tc_calc_rtable, from:
>
>   + if (overhead)
>   + sz += overhead;
>
> to something like:
>
>   + if (overhead)
>   + sz += (((sz-1)/mpu)+1) * overhead;

I did that and recompiled iproute2.  I kicked my rate up to my actual 
connection, 256Kbps, and I was nailed as usual.  No measurable change using 
the above with an mpu of 54 for each class.  Nothing changed at my 
handicapped rate of 160kbit either.

tc qdisc add dev eth0 root handle 1: htb default 90
tc class add dev eth0 parent 1: classid 1:1 htb rate 160kbit ceil 160kbit \
  mpu 54
tc class add dev eth0 parent 1:1 classid 1:10 htb rate 64kbit ceil 64kbit \
  mpu 54 prio 0
tc class add dev eth0 parent 1:1 classid 1:20 htb rate 80kbit ceil 160kbit \
  mpu 54 prio 1
tc class add dev eth0 parent 1:1 classid 1:50 htb rate 8kbit ceil 160kbit \
  mpu 54 prio 1
tc class add dev eth0 parent 1:1 classid 1:90 htb rate 8kbit ceil 160kbit \
  mpu 54 prio 1


> Can someone with a working setup try this out and see if it helps?

No joy.  I had more success modifying the HTB_HYSTERESIS compile time option.

What would be nice is something that would calculate the actual PPPo(E|A) 
overhead on the fly at runtime and schedule accordingly.

Afterall, this whole [your rate] * 0.8/.75/.65 (I'm stuck with the latter 
value) is kind of a hack.  If a scheduler existed that understood the packets 
were ATM'd and the overhead imposed therein, you could simply specify your 
rate as what it really is.  By using a fraction of your actual egress 
bandwidth you're configuring for the worst case scenario.  In reality, 
depending on your traffic I think you can approach your actual rate more 
closely.

(The classical example being sending an unloaded TCP ACK costing your two ATM 
cells and essentially wasting an entire ATM cell.  But in some situations 
your traffic might be mostly large IP packets and then your waste overhead is 
greatly reduced...)

Anyway, is there any known work on such a scheduler?  I'd be interested in 
beta testing anything under development.

> Ed W
>

___
LARTC mailing list / [EMAIL PROTECTED]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/


<    1   2   3   4   5   6   7   8   9   >