All of lore.kernel.org
 help / color / mirror / Atom feed
* [LARTC] Traffic balancing by IP.
@ 2001-12-24 13:38 Dmitri Gofmekler
  2001-12-24 13:47 ` Stef Coene
                   ` (8 more replies)
  0 siblings, 9 replies; 10+ messages in thread
From: Dmitri Gofmekler @ 2001-12-24 13:38 UTC (permalink / raw)
  To: lartc

Hello all!

As far as I know that the traffic that will pass thru the router is balanced
so that all connections have the same privilegies. Is it possible to
configure the linux based router so that all computers will have the same
privilegies? I mean that if in default case full traffic is splitted by
connections, so I need to split it by users to prevent one user occupy all
traffic by starting 150 simulations downloads with FlashGET for example, but
he should be able to occupy all channel if no one else require the traffic
this time.


Thanks in advance,
Dmitri.



_______________________________________________
LARTC mailing list / LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://ds9a.nl/lartc/

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [LARTC] Traffic balancing by IP.
  2001-12-24 13:38 [LARTC] Traffic balancing by IP Dmitri Gofmekler
@ 2001-12-24 13:47 ` Stef Coene
  2001-12-24 14:36 ` Dmitri Gofmekler
                   ` (7 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: Stef Coene @ 2001-12-24 13:47 UTC (permalink / raw)
  To: lartc

On Monday 24 December 2001 14:38, Dmitri Gofmekler wrote:
> Hello all!
>
> As far as I know that the traffic that will pass thru the router is
> balanced so that all connections have the same privilegies.
By default no traffic is balanced at all.  All packets that arrive will be 
sended out as fast as possible and in the same order.
But you can use SFQ that will give each flow (combination of ip-address and 
port) the same chance to transmit something.

> Is it possible
> to configure the linux based router so that all computers will have the
> same privilegies? I mean that if in default case full traffic is splitted
> by connections, so I need to split it by users to prevent one user occupy
> all traffic by starting 150 simulations downloads with FlashGET for
> example, but he should be able to occupy all channel if no one else require
> the traffic this time.
If I understand correctly, you want to give each ip-address the same rights.  
There is no qdisc or filter who can do it automatically (the wrr qdisc can do 
this but I never tried it ou).  If there are not to many ip-address, you can 
create for each one a class (with CBQ or HTB).  Each class holds the traffic 
of 1 ip-address and each class will have the same rights to transmit 
something.

Stef

-- 

stef.coene@docum.org
 More QOS info : http://www.docum.org/
 Title : "Using Linux as bandwidth manager"
     

_______________________________________________
LARTC mailing list / LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://ds9a.nl/lartc/

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [LARTC] Traffic balancing by IP.
  2001-12-24 13:38 [LARTC] Traffic balancing by IP Dmitri Gofmekler
  2001-12-24 13:47 ` Stef Coene
