| how to make load balancing?? i used the following script to make load balancing on the 2 internet NIC's eth0,eth2
..while iam getting requests from the LAN on eth1
part of the script:
------------------------------------------------------------------------------------------------------------
eth0ip=192.168.0.84 # inside
eth1ip=10.0.0.1 # LAN IP
eth2ip=82.201.210.166
subnet=10.0.0.0/24
subeth0=192.168.0.0/24
subeth2=82.201.210.160/29
provider0=192.168.0.3
provider2=82.201.210.161
DNS1=192.168.0.5
#-----------------------------LOAD BALANCING---------------------------------
ip route flush table t1 all
ip route flush table t2 all
ip route flush cache
#*****************
ip route add $subeth0 dev eth0 src $eth0ip table t1
ip route add $subeth2 dev eth2 src $eth2ip table t2
#*****************
ip route add default via $provider0 table t1
ip route add default via $provider2 table t2
#*****************
ip rule add from $eth0ip table t1
ip rule add from $eth2ip table t2
#*****************
ip route add $subnet dev eth1 table t1
ip route add 127.0.0.0/8 dev lo table t1
ip route add $subnet dev eth2 table t2
ip route add 127.0.0.0/8 dev lo table t2
#*****************
ip route add default scope global nexthop via $provider2 dev eth2 weight 1 nexthop via $provider0 dev eth0 weight 1
#-----------------------------------------------------------------------------------------------------------
but after using tcdump to c the result..eth2 always has traffic more than eth0
can any 1 help in that plz?? |