From: "hareram" Date: Mon, 08 Aug 2005 05:43:05 +0000 Subject: [LARTC] Loadbalancing and failover using TC and Iptables Message-Id: <018701c59bda$5f42db40$0903a8c0@southern> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: lartc@vger.kernel.org Hi all iam trying to deploy loadbalance and failover My setup description --Fedora Core 4 --Linux 2.6.12.3 #1 SMP Mon Jul 25 22:37:34 IST 2005 i686 i686 i386 GNU/Linux --tc utility, iproute2-ss050314 --ip utility, iproute2-ss050314 --iptables v1.3.0 And i had deployed Following configuration #table main with priority 50, the highest one ip rule add prio 50 table main #table 201 ip rule add prio 201 from x.x.x.234 table 201 ip route add default via x.x.x..233 dev eth1 src x.x.x.234 proto static table 201 ip route append prohibit default table 201 metric 1 proto static #table 202 ip rule add prio 202 from y.y.y.10 table 202 ip route add default via y.y.y.9 dev eth0 src y.y.y.10 proto static table 202 ip route append prohibit default table 202 metric 1 proto static #table 222 ip rule add prio 222 table 222 ip route add default equalize table 222 proto static nexthop via x.x.x.233 dev eth1 nexthop via y.y.y.9 dev eth0 #essential masquerade option iptables -t nat -A POSTROUTING -s 192.168.3.0/24 -j MASQUERADE Above is my setup when try to traceroute to yahoo.com iam able to see the trafffic going to both interfaces.. till now works fine when i connected to eth2 ( eth2 of linux box configured IP 192.168.3.2) with my Laptop using ip 192.168.3.1 gateway 192.168.3.2( linux box eth2) when try to traceroute its always going to y.y.y.9 when i go and check whatismyip.com and findmyip.com its shows only y.y.y.10 IP, why my traffic is not balancing using both the routes ?? when i change the my rule like following ip route replace default equalize table 222 proto static nexthop via x.x.x.233 dev eth1 when try to traceroute its always going to y.y.y.233 when i go and check whatismyip.com and findmyip.com its shows only y.y.y.234 IP, could some one help me to resolve this issue and suggest me what is need to be done if i want nat and other IP's to be loadbalance may be i call it per packet loadbalance thanks in advance hare _______________________________________________ LARTC mailing list LARTC@mailman.ds9a.nl http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc