[LARTC] How to make external loopback with 2 interfaces

2002-06-05 Thread David Müller

Hello

For testing purposes, i would like to make a connection between 2 
network interfaces on the same machine.

For example, i have eth0 (10.0.0.100) and eth1 (10.0.0.101) and would 
like to have the traffic going on the wire, not just taking the 
shortcut inside the protocol stack.

I have played around a little bit with the routing table, but did not 
succeed.

Does Linux and/or the associated network tools support such strange 
requirements and if yes how to i setup the routing table?

TIA

Dave

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



Re: [LARTC] How to make external loopback with 2 interfaces

2002-06-05 Thread Amit Kucheria

You would have to hack the IP layer for that AFAIK.

I need the same thing for a device driver I am writing and the only way to 
do this seem to be bypassing the IP layer optimization which basically 
says If the destination IP is one of my interfaces, pick up pkt from xmit 
queue and put it in recv queue

ciao,
Amit

On Wed, 5 Jun 2002, David Müller wrote:

 Hello
 
 For testing purposes, i would like to make a connection between 2 
 network interfaces on the same machine.
 
 For example, i have eth0 (10.0.0.100) and eth1 (10.0.0.101) and would 
 like to have the traffic going on the wire, not just taking the 
 shortcut inside the protocol stack.
 
 I have played around a little bit with the routing table, but did not 
 succeed.
 
 Does Linux and/or the associated network tools support such strange 
 requirements and if yes how to i setup the routing table?
 
 TIA
 
 Dave
 
 ___
 LARTC mailing list / [EMAIL PROTECTED]
 http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
 

-- 
I'm an angel!!! Honest!
The horns are just there to hold the halo up straight.
^-^-^-^-^-^-^-^-^-^-^-^-^-^-^-^-^-^-^-^-^-^-^-^-^-^-^
  Amit Kucheria
  EECS Grad. Research Assistant
 University of Kansas @ Lawrence
   (R): +1-785-830-8521 ||| (C): +1-785-760-2871


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



[LARTC] Bandwidth allocation by IP

2002-06-05 Thread Vladimir Trebicky

I have a LAN (eth1) and 1Mbit internet which is very unstable (from
100kbit - 2mbit) on eth0. I would like to prevent ip A downloading with 9
threads taking 90% bandwidth and ip B downloading with 1 thread  taking 10%.
I would like ip A as well as ip B to have each 50% of bandwith no care how
many threads they are downloading. I suppose that it could be done on eth1.
But how?
Second problem: I want to lessen round-trips. Should I do it with priorizing
small packets on eth0? How?
I have 2.4.18, iproute2 with extra htb. PSCHED_JIFFIES (unfortunately - it's
only AMD 160MHz and does not have TSC)

Thanks

--
Vladimir Trebicky
[EMAIL PROTECTED]


