Re: load balance [OT?]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, 2008-06-02 at 16:26 -0300, Martin wrote:
[...]
> #ISP 1
> ip route add $ISP1_NET dev $ISP1_IF src $ISP1_IP table 1
> ip route add default via $ISP1_GW dev $ISP1_IF
> 
> #ISP 2 
> ip route add $ISP2_NET dev $ISP2_IF src $ISP2_IP table 2
> ip route add default via $ISP2_GW dev $ISP2_IF
> 
> #Rules for ISPs
> ip rule add $ISP1_IP table 1
> ip rule add $ISP2_IP table 2
> 
> #Internal LAN and cross reference to the other ISP
> ip route add $LAN_NET dev $LAN_IF table 1
> ip route add $ISP2_NET dev $ISP2_IF table 1
> 
> ip route add $LAN_NET dev $LAN_IF table 2
> ip route add $ISP1_NET dev $ISP1_IF table 2
> 
> #Add isp net in main
> ip route add $ISP1_NET dev $ISP1_IF src $ISP1_IP
> ip route add $ISP2_NET dev $ISP2_IF src $ISP2_IP
> 
> #This should do the trick of balancing
> 
> ip route add default scope global equalize nexthop via $ISP1_GW dev
> ISP1_IF weight 1 nexthop via $ISP2_GW dev $ISP2_IF weight 2
[...]


Well, here is some update.


I made some kind of load balance, but not as expected.

Doing some tests just to try to find out where con be the problem, I
found this:

ip route add default equalize nexthop dev $ISP_IF1 weight 1 nexthop dev
$ISP2_IF weight 1


It does load balance, sending some packets to one interface or another,
but using $ISP1_IP. That makes no sense, it's using second nexthop, but
using first nexthop's ip.

Anyway, if I add the complete sentence with corresponding IP and dev, it
keeps using only the first nexthop until it goes down.

Can't figure out why it only uses first IP at the "nexthop" rule....


Should I call Molder and Scully? :S


Thanks list for your support


Cheers


Martin

--
To unsubscribe from this list: send the line "unsubscribe netfilter" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Netfilter Development]     [Linux Kernel Networking Development]     [Netem]     [Berkeley Packet Filter]     [Linux Kernel Development]     [Advanced Routing & Traffice Control]     [Bugtraq]

  Powered by Linux