[LARTC] HTB and message 'RTNETLINK answers: Invalid argument'

2004-03-28 Thread Patrick Spousta
I wish to use HTB shapper with ESFQ scheduler per class. Kernel patched, 
compiled and reinstaled with all needed modules. Package iproute is also 
patched, compiled and this 'new' version is installed.

When I tried assign HTB as root qdisc with the 'new' tc I got message

[EMAIL PROTECTED]:/etc/init.d# tc qdisc add dev eth2 root handle 1: htb default 12
RTNETLINK answers: Invalid argument
[EMAIL PROTECTED]:/etc/init.d#
BUT when I do the same with original tc (I doesn't support ESFQ), 
everything is ok

[EMAIL PROTECTED]:/etc/init.d# /usr/local/sbin/tc qdisc add dev eth2 root 
handle 1: htb default 12
[EMAIL PROTECTED]:/etc/init.d#

Sources for ESFQ patching I take from Debian sources 
(iproute_20010824.orig.tar.gz, iproute_20010824-8.diff.gz and 
iproute_20010824-8.dsc). I hope it sources are the same version as 
original (Debian binary) iproute package.

When I tried apply HTB3.6 patch to iproute sources I got message, that 
the patch is already used.

Do anybody know where is problem?

Patrick

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


Re: [LARTC] newbie questions

2004-03-28 Thread Stef Coene
On Thursday 25 March 2004 22:00, Paul Albert wrote:
 Hi all -



 I've been reading for the past day or so about the traffic control that
 is built into linux.  I have a situation that I have not seen
 documented, and I'm wondering how to handle this.



 I would like to have a group of users get a certain amount of bandwidth
 in both inbound and outbound directions on our firewalling bridge.  I
 know that I can group users together to the same qdisc by marking their
 packets through iptables to enforce egress qos.  However, I'm not sure
 how to go about doing this in an inbound direction.  Initially, I was
 thinking that I could use HTB, but this doesn't allow me to shape in
 both directions (correct?).
Indeed.  You can only shape outgoing traffic.  But you can use a router or a 
bridge and shape on both nterfaces.

 The other part that is a bit confusing to me is that I would like to
 aggregate both inbound and outbound traffic to a single number, say
 1Mbps.  Could I use IMQ to tie the interfaces eth0 and eth1 together to
 achieve this?  Is there another solution that would satisfy this
 requirement?
You can indeed use IMQ, but it can crash rour system (I don't exactly know 
what can go wrong, but I think you can not drop locally generated packets in 
the IMQ device)

Stef

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


Re: [LARTC] IP Masquerade issues

2004-03-28 Thread Stef Coene
On Wednesday 24 March 2004 18:45, Mario wrote:
 Okay here is my setup:

 Gentoo Box running 2.6.4 w/ 4 NICs
 1 NIC is for internal network
 3 NICs are for external network

 The machine has a static address assigned to the internal network nic. This
 nic runs dhcp and dns forwarding. The other 3 nics have external dynamic IP
 addresses. All will have the same gateway. There are 3 NICs because this is
 a very large pipe, that will only allocate a certain ammount to each client
 ( NIC ).

 The way i set this up is so that internal network clients will be routed
 through the 3 nics with their packets sent out in a round robin sort of
 fashion. I found a few sites explaining a bit about how to do this, and the
 current setup i found that somewhat works is this:

 A virtual device teql0 is created:
 This virtual device teql0 is an imaginary device using QoS Trivial link
 equalizer (TeQL). It has a static ip address assigned to it. If you attempt
 to ping it from another machine, you wont necessarily be pinging the same
 network card every time.
teql can only be used if you control both sides of the link.  There is a 
chapter in the lartc howto on load balancing that can help you.

Stef

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


Re: [LARTC] R2Q and more

2004-03-28 Thread Stef Coene
On Wednesday 24 March 2004 16:46, Mihai Vlad wrote:
 Hello again,

 I have several questions:

 Let's take a real case example...
 A connection of 256kbit split among some clients (8kbit RATE, 1500 QUANTUM
 - set manually).
 I use esfq to split the bandwidth as fair as possible.

 Q1.   What happens if the SUM of all the clients' class RATE (+ the
 default class RATE) is smaller than 256kbit? Will HTB work correctly?
Yes.

 Q2.   What happens if the SUM of all the clients' class RATE (+ the
 default class RATE) is bigger than 256kbit? Will HTB work correctly?
Yes.

 Q3.   What happens if the ISP does not guarantee a full 256kbit
 bandwidth?
 (Suppose that I set my Linux box to shape 256kbit and my ISP provides me
 only 128kbit during high-traffic hours). Will HTB work correctly?