---
Odchozi zprava neobsahuje viry.
Zkontrolovno antivirovm systmem AVG (http://www.grisoft.cz).
Verze: 6.0.368 / Virov bze: 204 - datum vydn: 29.5.2002

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



[LARTC] New Qdisc

2002-06-05 Thread alouini khalif

I want to creat a new qdisc ,i'm using red hat 7.2

if i do this (new qdisc) i think that i have to write
only the function that are related with qdisc as
enqueue,dequeue,drop,requeue?

in addition, how can i integreted this new qdisc in
the Iproute2, how can i do this link? and whitch file
i have to change or to update???





___
Do You Yahoo!? -- Une adresse @yahoo.fr gratuite et en français !
Yahoo! Mail : http://fr.mail.yahoo.com
___
LARTC mailing list / [EMAIL PROTECTED]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/



Re: [LARTC] Bandwidth allocation by IP

2002-06-05 Thread Alexey Talikov

Try WRR on eth1 see http://wipl-wrr.sourceforge.net/ for details
or use ESFQ
see mail from Alexander Atanasov 05.06.2002 
I rename files gzip its and attach to this mail but don't change anything
patch kernel and tc
cd iproute2
patch -p1  ../esfq-tc.diff
cd linux-2.4.18
patch -p1  ../esfq-2.4.18.diff
recompile kernel and tc thats all !!
see README
Note it give you equal division for a long term not at the moment 
Example: 

tc qdisc add dev eth1 root handle 1:0 esfq hash src

It make equal priority for session based on ip address not tcp session like classic SFQ
For detail see SFQ 
05.06.2002 15:34:05, Vladimir Trebicky [EMAIL PROTECTED] wrote:

I have a LAN (eth1) and 1Mbit internet which is very unstable (from
100kbit - 2mbit) on eth0. I would like to prevent ip A downloading with 9
threads taking 90% bandwidth and ip B downloading with 1 thread  taking 10%.
I would like ip A as well as ip B to have each 50% of bandwith no care how
many threads they are downloading. I suppose that it could be done on eth1.
But how?
Second problem: I want to lessen round-trips. Should I do it with priorizing
small packets on eth0? How?
I have 2.4.18, iproute2 with extra htb. PSCHED_JIFFIES (unfortunately - it's
only AMD 160MHz and does not have TSC)

Thanks

--
Vladimir Trebicky
[EMAIL PROTECTED]


---
Odchozi zprava neobsahuje viry.
Zkontrolovno antivirovm systmem AVG (http://www.grisoft.cz).
Verze: 6.0.368 / Virov bze: 204 - datum vydn: 29.5.2002

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


---
mailto:[EMAIL PROTECTED]
BR
Alexey Talikov
FORTEK
---



esfq.tar.gz
Description: GNU Zip compressed data


Re: [LARTC] New Qdisc

2002-06-05 Thread Stef Coene

On Wednesday 05 June 2002 12:35, alouini khalif wrote:
 I want to creat a new qdisc ,i'm using red hat 7.2

 if i do this (new qdisc) i think that i have to write
 only the function that are related with qdisc as
 enqueue,dequeue,drop,requeue?

 in addition, how can i integreted this new qdisc in
 the Iproute2, how can i do this link? and whitch file
 i have to change or to update???
Maybe you can take a look at the htb qdisc to see how it's done :
http://luxik.cdi.cz/~devik/qos/htb/

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] Bandwidth allocation by IP

2002-06-05 Thread Alexander Atanasov

Hi there!

On Wed, 05 Jun 2002 16:19:41 +0500
Alexey Talikov [EMAIL PROTECTED] wrote:

 I rename files gzip its and attach to this mail but don't change
 anything patch kernel and tc

I'll put them somewhere on the web tonight and provide an url.

 Note it give you equal division for a long term not at the moment 
 Example: 
 
 tc qdisc add dev eth1 root handle 1:0 esfq hash src
 
 It make equal priority for session based on ip address not tcp session
 like classic SFQ For detail see SFQ 

Note that sfq is on egress and client IPs are destinations, not sources,
so you should use dst hash to divide bandwidth between clients, if you use src hash 
you have equal priority on server flows not on clients ones: client A downloads from 
server X and from server Y, client B downloads from server Z - you have bandwidth 
devided to X:Y:Z, not A:B, since downloads are coming from X/Y/Z(source) to 
A/B(destination).

--
have fun,
alex
P.S. Thank you for the feedback and trying it. :)
___
LARTC mailing list / [EMAIL PROTECTED]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/



[LARTC] Problems with routes

2002-06-05 Thread Alexander Brill

Whenever I try to 'readd' a route I receive an error and I can't figure
out why...

# Add some routes
ip route add $EXT via $INT
ip route add prio 320 from $INT nat $EXT
# Delete them
ip route del from $INT nat $EXT
ip route del $EXT via $INT
# Add again
ip route add $EXT via $INT
ip route add prio 320 from $INT nat $EXT

The last command exits with exit-code '2' and the message:
RTNETLINK answers: Invalid argument

What am I doing wrong?

-- 
Alexander Brill [EMAIL PROTECTED]
http://www.project23.no
PGP-key: http://alexb.egil.org/key.pub



signature.asc
Description: This is a digitally signed message part


Re: [LARTC] New Qdisc

2002-06-05 Thread Martin Devera

And also if you feel to be able to write new qdisc then
I'd expect that you are able to find places to rewrite quickly.
As Stef suggested, in HTB patch you will see all modified
files.
devik

