linux multipath routing load balance
I would like to know how to load balance two Business DLS links which have fixed IPs. I believe it would look something like this:
ip route add default scope global \
nexthop via gatewayDLS1 dev interface1 weight 1 \
nexthop via gatewayDLS2 dev interface2 weight 1
Is this be all I need in order to get multipath routing? Please, give me a more detailed answer if possible, thanks you.
Solution 1:
As you already figured out, you just can work with a multipath route using equal weights. But the granularity of the balancing will be rather bad - all requests to the same destination IP address will go through the same link. You might want something more finely tunable here - which you can get by adding a couple of iptables rules - this howto from tipsternet.com might give you a starting point.
For some background information there is a well-written section about multipath routing in Understanding Linux Network Internals (C.Benvenuti) which is even available online.