This is a discussion on Ip Route equalize w/ one machine via one ISP within the Linux Networking forums, part of the Linux Forums category; I've got 2 DSL's lines I'm attempting to load balance. I seem to have it working but ...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
I've got 2 DSL's lines I'm attempting to load balance. I seem to have it
working but I want to add one more thing. I want 10.0.2.252 to just go out over eth0, ie., I don't want that machine to use the load balancing. 10.0.2.254 is the gateway. INTERF0="eth0" INTERF1="eth1" NTSERV="10.0.2.252" LOCALIP0=`cat /etc/dhcpc/dhcpcd-eth0.info | grep IPADDR | cut -c8-21` LOCALIP1=`cat /etc/dhcpc/dhcpcd-eth1.info | grep IPADDR | cut -c8-21` # Clear old masq's / forwards ${NET}/iptables -L -t nat ${NET}/iptables -F -t nat ${NET}/iptables -F INPUT ${NET}/iptables -F OUTPUT ${NET}/iptables -F FORWARD ${NET}/iptables -t nat -F POSTROUTING ${NET}/iptables -t nat -F PREROUTING # Setup IP Masq echo 1 > /proc/sys/net/ipv4/ip_forward ip rule add from XXX.XXX.253.158 lookup 1 dev eth1 ip route add 10.0.0.0/24 via 10.0.2.254 table 1 ip route add 0/0 table 1 dev eth1 ip rule add from XXX.XXX.253.52 lookup 2 dev eth0 ip route add 10.0.0.0/24 via 10.0.2.254 table 2 ip route add 0/0 table 2 dev eth0 ip route add default equalize \ nexthop via XXX.XXX.253.1 dev eth1 \ nexthop via XXX.XXX.253.1 dev eth0 ${NET}/iptables -t nat -A POSTROUTING -o ${INTERF0} -j SNAT --to ${LOCALIP0} ${NET}/iptables -t nat -A POSTROUTING -o ${INTERF1} -j SNAT --to ${LOCALIP1} If I add a 3rd table/lookup for 10.0.2.252 and then try to add a default route for it. I get a msg that it already exists??? TIA, Mark |