On Wed, 5 Jun 2002, Stef Coene wrote:

 On Wednesday 05 June 2002 12:35, alouini khalif wrote:
  I want to creat a new qdisc ,i'm using red hat 7.2
 
  if i do this (new qdisc) i think that i have to write
  only the function that are related with qdisc as
  enqueue,dequeue,drop,requeue?
 
  in addition, how can i integreted this new qdisc in
  the Iproute2, how can i do this link? and whitch file
  i have to change or to update???
 Maybe you can take a look at the htb qdisc to see how it's done :
 http://luxik.cdi.cz/~devik/qos/htb/

 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/



Re: [LARTC] Bandwidth allocation by IP

2002-06-05 Thread Alexey Talikov

use latest version iproute2-2.4.7-now-ss020116-try
it work without problem (for me)
esfq is more simple in configuration that wrr 
but in wrr more features for traffic control
and its use another principle
read more about WRR and also see doc in package wrr and
see http://docum.org/. 

05.06.2002 18:09:07, Vladimir Trebicky [EMAIL PROTECTED] wrote:

That sound like something what I exactly need.
1) what is the difference (adv  disadv) between esfq and wrr?
2) little problem in attachment, I don't know what to do. I tried latest
(that 2002-try) and latest stable version (ss010824).


 Try WRR on eth1 see http://wipl-wrr.sourceforge.net/ for details
 or use ESFQ
 see mail from Alexander Atanasov 05.06.2002
 I rename files gzip its and attach to this mail but don't change anything
 patch kernel and tc
 cd iproute2
 patch -p1  ../esfq-tc.diff
 cd linux-2.4.18
 patch -p1  ../esfq-2.4.18.diff
 recompile kernel and tc thats all !!
 see README
 Note it give you equal division for a long term not at the moment
 Example:

 tc qdisc add dev eth1 root handle 1:0 esfq hash src

 It make equal priority for session based on ip address not tcp session
like classic SFQ
 For detail see SFQ
 05.06.2002 15:34:05, Vladimir Trebicky [EMAIL PROTECTED] wrote:

 I have a LAN (eth1) and 1Mbit internet which is very unstable (from
 100kbit - 2mbit) on eth0. I would like to prevent ip A downloading with 9
 threads taking 90% bandwidth and ip B downloading with 1 thread  taking
10%.
 I would like ip A as well as ip B to have each 50% of bandwith no care
how
 many threads they are downloading. I suppose that it could be done on
eth1.
 But how?
 Second problem: I want to lessen round-trips. Should I do it with
priorizing
 small packets on eth0? How?
 I have 2.4.18, iproute2 with extra htb. PSCHED_JIFFIES (unfortunately -
it's
 only AMD 160MHz and does not have TSC)
 
 Thanks
 
 --
 Vladimir Trebicky
 [EMAIL PROTECTED]
 
 
 ---
 Odchozi zprava neobsahuje viry.
 Zkontrolov?no antivirov?m syst?mem AVG (http://www.grisoft.cz).
 Verze: 6.0.368 / Virov? b?ze: 204 - datum vyd?n?: 29.5.2002
 
 ___
 LARTC mailing list / [EMAIL PROTECTED]
 http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
 

 ---
 mailto:[EMAIL PROTECTED]
 BR
 Alexey Talikov
 FORTEK
 ---



---
Odchozi zprava neobsahuje viry.
Zkontrolov?no antivirov?m syst?mem AVG (http://www.grisoft.cz).
Verze: 6.0.368 / Virov? b?ze: 204 - datum vyd?n?: 29.5.2002



---
mailto:[EMAIL PROTECTED]
BR
Alexey Talikov
FORTEK
---


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



[LARTC] incompabilities with different routing tables and ipv6?

2002-06-05 Thread Gabriel Paues

Hello!

I've checked in the LARTC-guide on how to let different traffic take
different routes depending on the port. I've managed to do the same for
the TOS-flag. Now I want to do the same thing with IPv6. When I try to
add a new default gateway to the table host2.out I do the following:

# echo 201 host2.out  /etc/iproute2/rt_tables
# ip rule add fwmark 1 table host2.out
# ip -6 route add default via fec0::195.96.98.253 dev eth1 table
host2.out

The interesting part is the last statement. I want to use different
tables with IPv6. When I do:
# ip -6 route ls table host2.out
it returns nothing
When I do:
# ip -6 route add default via fec0::195.96.98.253 dev eth1 table
host2.out
I get:
RNETLINK: File already exists

My conclusion is that somehow the entry is registred but wont show. My
question is:

Is there any incompabilities between different routing tables and IPv6?

Sincerily,

Gabriel Paues
Swedish Institue of Computer Science

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



[LARTC] SFQ buckets/extensions

2002-06-05 Thread Don Cohen


  ... What if SFQ were to start with a minimal number of buckets, and
  track how 'deep' each bucket was, then go to a larger number of bits
  (2/4 at a time?) if the buckets hit a certain depth?  Theoretically,
  this would mean that 'fairness' would be achieved more often in current
  collision situations but that a smaller number of buckets would be
  necessary to achieve fairness in currently low-collision situations.
  
  I haven't looked at the SFQ code in a while, so I don't know how much
  benefit this would be in terms of processing time, or even how expensive
  it would be to change hash sizes on the fly, but at a certain level of
  resolution (+/- 2-4 bits), the changes wouldn't be terribly frequent
  anyway.

A few reactions:
- The only runtime cost of lots of buckets is a small amount of
storage for each bucket.  Allocating buckets at runtime also
introduces the problem that you could run out of space.
- There's no advantage to having many more buckets that the number 
of packets you're willing to queue, which is typically only on the
order of a few hundred.

 extensions
  And all the discussions tend to lead to the conclusion that there should
  be an sfq option (when the queue is created) for:
   a) how big the hash is
   b) whether to take into account source ports or not
   c) whether to take into account destination ports or not
   d) etc. :)
  
  Maybe someone who's written a qdisc would feel up to this?

