All of lore.kernel.org
 help / color / mirror / Atom feed
* [LARTC] Load Balancing Problems
@ 2007-01-05 11:33 Alan Romaniuc
  2007-01-08 15:58 ` Alan Romaniuc
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Alan Romaniuc @ 2007-01-05 11:33 UTC (permalink / raw)
  To: lartc

Hi,

I have a router that got its second link. I was trying to do load 
balancing, but i can not get it to work properly.

Just one link works at time, and is always the second in the command ip 
route add default table 222 proto static.

Am I missing something? My script is below. I am using Debian, tried 
with kernel 2.6.19 (my compilation) or debian's  one (2.6.18-3-486), 
same results

Thanks


====================================ip rule add prio 50 table main
ip route del default table main

ip rule add prio $PRIO1 from $NET1 table $PRIO1
ip route add default via $IPGW1 dev $INTERFACE1 src $IP1 proto static 
table $PRIO1
ip route append prohibit default table $PRIO1 metric 1 proto static

ip rule add prio $PRIO2 from $NET2 table $PRIO2
ip route add default via $IPGW2 dev $INTERFACE2 src $IP2 proto static 
table $PRIO2
ip route append prohibit default table $PRIO2 metric 1 proto static

ip rule add prio 222 table 222
ip route add default table 222 proto static \
          nexthop via $IPGW1 dev $INTERFACE1 weight $WE1 \
          nexthop via $IPGW2 dev $INTERFACE2 weight $WE2
================================

-- 
Alan Romaniuc

_______________________________________________
LARTC mailing list
LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc

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

* [LARTC] Load Balancing Problems
  2007-01-05 11:33 [LARTC] Load Balancing Problems Alan Romaniuc
@ 2007-01-08 15:58 ` Alan Romaniuc
  2007-01-09 13:36 ` Luciano Ruete
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: Alan Romaniuc @ 2007-01-08 15:58 UTC (permalink / raw)
  To: lartc


I am having with loadbalancing. I can get it working never....

I have this scenario:


   INTRANET   --------  (IP0, INTERFACE0) ROUTER (IP1,INTERFACE1) ---- 
NET1 --- (IPGW1) EXTRANET 1
                                            |
                                            |----(IP2,INTERFACE2) ---- 
NET2 --- (IPGW2) EXTRANET 2
                                                                 


I have a Debian box with debian kernel, and I have a my kernel too, ith 
patches from Julian's route patch page.

Here is my scritp... copied from lartc
==
ip route add $NET1 dev $INTERFACE1 src $IP1 table $TABLE1
ip route add default via $IPGW1 table $TABLE1
ip route add $NET2 dev $INTERFACE2 src $IP2 table $TABLE2
ip route add default via $IPGW2 table $TABLE2

ip route add $NET1 dev $INTERFACE1 src $IP1
ip route add $NET2 dev $INTERFACE2 src $IP2

#ip route add default via $IPGW1

ip rule add from $IP1 table $TABLE1
ip rule add from $IP2 table $TABLE2

# MAGIC LINE !!!!!!!!!!!!!!!!!!!!!!!
ip route add default scope global \
        nexthop via $IPGW1 dev $INTERFACE1 weight $WE1 \
        nexthop via $IPGW2 dev $INTERFACE2 weight $WE2



ip route add $NET0 dev $INTERFACE0 table $TABLE1
ip route add $NET2 dev $INTERFACE2 table $TABLE1
ip route add 127.0.0.0/8 dev lo table $TABLE1

ip route add $NET0 dev $INTERFACE0 table $TABLE2
ip route add $NET1 dev $INTERFACE1 table $TABLE2
ip route add 127.0.0.0/8 dev lo table $TABLE2


#Extra rule for cable router
if [ "$ROUTER1" ]; then
 ip route add $ROUTER1 dev $INTERFACE1 src $IP1
fi


===

with this script, I am getting always rooted using the second gateway 
from "MAGIC LINE", with am i doing a download (bittorrent for example) 
and redefine the routes (changing the first by the second) I can get a 
full download speedy (link1 + link2 bitrate) and both interface works 
normally. If I stop my torrent, flush the table, and start the download 
again, only the second link will work again, so load balancing never 
works...


here is some more debug information:
 >>ip rule
0:      from all lookup 255
32764:  from 189.1.1.130 lookup uplink_e
32765:  from 201.1.1.88 lookup uplink_v
32766:  from all lookup main
32767:  from all lookup default

 >>ip route
192.168.100.1 dev eth_virtua  scope link  src 201.6.156.88
189.1.1.128/26 dev eth_embratel  proto kernel  scope link  src 189.1.1.130
10.0.0.0/24 dev eth_wifi  proto kernel  scope link  src 10.0.0.1
192.168.1.0/24 dev eth_intra1  proto kernel  scope link  src 192.168.1.1
201.1.1.0/24 dev eth_virtua  proto kernel  scope link  src 201.1.1.88
default
        nexthop via 201.1.1.1  dev eth_virtua weight 1
        nexthop via 189.1.1.129  dev eth_embratel weight 1


 >>Iptables (All ACCEPT)
$IPTABLES -t nat -A POSTROUTING -o $INTERFACE1 -j SNAT --to-source $IP1
$IPTABLES -t nat -A POSTROUTING -o $INTERFACE2 -j SNAT --to-source $IP2


 >>rt_tables
#
# reserved values
#
255     local
254     main
253     default
0       unspec
#
# local
#
#1      inr.ruhep
203     uplink_e
202     uplink_v



PS: Ip numbers are not real .... :/


Thanks in advance for any  help;


-- 
Alan Romaniuc
Phone : +55 11 5105-4955
Mobile : +55 11 8270-2520

alan.romaniuc@inteligensa.com.br
 

INTELIGENSA DO BRASIL
Rua Quintana, 887, 5o. andar - Brooklin
04569-011 - São Paulo - SP - BRASIL
www.inteligensa.com.br

 

_______________________________________________
LARTC mailing list
LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc

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

* Re: [LARTC] Load Balancing Problems
  2007-01-05 11:33 [LARTC] Load Balancing Problems Alan Romaniuc
  2007-01-08 15:58 ` Alan Romaniuc
