Re: load balancing between two default gateways

Linux Advanced Routing and Traffic Control

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



rsenykoff@xxxxxxxxxxxxxxx wrote:



<snip>


Now what I want may be "shapping" to route 70% traffic via 2Mb and
30 via 1Mb.
Is this possible via iproute2? if yes I will greatly appreciate if
someone helps newbie to iproute2 :)



You can read the multipath routing section on lartc.org - Click on "Dive in" :) </snip>

I've been running load balancing between my cable modem and dsl. It works
pretty well actually. Here's a link to the script I use:

http://www.burnpc.com/website.nsf/all/FE5F4F294F508EB786256E600019BC30

I also use the load balancer to do NAT between the subnet of the cable
modem, subnet of DSL, and subnet my boxes are on. Also in there are some
static route rules in case you always want to use a particular connection
for certain traffic. In my case, my DSL modem is used for VPNs to work
(Linksys BEFVP41) so I always send traffic for those IPs out through the
appropriate NIC.

To try to achieve the 70 / 30 rule I recommend doing something like this to
the line
ip route add default table 222 proto static nexthop via $GWE1 dev $IFE1
weight 1 nexthop via $GWE2 dev $IFE2 weight 1

ip route add default table 222 proto static nexthop via $GWE1 dev $IFE1
weight 7 nexthop via $GWE2 dev $IFE2 weight 3

I suggest reading up on the documentation to understand what those weight
parameters really do. In essence they add 7 routes via one interface, and 3
via the other. Then the load balancer round-robbins between them.

The easynews piece in there works in conjunction with Flashget. I set
flashget's multiproxy up, and it will create multiple threads over the two
ports. I'm able to download from easynews then at the total combined speed
of the connections ==== fast!!!

Let me know if you have any questions,
-Ron

_______________________________________________
LARTC mailing list / LARTC@xxxxxxxxxxxxxxx
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/


Thanks for the quick reply, okay i will let you know after reading the docs section you suggested. before going to deploy these ip rule on our production envirnoment I have few questions.
we are also doing iproute2 + iptables MARKing on this machine to route port 80 traffic to our proxy/cache servers. Now the ip rules you suggested will not do anything with those already in place okay?
#ip rule show
32764: from all fwmark 0x4 lookup wwwPcache.out <--- we have three like this
.
.
Second to make the ip rule working I still need the convention "route" in place before doing ip rule things?
# route add default gw xxx.xxx.xxx.xx ?


regards
Askar

_______________________________________________
LARTC mailing list / LARTC@xxxxxxxxxxxxxxx
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/

[Index of Archives]     [LARTC Home Page]     [Netfilter]     [Netfilter Development]     [Network Development]     [Bugtraq]     [GCC Help]     [Yosemite News]     [Linux Kernel]     [Fedora Users]
  Powered by Linux