[LARTC] HTB on IMQ

2002-12-05 Thread Thomas Jalsovsky


Hello,

could somebody check my IMQ+HTB config? Is it OK?
/usr/local/sbin/tc qdisc add dev imq0 root handle 1: htb default 10
/usr/local/sbin/tc class add dev imq0 parent 1: classid 1:1 htb rate
1920kbit quantum 500
/usr/local/sbin/tc class add dev imq0 parent 1:1 classid 1:60 htb rate
1024kbit ceil 1024kbit
/usr/local/sbin/tc qdisc add dev imq0 parent 1:60 handle 60: pfifo limit 2
/usr/local/sbin/tc class add dev imq0 parent 1:1 classid 1:40 htb rate
128kbit ceil 128kbit
/usr/local/sbin/tc qdisc add dev imq0 parent 1:40 handle 40: pfifo limit 2
/usr/local/sbin/tc class add dev imq0 parent 1:1 classid 1:10 htb rate
704kbit ceil 1920kbit
/usr/local/sbin/tc qdisc add dev imq0 parent 1:10 handle 10: pfifo limit 2
/usr/local/sbin/tc class add dev imq0 parent 1:1 classid 1:30 htb rate
128kbit ceil 128kbit
/usr/local/sbin/tc qdisc add dev imq0 parent 1:30 handle 30: pfifo limit 2
/usr/local/sbin/tc class add dev imq0 parent 1:1 classid 1:20 htb rate
64kbit ceil 64kbit
/usr/local/sbin/tc qdisc add dev imq0 parent 1:20 handle 20: pfifo limit 2
/usr/local/sbin/tc class add dev imq0 parent 1:1 classid 1:50 htb rate
128kbit ceil 128kbit
/usr/local/sbin/tc qdisc add dev imq0 parent 1:50 handle 50: pfifo limit 2
/usr/local/sbin/tc filter add dev imq0 protocol ip parent 1:0 u32 match ip
dst 192.168.102.128/25 flowid 1:60
/usr/local/sbin/tc filter add dev imq0 protocol ip parent 1:0 u32 match ip
dst 192.168.101.42 flowid 1:40
/usr/local/sbin/tc filter add dev imq0 protocol ip parent 1:0 u32 match ip
dst 192.168.100.0/27 flowid 1:10
/usr/local/sbin/tc filter add dev imq0 protocol ip parent 1:0 u32 match ip
dst 192.168.1.170 flowid 1:10
/usr/local/sbin/tc filter add dev imq0 protocol ip parent 1:0 u32 match ip
dst 192.168.101.38 flowid 1:30
/usr/local/sbin/tc filter add dev imq0 protocol ip parent 1:0 u32 match ip
dst 192.168.101.34 flowid 1:20
/usr/local/sbin/tc filter add dev imq0 protocol ip parent 1:0 u32 match ip
dst 192.168.101.46 flowid 1:50
/usr/local/sbin/iptables -t mangle -A PREROUTING -i eth2 -j IMQ --todev 0
/usr/local/sbin/iptables -t mangle -A POSTROUTING -o eth2 -j IMQ --todev 0


(I;m running on linux-2.4.20 with IMQ patch + iptables-1.2.7a with IMQ and
patched tc).

Why am I asking for this?
I got kernel panic and I don't know what is wrong in my config/system.

Thanks in advance,
Thomas

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



[LARTC] HTB on kernel 2.4.20

2002-12-05 Thread Rimas
Hi,


I have a Linux box with kernel-2.4.20 HTB, IMQ patch + iptables-1.2.7a with
IMQ and patched tc.
I tried to use htb.init script, wondershaper and myshaper
(http://www.ibiblio.org/pub/Linux/docs/HOWTO/other-formats/html_single/ADSL-
Bandwidth-Management-HOWTO.html).
And seems to be the htb doesn't work (doesn't shape a trafic at all)
I get no error messages.

How I may check it what is wrong?

Thank you in advance

Rimas




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



Re: [LARTC] HTB/IMQ troubles (probably)

2002-12-05 Thread Razvan Cosma
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On Wed, 4 Dec 2002, Thomas Jalsovsky wrote:

.. snip ..

 Code: 8b 48 3c 89 d0 03 43 54 39 c1 78 14 39 d1 bf f5 ff ff ff 74
  0Kernel panic: Aiee, killing interrupt handler!
 In interrupt handler - not syncing


