From: Tomasz Wrona <tw@eter.tym.pl>
To: lartc@vger.kernel.org
Subject: Re: [LARTC] ip balance
Date: Tue, 05 Nov 2002 06:54:05 +0000 [thread overview]
Message-ID: <marc-lartc-103647934119901@msgid-missing> (raw)
In-Reply-To: <marc-lartc-103645515405011@msgid-missing>
On 4 Nov 2002, Esteban Ribicic wrote:
> root@debian:/wk/ESTADISTICAS/Trafico_en_kisero_hq# ip route list
> 172.0.0.0/24 dev eth0 proto kernel scope link src 172.0.0.82
> 172.0.0.0/24 dev eth1 proto kernel scope link src 172.0.0.81
> default
> nexthop via 172.0.0.1 dev eth0 weight 1
> nexthop via 172.0.0.1 dev eth1 weight 1
> root@debian:/wk/ESTADISTICAS/Trafico_en_kisero_hq#
>
> the result was that the %78 of traffic goes to eth0 and the rest from
> eth1..!!!.
>
> any idea? i still dont understand based on what dsecicion the kernel
> routes one paquet to eth0 or eth1...any idea?
Kernel get [randomly] one of "nexthop" gateway to achieve required IP
addres and make routing entry in own route cache. Next request to the same
IP will be routed due to previous cache entry [until entry expires]. Than
if all Your clients wants connect to considered IP all get the same
gateway [and interface]. It's also important to know that its not packet-by-packet
load balancing but "entry-by-entry" balancing - thats why
traffic isnt always distributed fair but looks balanced when considered
during large number of sessions.
To check if it works coorect You can count cache entries for your both
interfaces ie. ip r l ta cache |grep eth0 |wc -l and ip r l ta cache |grep
eth1 |wc -l and than You should see that numbers are close to each other.
There is also "equalize" option which do packet-by-packet balancing but to
do it working You need special setup and cooperation with Your
gateway AFAIK. [If You have the same gateway on both interfaces maybe its
possible to prepare network config to work with equalize option]
I am not shure what I wrote is 100% true but I
believe that it works in such a manner.
Regrds
tw
--
----------------
ck.eter.tym.pl
"Never let shooling disturb Your education"
_______________________________________________
LARTC mailing list / LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
next prev parent reply other threads:[~2002-11-05 6:54 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-11-04 21:12 [LARTC] ip balance Esteban Ribicic
2002-11-05 6:54 ` Tomasz Wrona [this message]
2002-11-06 0:20 ` Tomasz Wrona
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=marc-lartc-103647934119901@msgid-missing \
--to=tw@eter.tym.pl \
--cc=lartc@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.