Yes.

 Q4.   As far as I understood R2Q means the ratio between the RATE and the
 QUANTUM of a class... Which is more powerful? The RATE, or the QUANTUM?
 (e.g. ClassA---QUANTUM 3000---RATE 8kbit, or
   ClassB---QUANTUM 1500---RATE 16kbit)
r2q is used to calculate the default quantum of a class: quantum = rate / r2q
But you can overrule this default quantum when you add a class.

 Q5.   The HTB Manual says that the sum of the LEAF CLASSES RATE must be
 equal to the PARENT CLASS RATE. Is there such a rule for QUANTUMS?
No.

Stef

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


Re: [LARTC] R2Q and more

2004-03-28 Thread Roy
I would not agree to the half of your statments.


On Wednesday 24 March 2004 16:46, Mihai Vlad wrote:
 Hello again,

 I have several questions:

 Let's take a real case example...
 A connection of 256kbit split among some clients (8kbit RATE,
1500 QUANTUM
 - set manually).
 I use esfq to split the bandwidth as fair as possible.

 Q1. What happens if the SUM of all the clients' class RATE (+
the
 default class RATE) is smaller than 256kbit? Will HTB work
correctly?
Yes.
-
this is correct

 Q2. What happens if the SUM of all the clients' class RATE (+
the
 default class RATE) is bigger than 256kbit? Will HTB work
correctly?
Yes.

This is incorrect:
of course it will work more or less, but nearly same as without any shaping


 Q3. What happens if the ISP does not guarantee a ''full
256kbit''
 bandwidth?
 (Suppose that I set my Linux box to shape 256kbit and my ISP
provides me
 only 128kbit during high-traffic hours). Will HTB work
correctly?
Yes.
-
For certain this is wrong, I dont understand why you say so, because
everybody knows that you must limit ceil to a bit lover than you get from
isp
if you have unknown trafic you cant limit it.


 Q4. As far as I understood R2Q means the ratio between the RATE
and the
 QUANTUM of a class... Which is more ''powerful''? The
RATE, or the QUANTUM?
 (e.g. ClassA---QUANTUM 3000---RATE 8kbit, or
 ClassB---QUANTUM 1500---RATE 16kbit)
r2q is used to calculate the default quantum of a class: quantum =ate / r2q
But you can overrule this default quantum when you add a class.
--
quantum is more powerfull and usefull. since rate of 8kbit is insignificant
speed anyway
but it may be harder to calculate( didt tested if quantum can completely
replace rate effect)
in your example class A will get 2 times more bandwitch than class B

 Q5. The HTB Manual says that the sum of the LEAF CLASSES RATE
must be
 equal to the PARENT CLASS RATE. Is there such a rule for
QUANTUMS?
No

seems correct,
htb manual says nonsense,
neither rates nether quantums need to be equal,
but child sum rates and quantums ONLY SHOULD be less or equal to parent.
quantums for schild basicaly should be not higer than parent quantums, else
result may be starange.

this indirectly may affect the statment from htb manual, because rate affect
quantums.
and if one child will consume all its parent quantum then other childs may
get nothing.

Stef

-- 
[EMAIL PROTECTED]
''Using Linux as bandwidth manager''
http://www.docum.org/
#lartc @ irc.openprojects.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/


[LARTC] IMQ iptables 1.2.9

2004-03-28 Thread Joan Fuster Monzó
Hi all, I found in http://trash.net/~kaber/imq/index.html#sources the
precompiled iptables shared libs for 1.2.6  1.2.5, but my version is
1.2.9 (in Debian Sid) and I don't know how to patch the .deb file. I
need the -j IMQ target... ¿What can I do?

Thanks!


signature.asc
Description: Esta parte del mensaje =?ISO-8859-1?Q?est=E1?= firmada	digitalmente


[LARTC] RE: Re: IP Masquerade Issues

2004-03-28 Thread Mario
teql can only be used if you control both sides of the link.  There is a=20
chapter in the lartc howto on load balancing that can help you.

I think you are referring to 4.2.2 where they refer to load balancing -
however that seems to be route based.  The setup I have - all three machines
actually use the same gateway,  but the gateway will only allow a certain
amount of traffic over any given interface, so several interfaces are used.

Thus every interface will give the same route - so won't I run into issues
by doing it this way?

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


RE: [LARTC] R2Q and more

2004-03-28 Thread Mihai Vlad
Thanks for your answers!

I played with some values and I might add something. Please tell me if I am
wrong.

Overruling the QUANTUM parameter in a LEAF class makes the RATE parameter
useless. From my opinion QUANTUM is the parameter that is the most relevant.