Same problem here, until I found that one should (must?) use different
IMQ devices for PREROUTING and POSTROUTING.
HTH

-BEGIN PGP SIGNATURE-
Version: GnuPG v1.2.1 (GNU/Linux)

iD8DBQE970hclDG6Z61nQGIRAnaaAJ9xFoOrPIeQprbZ9jC/8XmCaJIaVACfVEbu
Sh4WUqeahKwqFKADkUYK9+E=
=S6Tn
-END PGP SIGNATURE-

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



Re: [LARTC] HTB/IMQ troubles (probably)

2002-12-05 Thread Thomas Jalsovsky
 .. snip ..
 
  Code: 8b 48 3c 89 d0 03 43 54 39 c1 78 14 39 d1 bf f5 ff ff ff 74
   0Kernel panic: Aiee, killing interrupt handler!
  In interrupt handler - not syncing
 

 Same problem here, until I found that one should (must?) use different
 IMQ devices for PREROUTING and POSTROUTING.
 HTH
Many, many thanks Razvan!!!
It was the problem. I removed one PRE- or POSTROUTING rule and see the
magic: I can't reproduce the kernel panic.

So now the question is:
Is it possible to use the SAME IMQ device for ingress and egress trafffic
(as I tryed to use)? If not, why, and if yes how?

Thank you again,
Thomas

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



Re: [LARTC] CBQ or HTP accuracy

2002-12-05 Thread Thierry Coutelier

I already tried it and it does not improve much the behaviour.

With which parameters should I play in HTB and CBQ ?


Stephane Ouellette wrote:


Thierry Coutelier wrote:



 Hello,

 I am rate limiting traffic going to some IP addresses using CBQ
  (and want to change to HTB sometime).

 While testing with different packet sizes I found out that I could go
 above the
   rate limit I set. (even with HTB)

 The values I use are: rate: 768kbit  weight 77kbit allot 1 avpkt 1512
 I did not change the cell or other parameters.
 My root qdisc is set to 40MBit.

 With those values I am able to go up to 840kbit/s with packets sizes
 of 612 or 1224.
 With other values it's less except for very low values.

 Changing the allot value (If I understood well allot*weight=max
 packets per round)
  it only gets worst (tested with 1000 and 5).

 AVPKT is only used for maxidle so it should not change anything ?

 What values should I tweak to have the max rate never exeeded and
 still be able
   to come very near my max-rate using 1460 bytes packets ?

 Would HTB be more accruate ?


 Thanks for the HELP.

Thierry,

  to my knowledge, HTB is more predictable than CBQ and easier to set up.

  If you want more accuracy,  I suggest you modify a file in the kernel
source:include/net/pkt_sched.h

  Change the #define for PSCHED_CLOCK_SOURCE from PSCHED_JIFFIES to
PSCHED_CPU.

  I've read this suggestion on the list but never tried it yet.  Note
that this is valid only for CPUs that support a TSC (Pentium and up).

Regards,

Stephane



--
Thierry Coutelier  /'\ ASCII Ribbon Campaign
http://www.linux.lu\ / No HTML/RTF in email
.   ×  No Word docs in email
.  / \ Respect for open standards


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



[LARTC] kernel and routing

2002-12-05 Thread Giannhs Panagiotou



First of all sorry for my English.
I wan't to ask a question. It may be 'dummy' but i 
can't find an answer.

Suppose i'm routing with a Linux pc A where is the 
default 'instalation' kernel. 
I'm also routing with a Linux pc B where i have a 
compiled kernel wich is 'smaller' than A's machine kernel.

The question: The router machine B is routing 
faster than A? And the most importand, if yes, why?

Ps. Some links for reading would be usefull. 
Thanks


Re: [LARTC] wiered network problem

2002-12-05 Thread Andrea Rossato
Petru Paler wrote:

http://www.tux.org/lkml/#s14-2


yes indeed!
that was too difficult for me to think to ...

thanx a lot.
Andrea

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



Re: [LARTC] Re: LARTC digest, Vol 1 #907 - 2 msgs