@ 2007-01-09 13:36 ` Luciano Ruete
  2007-01-09 22:42 ` Alan Romaniuc
  2007-01-10 13:29 ` Kuolung
  3 siblings, 0 replies; 5+ messages in thread
From: Luciano Ruete @ 2007-01-09 13:36 UTC (permalink / raw)
  To: lartc

On Friday 05 January 2007 08:33, Alan Romaniuc wrote:
> Hi,
>
> I have a router that got its second link. I was trying to do load
> balancing, but i can not get it to work properly.
>
> Just one link works at time, and is always the second in the command ip
> route add default table 222 proto static.
>
> Am I missing something? My script is below. I am using Debian, tried
> with kernel 2.6.19 (my compilation) or debian's  one (2.6.18-3-486),
> same results

Try "your compilation" without CONFIG_IP_ROUTE_MULTIPATH_CACHED

there are several threads on this topic in the archive, one as reference:
http://archives.free.net.ph/message/20060618.150532.8a6cc07f.en.html

If it solves the problem, maybe is time to contact the author of Multipath 
Cached and send some report.
-- 
Luciano
_______________________________________________
LARTC mailing list
LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc

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

* Re: [LARTC] Load Balancing Problems
  2007-01-05 11:33 [LARTC] Load Balancing Problems Alan Romaniuc
  2007-01-08 15:58 ` Alan Romaniuc
  2007-01-09 13:36 ` Luciano Ruete
@ 2007-01-09 22:42 ` Alan Romaniuc
  2007-01-10 13:29 ` Kuolung
  3 siblings, 0 replies; 5+ messages in thread
From: Alan Romaniuc @ 2007-01-09 22:42 UTC (permalink / raw)
  To: lartc


Hi all,

After setting the CONFIG_IP_ROUTE_MULTIPATH_CACHED to no and apply 
patches from  http://www.ssi.bg/~ja/#routes , everything is working 
fine. No more problems with the two uplinks and one route only.

Thanks for the help... I've been fighting with that for one week....

I will point this solution in another places too.

Thanks again,

Alan




Luciano Ruete escreveu:
> On Friday 05 January 2007 08:33, Alan Romaniuc wrote:
>   
>> Hi,
>>
>> I have a router that got its second link. I was trying to do load
>> balancing, but i can not get it to work properly.
>>
>> Just one link works at time, and is always the second in the command ip
>> route add default table 222 proto static.
>>
>> Am I missing something? My script is below. I am using Debian, tried
>> with kernel 2.6.19 (my compilation) or debian's  one (2.6.18-3-486),
>> same results
>>     
>
> Try "your compilation" without CONFIG_IP_ROUTE_MULTIPATH_CACHED
>
> there are several threads on this topic in the archive, one as reference:
> http://archives.free.net.ph/message/20060618.150532.8a6cc07f.en.html
>
> If it solves the problem, maybe is time to contact the author of Multipath 
> Cached and send some report.
>   


_______________________________________________
LARTC mailing list
LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc

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

* Re: [LARTC] Load Balancing Problems
  2007-01-05 11:33 [LARTC] Load Balancing Problems Alan Romaniuc
                   ` (2 preceding siblings ...)
  2007-01-09 22:42 ` Alan Romaniuc
@ 2007-01-10 13:29 ` Kuolung
  3 siblings, 0 replies; 5+ messages in thread
