* Re: [LARTC] Load balancing with failover
2004-01-02 5:46 [LARTC] Load balancing with failover Tushar Thakker
@ 2004-01-02 12:59 ` Anderson O Muniz
2004-01-02 13:46 ` Steen Suder, privat
` (3 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: Anderson O Muniz @ 2004-01-02 12:59 UTC (permalink / raw)
To: lartc
[-- Attachment #1: Type: text/plain, Size: 1436 bytes --]
Hi,
Put a script to monitor a gateway with crond job and if it fails automatically change to gateway 2, you gotta it?
[]'s
Anderson
----- Original Message -----
From: Tushar Thakker
To: lartc@mailman.ds9a.nl
Sent: Friday, January 02, 2004 5:08 PM
Subject: [LARTC] Load balancing with failover
Hi all,
i have network setup with 3 gateways and a large number of intranet nodes,
i want to do automatic load balancing with failover,
i have put following ip rules and routes,
ip rule add prio 222 table 222
ip route add default table 222 proto static \
nexthop via $GWE1 dev $IFE1 \
nexthop via $GWE2 dev $IFE2 \
nexthop via $GWE2 dev $IFE3 \
Now, i also want to do failover,
but the point is that what shall i need to do about deleting the route cache as soon as some gateway becomes dead or unavailable,
what the system will do on its own and what we need to do for this,
i need a help,
please guide me,
thanx in advance,
Regards,
----------------------------------------------------------------
Tushar Thakker
Elitecore Technologies Ltd.
Ph: 9824080066 / 6405600 Ext-535
----------------------------------------------------------------
Life gives all that one deserves, but not all that one desires...
----------------------------------------------------------------
[-- Attachment #2: Type: text/html, Size: 3608 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread* Re: [LARTC] Load balancing with failover
2004-01-02 5:46 [LARTC] Load balancing with failover Tushar Thakker
2004-01-02 12:59 ` Anderson O Muniz
@ 2004-01-02 13:46 ` Steen Suder, privat
2004-01-02 15:59 ` Jurrie Overgoor
` (2 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: Steen Suder, privat @ 2004-01-02 13:46 UTC (permalink / raw)
To: lartc
Tushar Thakker wrote:
> Hi all,
> i have network setup with 3 gateways and a large number of intranet nodes,
> i want to do automatic load balancing with failover,
> i have put following ip rules and routes,
>
> ip rule add prio 222 table 222
> ip route add default table 222 proto static \
> nexthop via $GWE1 dev $IFE1 \
> nexthop via $GWE2 dev $IFE2 \
> nexthop via $GWE2 dev $IFE3 \
>
> Now, i also want to do failover,
> but the point is that what shall i need to do about deleting the route cache as soon as some gateway becomes dead or unavailable,
> what the system will do on its own and what we need to do for this,
> i need a help,
AFAIK, You'd have to look at Julian's routepatch(es):
<http://www.ssi.bg/~ja/#routes-2.4>.
Search for "Dead Gateway Detection".
It may not be the entire solution, but a step in the right direction.
--
Mvh. / Best regards,
Steen Suder <http://www.suder.dk/>
ICQ UIN 4133803
_______________________________________________
LARTC mailing list / LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
^ permalink raw reply [flat|nested] 6+ messages in thread* Re: [LARTC] Load balancing with failover
2004-01-02 5:46 [LARTC] Load balancing with failover Tushar Thakker
2004-01-02 12:59 ` Anderson O Muniz
2004-01-02 13:46 ` Steen Suder, privat
@ 2004-01-02 15:59 ` Jurrie Overgoor
2004-01-02 16:02 ` Eric Leblond
2004-01-02 18:52 ` Gordan Bobic
4 siblings, 0 replies; 6+ messages in thread
From: Jurrie Overgoor @ 2004-01-02 15:59 UTC (permalink / raw)
To: lartc
> Put a script to monitor a gateway with crond job and if it fails
> automatically change to gateway 2, you gotta it?
Does that address the problem of routes being cached?
Greetz -- Jurrie
jurrie.overgoor@zonnet.nl
_______________________________________________
LARTC mailing list / LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
^ permalink raw reply [flat|nested] 6+ messages in thread* Re: [LARTC] Load balancing with failover
2004-01-02 5:46 [LARTC] Load balancing with failover Tushar Thakker
` (2 preceding siblings ...)
2004-01-02 15:59 ` Jurrie Overgoor
@ 2004-01-02 16:02 ` Eric Leblond
2004-01-02 18:52 ` Gordan Bobic
4 siblings, 0 replies; 6+ messages in thread
From: Eric Leblond @ 2004-01-02 16:02 UTC (permalink / raw)
To: lartc
[-- Attachment #1: Type: text/plain, Size: 1979 bytes --]
Le ven 02/01/2004 à 20:08, Tushar Thakker a écrit :
> Hi all,
> i have network setup with 3 gateways and a large number of intranet
> nodes,
> i want to do automatic load balancing with failover,
One find way to do this is to use a combination of :
- nth :
http://www.netfilter.org/documentation/pomlist/pom-base.html#nth
- condition :
http://www.netfilter.org/documentation/pomlist/pom-extra.html#condition
- CONNMARK :
http://www.netfilter.org/documentation/pomlist/pom-extra.html#CONNMARK
- iproute2
the first three are patch available in patch-o-matic from netfilter, see
provided link for explanation.
The idea is the following :
let say that we've got a link A at 512 and a link B at 1024 kbits.
I want to have twice the number of connection on B as on A to really use
link B so i set a counter with 3 slots, I fed slots 0 and 2 to B and
slots 1 to A.
iptables -t mangle -A FORWARD -m state --state NEW NEW -m nth --counter
1 \
--every 3 --packet 0 -j MARK --set-mark 0x1
iptables -t mangle -A FORWARD -m state --state NEW -m nth --counter 1 \
--every 3 --packet 1 -j MARK --set-mark 0x2
iptables -t mangle -A FORWARD -m state --state NEW -m nth --counter 1 \
--every 3 --packet 1 -j MARK --set-mark 0x1
You need to restore and save the mark with connmark to have mark follow
connection and tcp session coming from the same IP.
Next route mark 0x1 on link B and route 0x2 on link A (use ip rules and
diferrent routing tables)
Here you've got a good load-balancing.
Next thing use condition on each line to have packet being marked only
if the corresponding link is detected as UP (else marked it with the
other link mark if it is itself not down). To test if the link is up
you'll have to write a simple daemon which ping gateway and set the
corresponding condition to 0 or 1 if link is down or up.
BR,
--
Eric Leblond
NuFW, Now User Filtering Works (http://www.nufw.org)
[-- Attachment #2: Ceci est une partie de message numériquement signée. --]
[-- Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread* Re: [LARTC] Load balancing with failover
2004-01-02 5:46 [LARTC] Load balancing with failover Tushar Thakker
` (3 preceding siblings ...)
2004-01-02 16:02 ` Eric Leblond
@ 2004-01-02 18:52 ` Gordan Bobic
4 siblings, 0 replies; 6+ messages in thread
From: Gordan Bobic @ 2004-01-02 18:52 UTC (permalink / raw)
To: lartc
On Friday 02 Jan 2004 3:59 pm, Jurrie Overgoor wrote:
> > Put a script to monitor a gateway with crond job and if it fails
> > automatically change to gateway 2, you gotta it?
>
> Does that address the problem of routes being cached?
ip route flush cache
Gordan
_______________________________________________
LARTC mailing list / LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
^ permalink raw reply [flat|nested] 6+ messages in thread