====== Network Load Balancing ====== ===== Descripción ===== ===== Prerequistos ===== ===== Procedimiento ===== ===== A. Instalación básica ===== ===== B. Configuración ===== === 1. Una accion === === 2. Segunda accion === ===== Problemas ===== ==== 1. Si el instale_mrtg.sh no le funciona ==== - ===== Referencias ===== - http:%%//%%blog.taragana.com/index.php/archive/how-to-load-balancing-failover-with-dual-multi-wan-adsl-cable-connections-on-linux/ -- - FIN Las tablas toca definirlas /etc/iproute2/rt_tables and add custom routing tables for each ISP: text 10 etb 20 tigo ============================================================= #!/bin/sh # by skina # DEV1=eth0 DEV2=ppp0 #IP address of external interfaces. This is not the gateway address. IP1=192.168.69.10 IP2=`ifconfig $DEV2 | head -n 2 | tail -n 1 | cut -d: -f 2| awk '{print $2}'` #Gateway IP addresses. This is the first (hop) gateway, could be your router IP #address if it has been configured as the gateway GW1=192.168.69.1 GW2=10.64.64.64 NET1="192.168.69.0/24" NET2="10.64.64.64/32" # Relative weights of routes. Keep this to a low integer value. I am using 4 # for TATA connection because it is 4 times faster W1=2 W2=1 # Broadband providers name; use your own names here. NAME1=etb NAME2=tigo ################### --------- ahora si hagale route del -net default echo "ip route add $NET1 dev $DEV1 src $IP1 table $NAME1" ip route add $NET1 dev $DEV1 src $IP1 table $NAME1 echo "ip route add default via $GW1 table $NAME1" ip route add default via $GW1 table $NAME1 echo "ip route add $NET2 dev $DEV2 src $IP2 table $NAME2" ip route add $NET2 dev $DEV2 src $IP2 table $NAME2 echo "ip route add default via $GW2 table $NAME2" ip route add default via $GW2 table $NAME2 echo "ip rule add from $IP1 table $NAME1" ip rule add from $IP1 table $NAME1 echo "ip rule add from $IP2 table $NAME2" ip rule add from $IP2 table $NAME2 echo "ip route add default scope global nexthop via $GW1 dev $DEV1 weight $W2 nexthop via $GW2 dev $DEV2 weight $W2" ip route add default scope global nexthop via $GW1 dev $DEV1 weight $W1 nexthop via $GW2 dev $DEV2 weight $W2   ============================================================== ¿ ----