I've been hoping to get to it, since I have other stuff I'd like to
incorporate into a new sfq version.  

  From: Alexander Atanasov [EMAIL PROTECTED]
   I've done some in this direction , probably needs more work, and
  it's poorly tested - expect b00ms ;)
   
   This adds a new qdisc for now - esfq which is a 100% clone of
  original sfq.
   - You can set all sfq parameters: hash table size, queue depths,
  queue limits.
   - You can choose from 3 hash types: original(classic), dst ip, src
  ip.
   Things to consider: perturbation with dst and src hashes is not
  good IMHO, you can try with perturb 0 if it couses trouble.
  
   Please, see the attached files.
  
   Plaing with it gives interesting results:  
   higher depth - makes flows equal slower
   small depth  - makes flows equal faster
   limit kills big delays when set at about 75-85% of depth.

I don't understand what these last three lines mean.  Could you
explain?

  
   Needs testings and mesurements - that's why i made it
  separate qdisc and not a patch over sfq, i wanted to compare both.
  
   Any feedback good or bad is welcome. 

I'll send you my current module, also a variant of SFQ.  It contains
doc that I think is worth including, also changes some of the code to
be more understandable, separates the number of packets allowed in the
queue from the number of buckets, supports the time limit (discussed
in earlier messages), controls these things via /proc, maybe a few
other things I'm forgetting.  This version does not support hashing on
different properties of the packet, cause it uses a totally different
criterion for identifying subclasses of traffic.  You can discard
that and restore the sfq hash with your modifications.  I think (hope)
these changes are pretty much independent.
___
LARTC mailing list / [EMAIL PROTECTED]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/



Re: [LARTC] Bandwidth allocation by IP

2002-06-05 Thread Martin Devera

ESFQ !? Did I missed something ? :-)
devik