e.g.CLASS A - RATE 64kbit - QUANTUM 1500
CLASS B - RATE  8kbit - QUANTUM 3000

Class B gets twice the bandwidth that CLASS A receives. RATE is useless in
this case.

So you might establish some sort of a rule that the ratio of QUANTUMS equals
the ratio of the (real) RATEs of 2 LEAF CLASSES. BUT that is also wrong if
the ratio is bigger that 2-3. 

e.g.CLASS A QUANTUM 1500
CLASS B QUANTUM 6000

You would expect CLASS B to get 4 times the bandwidth that CLASS A gets. But
in fact ... the Ratio is somewhere around 2.8-3.0. (These tests were made on
a 256 kilobit bandwidth).


I agree that it is very important to set the RATE of the parent CLASS below
the value of the bandwidth. In my case - for a 256kbit bandwidth from my
ISP, 240kbit RATE works excellent



There is still a problem remained unsolved for me. 
(My connection works excellent after 6.00 PM until 10.00 AM. During the day
my ISP establishes some rules in which the connection is shared among some
clients.) You cannot tell the exact value of the bandwidth during the day.
It is very bursty. You might download with 240kbit for 1 minute and after
that the bandwidth might get to 64kbit, etc...

So I do not have a standard connection. Is it possible to split that
bursty bandwidth (as unpredictable as it is) among my friends in my LAN? 
I use esfq. Is there a way that HTB can auto-sense the parameters of the
bandwidth and reconfigure itself? I know that sounds real funny, but for me
it would be a dream to have such a traffic shaper. I do not have enough
money to buy a straight 256kbit connection :( 


Thanks again,

Mihai Vlad   



-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
Behalf Of Stef Coene
Sent: Monday, March 29, 2004 12:05 AM
To: [EMAIL PROTECTED]
Subject: Re: [LARTC] R2Q and more

On Sunday 28 March 2004 21:18, Roy wrote:
  Q2. What happens if the SUM of all the clients' class RATE (+
 the
  default class RATE) is bigger than 256kbit? Will HTB work
 correctly?
 Yes.
 
 This is incorrect:
 of course it will work more or less, but nearly same as without any 
 shaping
It will work more then you think.  On the short term, traffic can be bursty
for the different classes, but each one will belimited to 8kbit.  But on the
long term, each class will get the same share of bandwidth.

  Q3. What happens if the ISP does not guarantee a ''full
 256kbit''
  bandwidth?
  (Suppose that I set my Linux box to shape 256kbit and my ISP
 provides me
  only 128kbit during high-traffic hours). Will HTB work
 correctly?
 Yes.
 -
 For certain this is wrong, I dont understand why you say so, because 
 everybody knows that you must limit ceil to a bit lover than you get 
 from isp if you have unknown trafic you cant limit it.
Ok, my error.  I forgot about the make sure YOU are the bottlleneck.  I
thought it was a variant on question Q2.

  Q4. As far as I understood R2Q means the ratio between the RATE
 and the
  QUANTUM of a class... Which is more ''powerful''? The
 RATE, or the QUANTUM?

  (e.g. ClassA---QUANTUM 3000---RATE 8kbit, or ClassB---QUANTUM 
  1500---RATE 16kbit)

 r2q is used to calculate the default quantum of a class: quantum =ate 
 / r2q But you can overrule this default quantum when you add a class.
 --
 quantum is more powerfull and usefull. since rate of 8kbit is 
 insignificant speed anyway but it may be harder to calculate( didt 
 tested if quantum can completely replace rate effect) in your example 
 class A will get 2 times more bandwitch than class B
To be correct, it also depends on the packet size.  If you have packets of
1499 bytes in class B and 1500 bytes in class A, both class will get the
same rate.  Why?  Quantum for class B is 1500, so you can send 2 packets and
these
2 packets are counted as 1500 bytes.

  Q5. The HTB Manual says that the sum of the LEAF CLASSES RATE
 must be
  equal to the PARENT CLASS RATE. Is there such a rule for
 QUANTUMS?
 No
 
 seems correct,
 htb manual says nonsense,
 neither rates nether quantums need to be equal, but child sum rates 
 and quantums ONLY SHOULD be less or equal to parent.
 quantums for schild basicaly should be not higer than parent quantums, 
 else result may be starange.
I'm not sure but, isn't quanum only used for leaf classes?  So the quantum
of parent classes doesn't mather ?

Stef

--
[EMAIL PROTECTED]
 Using Linux as bandwidth manager
     http://www.docum.org/
     #lartc @ irc.openprojects.net
___
LARTC mailing list / [EMAIL PROTECTED]