Networking Forums

Networking Forums > Computer Networking > Linux Networking > load balance uplinks

Reply
Thread Tools Display Modes

load balance uplinks

 
 
freightcar
Guest
Posts: n/a

 
      11-29-2006, 01:20 PM
I have a problem setting up uplink load balancing, i followed lartc
instructions and set up this

P0_NET="10.10.1.0/24"
P1_NET="10.10.2.0/24"
P2_NET="10.10.3.0/24"

IF1=eth0
IF2=eth2
IF0=eth1

IP1="10.10.2.1"
IP2="10.10.3.1"

P1="10.10.2.2"
P2="10.10.3.2"

ip route add $P1_NET dev $IF1 src $IP1 table T1
ip route add default via $P1 table T1
ip route add $P2_NET dev $IF2 src $IP2 table T2
ip route add default via $P2 table T2

ip route add $P1_NET dev $IF1 src $IP1
ip route add $P2_NET dev $IF2 src $IP2

ip route add default via $P1

ip rule add from $IP1 table T1
ip rule add from $IP2 table T2

ip route add $P0_NET dev $IF0 table T1
ip route add $P2_NET dev $IF2 table T1
ip route add 127.0.0.0/8 dev lo table T1
ip route add $P0_NET dev $IF0 table T2
ip route add $P1_NET dev $IF1 table T2
ip route add 127.0.0.0/8 dev lo table T2

ip route add default scope global nexthop via $P1 dev $IF1 weight 1 nexthop
via $P2 dev $IF2 weight 1

10.10.2.2 and 10.10.3.2 are both NAT boxes. The problem is that, route set
in "ip route add default scope global nexthop via $P1 dev $IF1 weight 1
nexthop via $P2 dev $IF2 weight 1
" command as last will always be used. if i switch the order the other one
will be used.

this is my main rt:

~# ip route
10.10.2.0/24 dev eth0 proto kernel scope link src 10.10.2.1
10.10.3.0/24 dev eth2 proto kernel scope link src 10.10.3.1
10.10.1.0/24 dev eth1 proto kernel scope link src 10.10.1.21
default
nexthop via 10.10.2.2 dev eth0 weight 1
nexthop via 10.10.3.2 dev eth2 weight 1


if the active route goes down, no route will be used.

tHanks


 
Reply With Quote
 
 
 
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Load balance two webservers Fabio Windows Networking 3 03-15-2007 08:03 PM
Load balance giel.vanboxtel@nextprint.nl Linux Networking 1 12-19-2006 12:36 PM
Load Balance RDP ScottO Windows Networking 1 07-19-2004 03:14 AM
Double Masquerade for Load Balance ? Awie Linux Networking 2 12-25-2003 07:45 AM
load balance several gateways Peter King Wireless Internet 1 11-06-2003 07:37 AM



1 2 3 4 5 6 7 8 9 10 11