On Wed, 5 Jun 2002, Alexey Talikov wrote:

 use latest version iproute2-2.4.7-now-ss020116-try
 it work without problem (for me)
 esfq is more simple in configuration that wrr
 but in wrr more features for traffic control
 and its use another principle
 read more about WRR and also see doc in package wrr and
 see http://docum.org/.

 05.06.2002 18:09:07, Vladimir Trebicky [EMAIL PROTECTED] wrote:

 That sound like something what I exactly need.
 1) what is the difference (adv  disadv) between esfq and wrr?
 2) little problem in attachment, I don't know what to do. I tried latest
 (that 2002-try) and latest stable version (ss010824).
 
 
  Try WRR on eth1 see http://wipl-wrr.sourceforge.net/ for details
  or use ESFQ
  see mail from Alexander Atanasov 05.06.2002
  I rename files gzip its and attach to this mail but don't change anything
  patch kernel and tc
  cd iproute2
  patch -p1  ../esfq-tc.diff
  cd linux-2.4.18
  patch -p1  ../esfq-2.4.18.diff
  recompile kernel and tc thats all !!
  see README
  Note it give you equal division for a long term not at the moment
  Example:
 
  tc qdisc add dev eth1 root handle 1:0 esfq hash src
 
  It make equal priority for session based on ip address not tcp session
 like classic SFQ
  For detail see SFQ
  05.06.2002 15:34:05, Vladimir Trebicky [EMAIL PROTECTED] wrote:
 
  I have a LAN (eth1) and 1Mbit internet which is very unstable (from
  100kbit - 2mbit) on eth0. I would like to prevent ip A downloading with 9
  threads taking 90% bandwidth and ip B downloading with 1 thread  taking
 10%.
  I would like ip A as well as ip B to have each 50% of bandwith no care
 how
  many threads they are downloading. I suppose that it could be done on
 eth1.
  But how?
  Second problem: I want to lessen round-trips. Should I do it with
 priorizing
  small packets on eth0? How?
  I have 2.4.18, iproute2 with extra htb. PSCHED_JIFFIES (unfortunately -
 it's
  only AMD 160MHz and does not have TSC)
  
  Thanks
  
  --
  Vladimir Trebicky
  [EMAIL PROTECTED]
  
  
  ---
  Odchozi zprava neobsahuje viry.
  Zkontrolov?no antivirov?m syst?mem AVG (http://www.grisoft.cz).
  Verze: 6.0.368 / Virov? b?ze: 204 - datum vyd?n?: 29.5.2002
  
  ___
  LARTC mailing list / [EMAIL PROTECTED]
  http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
  
 
  ---
  mailto:[EMAIL PROTECTED]
  BR
  Alexey Talikov
  FORTEK
  ---
 
 
 
 ---
 Odchozi zprava neobsahuje viry.
 Zkontrolov?no antivirov?m syst?mem AVG (http://www.grisoft.cz).
 Verze: 6.0.368 / Virov? b?ze: 204 - datum vyd?n?: 29.5.2002
 
 

 ---
 mailto:[EMAIL PROTECTED]
 BR
 Alexey Talikov
 FORTEK
 ---


 ___
 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] Bandwidth allocation by IP

2002-06-05 Thread Vladimir Trebicky

Sorry for my incompetence. I didn't noticed that readme included in some of
Alexes posts. Module works fine only if I do
qdisc add dev eth1 root handle 1: esfq
when I do
qdisc add dev eth1 root handle 1: esfq hash dst
the computer get totally freezed.

- Original Message -
From: Alexey Talikov [EMAIL PROTECTED]
To: [EMAIL PROTECTED]; Vladimir Trebicky [EMAIL PROTECTED]
Sent: Wednesday, June 05, 2002 1:19 PM
Subject: Re: [LARTC] Bandwidth allocation by IP


 Try WRR on eth1 see http://wipl-wrr.sourceforge.net/ for details
 or use ESFQ
 see mail from Alexander Atanasov 05.06.2002
 I rename files gzip its and attach to this mail but don't change anything
 patch kernel and tc
 cd iproute2
 patch -p1  ../esfq-tc.diff
 cd linux-2.4.18
 patch -p1  ../esfq-2.4.18.diff
 recompile kernel and tc thats all !!
 see README
 Note it give you equal division for a long term not at the moment
 Example:

 tc qdisc add dev eth1 root handle 1:0 esfq hash src

 It make equal priority for session based on ip address not tcp session
like classic SFQ
 For detail see SFQ
 05.06.2002 15:34:05, Vladimir Trebicky [EMAIL PROTECTED] wrote:

 I have a LAN (eth1) and 1Mbit internet which is very unstable (from
 100kbit - 2mbit) on eth0. I would like to prevent ip A downloading with 9
 threads taking 90% bandwidth and ip B downloading with 1 thread  taking
10%.
 I would like ip A as well as ip B to have each 50% of bandwith no care
how
 many threads they are downloading. I suppose that it could be done on
eth1.
 But how?
 Second problem: I want to lessen round-trips. Should I do it with
priorizing
 small packets on eth0? How?
 I have 2.4.18, iproute2 with extra htb. PSCHED_JIFFIES (unfortunately -
it's
 only AMD 160MHz and does not have TSC)
 
 Thanks
 
 --
 Vladimir Trebicky
 [EMAIL PROTECTED]
 
 
 ---
 Odchozi zprava neobsahuje viry.
 Zkontrolovno antivirovm systmem AVG (http://www.grisoft.cz).
 Verze: 6.0.368 / Virov bze: 204 - datum vydn: 29.5.2002
 
 ___
 LARTC mailing list / [EMAIL PROTECTED]
 http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
 

 ---
 mailto:[EMAIL PROTECTED]
 BR
 Alexey Talikov
 FORTEK
 ---



---
Odchozi zprava neobsahuje viry.
Zkontrolovno antivirovm systmem AVG (http://www.grisoft.cz).
Verze: 6.0.368 / Virov bze: 204 - datum vydn: 29.5.2002

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



Re: [LARTC] installing HTB

2002-06-05 Thread Stef Coene

On Wednesday 05 June 2002 20:33, Chris K Ellsworth wrote:
 when i go to install htb i know i need to patch the kernel (DONE)
 and do i need grab the iprotue2+tc and patch then make or just use the tc
 binary from the tgz file and replace the tc file curently located on the
 system?
You also need to patch iproute and compile a new tc binary.

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] simple htb script which does not work

2002-06-05 Thread Stef Coene

On Wednesday 05 June 2002 18:10, Ludovic Drolez wrote:
 Hi !

 I'm using the htb.init script to do simple things with my adsl
 connection:
 - uploads through a VPN (port 2001 used) can use all BW (128Kbits)
 (rate=15kbps, ceil=16kbps), class 10
 - and others have only 8 kbits but can take all the BW if there is no
 VPN activity. (rate=1kbps, ceil=16kps), class 20

 But, BW sharing does not seem to work, and if I make 2 uploads, one
 through the VPN, the other with ssh on the net, I get 8kbps/8kbps
 instead of 15kbps/1kbps.

 Some stats show that packets are filtered the right way.

 Any idea ?
You need to shape lower then 16kbps so you never use the full bandwidth.  
Otherwise, the queues on you modem will be filled and it will be the modem 
that controls the bandwidth.

The scripts is OK.

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] Problems with routes

2002-06-05 Thread Julian Anastasov


Hello,

On 5 Jun 2002, Alexander Brill wrote:

 Whenever I try to 'readd' a route I receive an error and I can't figure
 out why...

 # Add some routes
 ip route add $EXT via $INT
 ip route add prio 320 from $INT nat $EXT

ip rule add prio 320 from $INT nat $EXT

 # Delete them
 ip route del from $INT nat $EXT

ip route del prio 320 from $INT nat $EXT

 ip route del $EXT via $INT
 # Add again
 ip route add $EXT via $INT
 ip route add prio 320 from $INT nat $EXT

ip rule add prio 320 from $INT nat $EXT

 The last command exits with exit-code '2' and the message:
 RTNETLINK answers: Invalid argument

May be not only the last one :)

 What am I doing wrong?