2002-12-05 Thread Stef Coene
On Thursday 05 December 2002 07:40, Brian Capouch wrote:
  From: Stef Coene [EMAIL PROTECTED]
  ;
 
 does it matter that the rate is being reported differently by each
 invocation of tc?
 
  I don't know exactly how the rate is calculated, but I don't think you
  sh= ould=20
  not trust it.
 
 The upload speed of the first runs 252, 258, 254, etc.; on the second
 86, 150, 92, 78, etc.
 
  Is this reported by tc or by iperf ??

 By iperf.

 One little detail, and I guess this is the explaining fact but it's
 interesting to think about why: all the machines reported on here are
 using wireless access.  The two which are working well have no jitter or
 packet loss, but the two that are acting up both have a fair amount of
 jitter, and about 6-8% packet loss because of their being marginal links.

 I'm assuming that is the explanation (I hadn't thoroughly tested the
 link quality before sending that other mail) but I wonder why.  They
 show average throughput well above the rate limits I set when they are
 operating without HTB.
Maybe they are generating more bursts and it's possible that your htb setup 
allows bursts.  So at the long-term, they can get a higher rate.
Otherwise, I don't know.

Stef

-- 

[EMAIL PROTECTED]
 Using Linux as bandwidth manager
 http://www.docum.org/
 #lartc @ irc.oftc.net


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



Re: [LARTC] HTB on kernel 2.4.20

2002-12-05 Thread Stef Coene
On Thursday 05 December 2002 12:18, Rimas wrote:
 Hi,


 I have a Linux box with kernel-2.4.20 HTB, IMQ patch + iptables-1.2.7a with
 IMQ and patched tc.
 I tried to use htb.init script, wondershaper and myshaper
 (http://www.ibiblio.org/pub/Linux/docs/HOWTO/other-formats/html_single/ADSL
- Bandwidth-Management-HOWTO.html).
 And seems to be the htb doesn't work (doesn't shape a trafic at all)
 I get no error messages.

 How I may check it what is wrong?
You can do tc -s -d class show dev eth0 and examine the sent counters.  Are 
they increasing ???

Stef


-- 

[EMAIL PROTECTED]
 Using Linux as bandwidth manager
 http://www.docum.org/
 #lartc @ irc.oftc.net


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



Re: [LARTC] u32 and netfilter

2002-12-05 Thread Stef Coene
On Wednesday 04 December 2002 20:01, James Ma wrote:
 Hi, All,

 My understanding is u32 filter is very powerful filter and could do
 anything about IP header filtering, then why do we sometimes use
 netfilering in IPtables? One advantege I guess is in netfilering, there is
 usage counter? Are there other advantges using netfilter (such as delay,
 flexibility)? What is the disadvantages to us Netfilter?

 In summary, what are the considerations to select u32 or netfilter as
 classifier for QoS?
I'm not sure, but I think matching a u32 filter is based on a tree-like 
structure.  The fw filter can be faster on the filter part if you use the 
mark as minor number.  But you still have a lot of iptables rules to test.  
And I think you have to test them 1 by 1.
So I think the fw filter will be slower.

Stef

-- 

[EMAIL PROTECTED]
 Using Linux as bandwidth manager
 http://www.docum.org/
 #lartc @ irc.oftc.net


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



Re: [LARTC] HTB on kernel 2.4.20

2002-12-05 Thread Rimas
Stef,

Then I use tc -s -d class show dev eth0 - yes the sent counters are
increasing.
myshaper script have missed ( iptables -t mangle -A MYSHAPER-IN -j
IMQ this part --todev 1)  and so I can shape incooming and outgoing trafic
without any problems.
Thank you for the command tc -s -d class show dev eth0.

But I still cannot use htb.init script (like you know it is much easer to
use it, write rules)
How I may check that problem?

Best Regards

Rimas



- Original Message - 
From: Stef Coene [EMAIL PROTECTED]
To: Rimas [EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Thursday, December 05, 2002 5:04 PM
Subject: Re: [LARTC] HTB on kernel 2.4.20


 On Thursday 05 December 2002 12:18, Rimas wrote:
  Hi,
 
 
  I have a Linux box with kernel-2.4.20 HTB, IMQ patch + iptables-1.2.7a
with
  IMQ and patched tc.
  I tried to use htb.init script, wondershaper and myshaper
 
(http://www.ibiblio.org/pub/Linux/docs/HOWTO/other-formats/html_single/ADSL
 - Bandwidth-Management-HOWTO.html).
  And seems to be the htb doesn't work (doesn't shape a trafic at all)
  I get no error messages.
 
  How I may check it what is wrong?
 You can do tc -s -d class show dev eth0 and examine the sent counters.
