Situation:

There are 2 providers that provide access to the Internet via Ethernet. 2 interfaces (in the present 2 computers with two servers).

Task:

Make a load balancer of the Internet channel, by the type of "black box" having 2+ IN-ethernet ports for different providers and one output to the switch / switch distributing the Internet to LAN.

Actually the questions: is there a hardware implementation for solving such a problem, and, accordingly, software solutions in the absence of hardware.

  • 2
    Mirotik has suitable routers (they are in google for the phrase "mikrotik router 2 wan"). But any balancer is not a trivial matter. habrahabr.ru/post/190352 in this article, for example, the situation with passing traffic to one site through different channels, i.e. Traffic can just go from one to the other. But some of the sites are sensitive to changing the user's ip - Mike

1 answer 1

The easiest solution is to use OpenWRT with mwan3 .

OpenWRT is installed on many routers, you can put it on a regular computer or miniature, for example Raspberry Pi.

You can configure through the configuration files https://wiki.openwrt.org/ru/doc/howto/mwan3

But there is a luci GUI , an interface for configuring several WAN uci-app-mwan3 . You can understand by trial and error in a few hours.

You can make a fail-over - use the main channel, and in case of failures - the backup one. You can create an ipset with a list of IPs to which to connect through one channel, and to which one through another.

You can use different WAN for different clients on the local network, or switch to one if the second one stops working.

But! It is impossible to increase the download speed, for example, a file via http, by merging channels (which is often what they want), even on direct local client-server links. This is due to the peculiarity of the TCP protocol - each packet has its own sequence number. If they are sent through two different channels - the delays are slightly different, the packets will not arrive in order, the client will assume that some packets are lost, re-request and, as a result, it will work worse than one channel by itself.

First you need to understand what kind of balancing will be most effective in your particular case.