Use ip rules for SNAT and ip routes for DNAT

Regards

--
Julian Anastasov [EMAIL PROTECTED]

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



Re: [LARTC] installing HTB

2002-06-05 Thread Martin Devera

OR you can use binary in tar - the iproute compilation
is not needed then.
devik

On Wed, 5 Jun 2002, Stef Coene wrote:

 On Wednesday 05 June 2002 20:33, Chris K Ellsworth wrote:
  when i go to install htb i know i need to patch the kernel (DONE)
  and do i need grab the iprotue2+tc and patch then make or just use the tc
  binary from the tgz file and replace the tc file curently located on the
  system?
 You also need to patch iproute and compile a new tc binary.

 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/



Re: [LARTC] Bandwidth allocation by IP

2002-06-05 Thread Alexander Atanasov

Hi there!

On Wed, 5 Jun 2002, Vladimir Trebicky wrote:

 Sorry for my incompetence. I didn't noticed that readme included in some of
 Alexes posts. Module works fine only if I do
 qdisc add dev eth1 root handle 1: esfq
 when I do
 qdisc add dev eth1 root handle 1: esfq hash dst
 the computer get totally freezed.
 

Are you sure you've build the kernel correct?

I've fixed some things about default parameters - i think you've
hit this, hash_divisor was left to be 0 when not supplied as parameter.
Now works and as built in - forgot to include sch_api.c when
making diff first time, so it was in kernel but not registerd.
I've setup a page for it on: http://www.ssi.bg/~alex/esfq/index.html

