7

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.

Zoredache
  • 130,897
  • 41
  • 276
  • 420
user52883
  • 201
  • 2
  • 2

1 Answers1

4

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.

the-wabbit
  • 40,737
  • 13
  • 111
  • 174
  • 3
    Could you write a little bit more on why all the connection to the same destination go through the same link in such configuration? I'm just trying to figure this out, and even started a question here: http://unix.stackexchange.com/questions/284416/ – Mikhail Morfikov May 20 '16 at 12:36