@ 2001-12-24 14:36 ` Dmitri Gofmekler
  2001-12-24 14:45 ` Martin Devera
                   ` (6 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: Dmitri Gofmekler @ 2001-12-24 14:36 UTC (permalink / raw)
  To: lartc

The problem is that the amout of addresses is  unknown. Now it is 3xC class,
in the future will be more...

> On Monday 24 December 2001 14:38, Dmitri Gofmekler wrote:
> > Hello all!
> >
> > As far as I know that the traffic that will pass thru the router is
> > balanced so that all connections have the same privilegies.
> By default no traffic is balanced at all.  All packets that arrive will be
> sended out as fast as possible and in the same order.
> But you can use SFQ that will give each flow (combination of ip-address
and
> port) the same chance to transmit something.
>
> > Is it possible
> > to configure the linux based router so that all computers will have the
> > same privilegies? I mean that if in default case full traffic is
splitted
> > by connections, so I need to split it by users to prevent one user
occupy
> > all traffic by starting 150 simulations downloads with FlashGET for
> > example, but he should be able to occupy all channel if no one else
require
> > the traffic this time.
> If I understand correctly, you want to give each ip-address the same
rights.
> There is no qdisc or filter who can do it automatically (the wrr qdisc can
do
> this but I never tried it ou).  If there are not to many ip-address, you
can
> create for each one a class (with CBQ or HTB).  Each class holds the
traffic
> of 1 ip-address and each class will have the same rights to transmit
> something.
>
> Stef
>
> --
>
> stef.coene@docum.org
>  More QOS info : http://www.docum.org/
>  Title : "Using Linux as bandwidth manager"
>
>
> _______________________________________________
> LARTC mailing list / LARTC@mailman.ds9a.nl
> http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://ds9a.nl/lartc/
>



_______________________________________________
LARTC mailing list / LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://ds9a.nl/lartc/

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [LARTC] Traffic balancing by IP.
  2001-12-24 13:38 [LARTC] Traffic balancing by IP Dmitri Gofmekler
  2001-12-24 13:47 ` Stef Coene
  2001-12-24 14:36 ` Dmitri Gofmekler
@ 2001-12-24 14:45 ` Martin Devera
  2001-12-24 14:48 ` Dmitri Gofmekler
                   ` (5 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: Martin Devera @ 2001-12-24 14:45 UTC (permalink / raw)
  To: lartc

Have you problems with it ? The SFQ will work with
as many IPs as you want (uses hashing).
devik

On Mon, 24 Dec 2001, Dmitri Gofmekler wrote:

> The problem is that the amout of addresses is  unknown. Now it is 3xC class,
> in the future will be more...
> 
> > On Monday 24 December 2001 14:38, Dmitri Gofmekler wrote:
> > > Hello all!
> > >
> > > As far as I know that the traffic that will pass thru the router is
> > > balanced so that all connections have the same privilegies.
> > By default no traffic is balanced at all.  All packets that arrive will be
> > sended out as fast as possible and in the same order.
> > But you can use SFQ that will give each flow (combination of ip-address
> and
> > port) the same chance to transmit something.


_______________________________________________
LARTC mailing list / LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://ds9a.nl/lartc/

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [LARTC] Traffic balancing by IP.
  2001-12-24 13:38 [LARTC] Traffic balancing by IP Dmitri Gofmekler
                   ` (2 preceding siblings ...)
  2001-12-24 14:45 ` Martin Devera
@ 2001-12-24 14:48 ` Dmitri Gofmekler
  2001-12-24 15:09 ` Michael T. Babcock
                   ` (4 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: Dmitri Gofmekler @ 2001-12-24 14:48 UTC (permalink / raw)
  To: lartc

What is SFQ? Where to find the docs and instructions about SFQ?


Thanks,
Dmitri.

> Have you problems with it ? The SFQ will work with
> as many IPs as you want (uses hashing).
> devik




_______________________________________________
LARTC mailing list / LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://ds9a.nl/lartc/

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [LARTC] Traffic balancing by IP.
  2001-12-24 13:38 [LARTC] Traffic balancing by IP Dmitri Gofmekler
                   ` (3 preceding siblings ...)
  2001-12-24 14:48 ` Dmitri Gofmekler
@ 2001-12-24 15:09 ` Michael T. Babcock
  2001-12-24 15:16 ` Michael T. Babcock
                   ` (3 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: Michael T. Babcock @ 2001-12-24 15:09 UTC (permalink / raw)
  To: lartc

On Mon, Dec 24, 2001 at 04:36:41PM +0200, Dmitri Gofmekler wrote:
> The problem is that the amout of addresses is  unknown. Now it is 3xC class,
> in the future will be more...

If all you want is "fairness"; each gets a 'fair' share of the bandwidth,
SFQ will handle the rest.  If you just add SFQ as the root qdisc or under
a root CBQ/HTB/etc. class, you should be fine.

If you have a lot of addresses and active machines, you may with to increase
the number of SFQ hash buckets.
-- 
Michael T. Babcock
CTO, FibreSpeed Ltd.     (Hosting, Security, Consultation, Database, etc)
http://www.fibrespeed.net/~mbabcock/

_______________________________________________
LARTC mailing list / LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://ds9a.nl/lartc/

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [LARTC] Traffic balancing by IP.
  2001-12-24 13:38 [LARTC] Traffic balancing by IP Dmitri Gofmekler
                   ` (4 preceding siblings ...)
  2001-12-24 15:09 ` Michael T. Babcock
@ 2001-12-24 15:16 ` Michael T. Babcock
  2001-12-30 20:02 ` Don Cohen
                   ` (2 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: Michael T. Babcock @ 2001-12-24 15:16 UTC (permalink / raw)
  To: lartc

On Mon, Dec 24, 2001 at 04:48:41PM +0200, Dmitri Gofmekler wrote:
> What is SFQ? Where to find the docs and instructions about SFQ?

The LARTC HOWTO is a good start ... http://ds9a.nl/lartc comes
to mind.
-- 
Michael T. Babcock
CTO, FibreSpeed Ltd.     (Hosting, Security, Consultation, Database, etc)
http://www.fibrespeed.net/~mbabcock/

_______________________________________________
LARTC mailing list / LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://ds9a.nl/lartc/

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [LARTC] Traffic balancing by IP.
  2001-12-24 13:38 [LARTC] Traffic balancing by IP Dmitri Gofmekler
                   ` (5 preceding siblings ...)
  2001-12-24 15:16 ` Michael T. Babcock
@ 2001-12-30 20:02 ` Don Cohen
  2001-12-31  8:22 ` Anton Tinchev
  2002-01-01  8:45 ` Anton Tinchev
  8 siblings, 0 replies; 10+ messages in thread
From: Don Cohen @ 2001-12-30 20:02 UTC (permalink / raw)
  To: lartc

Sorry, I'm a little behind here, trying to catch up

  From: "Dmitri Gofmekler" <dmitri@arvid.ee>
  To: <lartc@mailman.ds9a.nl>
  Date: Mon, 24 Dec 2001 15:38:13 +0200

  As far as I know that the traffic that will pass thru the router is balanced
  so that all connections have the same privilegies. Is it possible to
  configure the linux based router so that all computers will have the same
  privilegies? I mean that if in default case full traffic is splitted by
  connections, so I need to split it by users to prevent one user occupy all
  traffic by starting 150 simulations downloads with FlashGET for example, but
  he should be able to occupy all channel if no one else require the traffic
  this time.

My interpretation is that you have one link shared among multiple
computers that can be distinguished by their IP addresses and you
want to share the link fairly among those computers.
There is no current out-of-the-box solution that I know of but this
is so similar to SFQ that you can make the change very easily.
SFQ offers fair service to "flows" defined by source/dest IP/port.
You just want to change that to destination IP for packets coming in
from the internet, and source address for packets going out to the
internet.  If you look at the SFQ code there's a hash function that
looks at ports and IP addresses.  I propose two variants, one of which
comments out all but the destination IP address, the other comments
out all but the source IP address.
You can use the version that looks at the source at the interfaces
going out to the internet and the version that looks at the
destination at interfaces going to the local networks.  
I hope that makes sense.


_______________________________________________
LARTC mailing list / LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://ds9a.nl/lartc/

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [LARTC] Traffic balancing by IP.
  2001-12-24 13:38 [LARTC] Traffic balancing by IP Dmitri Gofmekler
                   ` (6 preceding siblings ...)
  2001-12-30 20:02 ` Don Cohen
@ 2001-12-31  8:22 ` Anton Tinchev
  2002-01-01  8:45 ` Anton Tinchev
  8 siblings, 0 replies; 10+ messages in thread
From: Anton Tinchev @ 2001-12-31  8:22 UTC (permalink / raw)
  To: lartc

1. I recommend you to get the HTB. http://luxik.cdi.cz/~devik/qos/htb/htbman.htm
then try the following configuration:

If you have 4 connections and 2Mbit/s incoming
The ceil value is 2Mbit/s, the rate is 2Mbit/s / 4 - 512Kbit
------------------------------------------------
tc qdisc add dev eth1 root handle 1: htb


# Luzerta  - tuka e slozno mai

tc class add dev eth1 parent 1:0 classid 1:1  htb rate 512Kbit ceil   2Mbit burst
10k cburst   5k prio
tc class add dev eth1 parent 1:0 classid 1:2  htb rate 512Kbit ceil   2Mbit burst
10k cburst   5k prio
tc class add dev eth1 parent 1:0 classid 1:3  htb rate 512Kbit ceil   2Mbit burst
10k cburst   5k prio
tc class add dev eth1 parent 1:0 classid 1:4  htb rate 512Kbit ceil   2Mbit burst
10k cburst   5k prio


tc qdisc add dev eth1 parent 1:1 handle 110: sfq perturb 10
tc qdisc add dev eth1 parent 1:2 handle 120: sfq perturb 10
tc qdisc add dev eth1 parent 1:3 handle 130: sfq perturb 10
tc qdisc add dev eth1 parent 1:4 handle 130: sfq perturb 10


#Filters - using lw - marking packets for IP's
tc filter add dev eth1 parent 1:0 protocol ip prio 10 handle 101 fw flowid 1:1
tc filter add dev eth1 parent 1:0 protocol ip prio 10 handle 102 fw flowid 1:2
tc filter add dev eth1 parent 1:0 protocol ip prio 10 handle 103 fw flowid 1:3
tc filter add dev eth1 parent 1:0 protocol ip prio 10 handle 104 fw flowid 1:4

# OR Filters - using u32
#tc filter add dev eth0 protocol ip parent 1:0 prio 1 u32 match ip dst 10.0.0.1
flowid 1:1
#tc filter add dev eth0 protocol ip parent 1:0 prio 1 u32 match ip dst 10.0.0.2
flowid 1:2
#tc filter add dev eth0 protocol ip parent 1:0 prio 1 u32 match ip dst 10.0.0.3
flowid 1:3
#tc filter add dev eth0 protocol ip parent 1:0 prio 1 u32 match ip dst 10.0.0.4
flowid 1:4
------------------------------------------
This will balance the traffic in following way:
 - Whe 1 IP downloading - 2Mbit/s for that IP
 - When all IP's downloading - 2Mbit/s / 4 (512Kbit/s) for each
 - When 3 IP's downloading  - 2Mbit/s / 3 (~683Kbit/s) for each
Don Cohen wrote:

> Sorry, I'm a little behind here, trying to catch up
>
>   From: "Dmitri Gofmekler" <dmitri@arvid.ee>
>   To: <lartc@mailman.ds9a.nl>
>   Date: Mon, 24 Dec 2001 15:38:13 +0200
>
>   As far as I know that the traffic that will pass thru the router is balanced
>   so that all connections have the same privilegies. Is it possible to
>   configure the linux based router so that all computers will have the same
>   privilegies? I mean that if in default case full traffic is splitted by
>   connections, so I need to split it by users to prevent one user occupy all
>   traffic by starting 150 simulations downloads with FlashGET for example, but
>   he should be able to occupy all channel if no one else require the traffic
>   this time.
>
> My interpretation is that you have one link shared among multiple
> computers that can be distinguished by their IP addresses and you
> want to share the link fairly among those computers.
> There is no current out-of-the-box solution that I know of but this
> is so similar to SFQ that you can make the change very easily.
> SFQ offers fair service to "flows" defined by source/dest IP/port.
> You just want to change that to destination IP for packets coming in
> from the internet, and source address for packets going out to the
> internet.  If you look at the SFQ code there's a hash function that
> looks at ports and IP addresses.  I propose two variants, one of which
> comments out all but the destination IP address, the other comments
> out all but the source IP address.
> You can use the version that looks at the source at the interfaces
> going out to the internet and the version that looks at the
> destination at interfaces going to the local networks.
> I hope that makes sense.
>
> _______________________________________________
> LARTC mailing list / LARTC@mailman.ds9a.nl
> http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://ds9a.nl/lartc/


_______________________________________________
LARTC mailing list / LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://ds9a.nl/lartc/

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [LARTC] Traffic balancing by IP.
  2001-12-24 13:38 [LARTC] Traffic balancing by IP Dmitri Gofmekler
                   ` (7 preceding siblings ...)
  2001-12-31  8:22 ` Anton Tinchev
@ 2002-01-01  8:45 ` Anton Tinchev
  8 siblings, 0 replies; 10+ messages in thread
From: Anton Tinchev @ 2002-01-01  8:45 UTC (permalink / raw)
  To: lartc

You can write script that dinamicly builds new configuration when new
machines are added
And Happy New Year

Don Cohen wrote:

> Your solution works for a specific set of IP addresses.
> I thought the problem was to do something that would continue to work
> when new machines were added.  And mine does that, although not "out
> of the box".


_______________________________________________
LARTC mailing list / LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://ds9a.nl/lartc/

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2002-01-01  8:45 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2001-12-24 13:38 [LARTC] Traffic balancing by IP Dmitri Gofmekler
2001-12-24 13:47 ` Stef Coene
2001-12-24 14:36 ` Dmitri Gofmekler
2001-12-24 14:45 ` Martin Devera
2001-12-24 14:48 ` Dmitri Gofmekler
2001-12-24 15:09 ` Michael T. Babcock
2001-12-24 15:16 ` Michael T. Babcock
2001-12-30 20:02 ` Don Cohen
2001-12-31  8:22 ` Anton Tinchev
2002-01-01  8:45 ` Anton Tinchev

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.