-- 
have fun,
alex

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



Re: [LARTC] SFQ buckets/extensions

2002-06-05 Thread Alexander Atanasov

On Wed, 5 Jun 2002, Don Cohen wrote:

  extensions
   And all the discussions tend to lead to the conclusion that there should
   be an sfq option (when the queue is created) for:
  a) how big the hash is
  b) whether to take into account source ports or not
  c) whether to take into account destination ports or not
  d) etc. :)
   
   Maybe someone who's written a qdisc would feel up to this?
 
 I've been hoping to get to it, since I have other stuff I'd like to
 incorporate into a new sfq version.  

At first look - i think i've have to incorporate my changes into
your work. I've not done much just added hashes and unlocked what
Alexey Kuznetsov did.

  Plaing with it gives interesting results:  
  higher depth - makes flows equal slower
  small depth  - makes flows equal faster
  limit kills big delays when set at about 75-85% of depth.
 
 I don't understand what these last three lines mean.  Could you
 explain?

depth is how much packets which are queued on a row of the
hash table. If you have large queues (higher depth) sfq reacts slower when
a new flow appears (it has to do more work to make queue lengths equal
). When you have short queues it reacts faster, so adjusting depth
to your bandwidth and traffic type can make it do better work.
I set bounded cbq class 320kbits and esfq with dst hash:
Start an upload - it gets 40KB
Start second one - it should get 20KB asap to be fair.
With depth 128 it would take it let's say 6 sec. to make both 20KB, with
depth 64 about 3sec - drop packets early with shorter queue.
(i've to make some exact measurements since this is just an example
and may not be correct). 

limit sets a threshold on queued packets - if a packet exceeds
it's dropped so delay is smaller, but when it tries to make flows equal it
counts depth, not limit. With above example depth 128 and limit 100:
When first upload enqueue 100 packets sfq starts to drop,
but goal to make flows equal is 64 packets in queue. Flow doesn't get
the 28 packets which are to be enqueued and delayed for a long time and
probably dropped when recived.
It's similiar to RED - you have a queue  which you try to keep at about X
percent full but can go over it, limit keeps it at most X percent full.
What about making it like RED - more packets go over limit more are droped
early - limit goes down, less are dropped - limit goes up?

 
   
  Needs testings and mesurements - that's why i made it
   separate qdisc and not a patch over sfq, i wanted to compare both.
   
  Any feedback good or bad is welcome. 
 
 I'll send you my current module, also a variant of SFQ.  It contains
 doc that I think is worth including, also changes some of the code to
 be more understandable, separates the number of packets allowed in the
 queue from the number of buckets, supports the time limit (discussed
 in earlier messages), controls these things via /proc, maybe a few
 other things I'm forgetting.  This version does not support hashing on
 different properties of the packet, cause it uses a totally different
 criterion for identifying subclasses of traffic.  You can discard
 that and restore the sfq hash with your modifications.  I think (hope)
 these changes are pretty much independent.
 

I've taken a quick look over it and i like the ideas there,
give me some time to get the details. I hope we can make something good of
both. 

-- 
have fun,
alex

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



[LARTC] parameter of htb

2002-06-05 Thread hanhbnetfilter

tc qdisc add dev eth0 root handle 1: htb default 12
tc class add dev eth0 parent 1: classid 1:10 rate
30kbps ceil 100kbps burst 2k
tc class add dev eth0 parent 1: classid 1:11 rate
10kbps ceil 100kbps burst 2k
tc class add dev eth0 parent 1: classid 1:12 rate
60kbps ceil 100kbps burst 2k
tc filter add dev eth0 protocol ip parent 1:0 prio 1
u32 match ip src 172.16.11.2 flowid 1:10
i login 172.16.11.2 and copy a large file from the
server set traffic control.
tc -s -d qdisc show dev eth0
  qdisc htb 1 dev eth0 r2q 10 default 12
direct_packets_stat 0 Sent 34210198 bytes 23370
pkts(dropped 0 overlimits 35534)
first question: what is meaning of r2q and
direct_packets_stat
tc -s -d class dev eth0 
class htb 1:11 root prio 0 quantum 3072 rate 240kbit  

 ceil 800kbit burst 2kb/8 mpu 0b cburst 2636b/8 mpu 0b

 level 0 Sent 0 bytes 0 pkts(dropped 0 overlimits 0)
 lended:0 borrowed:0 giants:0 tokens:54612 ctokens 
 20992