Are
 they increasing ???

 Stef


 -- 

 [EMAIL PROTECTED]
  Using Linux as bandwidth manager
  http://www.docum.org/
  #lartc @ irc.oftc.net


 ___
 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 on IMQ

2002-12-05 Thread Jose Luis Domingo Lopez
On Thursday, 05 December 2002, at 10:04:23 +0100,
Thomas Jalsovsky wrote:

   could somebody check my IMQ+HTB config? Is it OK?
 Why am I asking for this?
 I got kernel panic and I don't know what is wrong in my config/system.
 
Kernel panics are not the consequence of bad configuration on the user
or administrator part (except attempts to overflow some kernel buffer to
do Very Bad Things (tm)).

If the kernel crashes, process the resulting panic() through ksymoops to
decode the functions and symbols, and post it to the appropiate mailing
list. It will be a bug from some developer, not you :-)

Hope it helps.

-- 
Jose Luis Domingo Lopez
Linux Registered User #189436 Debian Linux Woody (Linux 2.4.20-xfs)
___
LARTC mailing list / [EMAIL PROTECTED]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/



Re: [LARTC] HTB on kernel 2.4.20

2002-12-05 Thread Stef Coene
On Thursday 05 December 2002 21:17, Rimas wrote:
 Stef,

 When I tried to use htb.init script I just took example files:
 eth0, eth0-2.root, eth0-2:10.www, eth0-2:20.smtp, eth0-2:30.dfl
 But htb.init makes nothing.
 If I use the htb.init script and execute that show command, the counters
 not increasing.
 Because there are no created classes.
I think you have a htb.init configuration problem and I can't help you with 
that.  Try to contact the author and/or read the docs again.  Maybe there is 
a special htb.init mailing list.

Stef

-- 

[EMAIL PROTECTED]
 Using Linux as bandwidth manager
 http://www.docum.org/
 #lartc @ irc.oftc.net

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



[LARTC] questions with Stef's scripts

2002-12-05 Thread James Ma



Hi, Stef,

I have some questions withyour following 
scripts on www.docum.org,

BW1=$1'kbps'
BW2=`expr 100 - $1`
BW2=$BW2'kbps'

tc qdisc del dev eth0 root handle 1:

tc qdisc add dev eth0 root handle 1: htb default 12
tc class add dev eth0 parent 1: classid 1:1 htb rate 100kbps ceil 100kbps burst 2k
tc class add dev eth0 parent 1:1 classid 1:10 htb rate $BW1 ceil 100kbps burst 2k
tc class add dev eth0 parent 1:1 classid 1:11 htb rate $BW2 ceil 100kbps burst 2k

tc filter add dev eth0 parent 1: protocol ip prio 3 handle 1 fw classid 10:10
tc filter add dev eth0 parent 1: protocol ip prio 3 handle 2 fw classid 10:11

iptables -F
iptables -X
iptables -N acc_0
iptables -N acc_1
iptables -A OUTPUT -t mangle -p tcp --dport 2000 -j MARK --set-mark 1
iptables -A OUTPUT -t mangle -p tcp --dport 2001 -j MARK --set-mark 2
iptables -A OUTPUT -p tcp --dport 2000 -j acc_0
iptables -A OUTPUT -p tcp --dport 2001 -j acc_1
	My questions are as follow,1.Why the classid in tc filter are "10:10 and 10:11" instead of "1:10 and 1:11"? How can you associate the filters with the classes you defined before?2.What does "fw" before "classid" in tc filter mean? Does it refer to forward chain?3.I guess the "handle 1" in tc filter refer to "mark1" in iptables, am I right? But is there any sequence problem to define handle 1 first and mark1 later in the scripts?4.Where can I find procedure on how to install HTB and compile kernel to use it?Your answer will be much appreciated,Regards,James


[LARTC] flowid and classid

2002-12-05 Thread James Ma



Hi, All,

Ihave aclass 1:10,it seems if 
Iusenetfilter mark as classifier, then the class will be refered as 
classid 1:10, however, if I use u32 as classifer, then the class should be 
refered as flowid 1:10, is it right?

Thanks in advance,

James