From: Kuolung @ 2007-01-10 13:29 UTC (permalink / raw)
  To: lartc

Hi ,

Are U test it for same remote site and same client ??

----- Original Message ----- 
From: "Alan Romaniuc" <alan.romaniuc@inteligensa.com.br>
To: <lartc@mailman.ds9a.nl>
Sent: Wednesday, January 10, 2007 6:42 AM
Subject: Re: [LARTC] Load Balancing Problems


>
> Hi all,
>
> After setting the CONFIG_IP_ROUTE_MULTIPATH_CACHED to no and apply patches 
> from  http://www.ssi.bg/~ja/#routes , everything is working fine. No more 
> problems with the two uplinks and one route only.
>
> Thanks for the help... I've been fighting with that for one week....
>
> I will point this solution in another places too.
>
> Thanks again,
>
> Alan
>
>
>
>
> Luciano Ruete escreveu:
>> On Friday 05 January 2007 08:33, Alan Romaniuc wrote:
>>
>>> Hi,
>>>
>>> I have a router that got its second link. I was trying to do load
>>> balancing, but i can not get it to work properly.
>>>
>>> Just one link works at time, and is always the second in the command ip
>>> route add default table 222 proto static.
>>>
>>> Am I missing something? My script is below. I am using Debian, tried
>>> with kernel 2.6.19 (my compilation) or debian's  one (2.6.18-3-486),
>>> same results
>>>
>>
>> Try "your compilation" without CONFIG_IP_ROUTE_MULTIPATH_CACHED
>>
>> there are several threads on this topic in the archive, one as reference:
>> http://archives.free.net.ph/message/20060618.150532.8a6cc07f.en.html
>>
>> If it solves the problem, maybe is time to contact the author of 
>> Multipath Cached and send some report.
>>
>
>
> _______________________________________________
> LARTC mailing list
> LARTC@mailman.ds9a.nl
> http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc
>
> -- 
> This message has been scanned for viruses and
> dangerous content by MailScanner, and is
> believed to be clean. 


-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.

_______________________________________________
LARTC mailing list
LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc

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

end of thread, other threads:[~2007-01-10 13:29 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-01-05 11:33 [LARTC] Load Balancing Problems Alan Romaniuc
2007-01-08 15:58 ` Alan Romaniuc
2007-01-09 13:36 ` Luciano Ruete
2007-01-09 22:42 ` Alan Romaniuc
2007-01-10 13:29 ` Kuolung

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.