class htb 1:10 root prio 0 quantum 3072 rate 240kbit 
 ceil 800kbit burst 2kb/8 mpu 0b cburst 2636b/8 mpu 0b

 level 0 Sent 0 bytes 0 pkts(dropped 0 overlimits 0)
 lended:0 borrowed:0 giants:0 tokens:54612 ctokens 
 20992
class htb 1:12 root prio 0 quantum 3072 rate 240kbit 
 ceil 800kbit burst 2kb/8 mpu 0b cburst 2636b/8 mpu 0b

 level 0 Sent 34210198 bytes 23370 pkts(dropped 0 
 overlimits 0) rate 190kbps lended:23370 borrowed:0 
 giants:0 tokens:-24351 ctokens 20480
!!!second question: what is meaning of token and
ctoken
!!!why all three class'rate become 30kbps?
!!!why all packets belong to class 1:12 ,they should
belong to class 1:10.
 



_
Do You Yahoo!? 
2002ÄêÊÀ½ç±­ÈºÐÛ÷éÕ½ ÑÅ»¢Öйú¾Û½¹ÈÕº«
http://cn.fifaworldcup.yahoo.com/
___
LARTC mailing list / [EMAIL PROTECTED]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/



Re: [LARTC] SFQ buckets/extensions

2002-06-05 Thread Don Cohen

Alexander Atanasov writes:
   At first look - i think i've have to incorporate my changes into
  your work. I've not done much just added hashes and unlocked what
  Alexey Kuznetsov did.
Not quite that simple.  You have to throw out about half of my file,
mostly the last third or so, which replaces the hash function, plus 
most of the /proc stuff, and probably a lot of other little pieces
scattered here and there.
I now recall a few other things - I support configuration of sevice 
weights for different subqueues, which makes no sense for sfq, also
I record the amount of service (bytes and packets) per subqueue and
report these to the tc -s -d stuff, which also makes no sense for sfq.
After removing all that stuff you then have to restore the hash.

 Plaing with it gives interesting results:  
 higher depth - makes flows equal slower
 small depth  - makes flows equal faster
 limit kills big delays when set at about 75-85% of depth.
   
   I don't understand what these last three lines mean.  Could you
   explain?
  
   depth is how much packets which are queued on a row of the
  hash table. If you have large queues (higher depth) sfq reacts slower when
  a new flow appears (it has to do more work to make queue lengths equal
  ). When you have short queues it reacts faster, so adjusting depth
  to your bandwidth and traffic type can make it do better work.
  I set bounded cbq class 320kbits and esfq with dst hash:
   Start an upload - it gets 40KB
   Start second one - it should get 20KB asap to be fair.
  With depth 128 it would take it let's say 6 sec. to make both 20KB, with
  depth 64 about 3sec - drop packets early with shorter queue.
  (i've to make some exact measurements since this is just an example
  and may not be correct). 
I don't see why that should be the case.  And I don't recall ever
observing it.  This adaptation time should be practically zero.
There's no work in making the queues equal.
(Let's use the word queue to mean the whole SFQ and subqueue for the
part sharing a hash index.)
If you have, say, 100 packets in one subqueue and 10 in another they're
already sharing the bandwidth 50-50. 

   limit sets a threshold on queued packets - if a packet exceeds
  it's dropped so delay is smaller, but when it tries to make flows equal it
  counts depth, not limit. With above example depth 128 and limit 100:
   When first upload enqueue 100 packets sfq starts to drop,
  but goal to make flows equal is 64 packets in queue. Flow doesn't get
  the 28 packets which are to be enqueued and delayed for a long time and
  probably dropped when recived.
I disagree that the goal is to make the subqueues the same length.
The goal is to serve them with the same bandwidth (as long as they
don't become empty.)
Queue length depends on how many packets each download is willing to
send without an ack.  If one is willing to send 100 and the other is
willing to send 10, then the subqueues will likely be length 100 and
10, but each will still get the same bandwidth.  Without window
scaling the max window size is 64K which is only about 45 packets,
so it's not really normal to have 100 packets in a subqueue.

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