Load Balancing Problem



  • Hi,
    I am using 2.3.5-RELEASE-p2 (i386) on a PC Engines ALIX-board. vr0 is WAN1, vr1 is WAN2 and vr2 is LAN with DHCP server.

    0_1542449840554_Unbenannt.PNG

    WAN1 is a DSL 25 Mbit/s download & 5 Mbit/s upload (DHCP client, via DSL Modem)
    WAN2 is UMTS 23 Mbit/s download & 7 Mbit/s upload (DHCP client, via UMTS Modem)

    I added a gateway-group as shown in https://www.netgate.com/docs/pfsense/routing/multi-wan.html . Both gateways in the group are at same tier an weight (weight tuning later). Both connections are etablished and online in the dashboard. If i disconnect one or the other, fallback works.

    BUT: download speed doesnt add itself (i used multiple connections an only WAN1 is used). On the other hand upload speed does (getting around 12Mbit/s).

    If i use a traceroute, pfsense is always routing via WAN1... If I change cables (WAN1 now UMTS, WAN2 now DSL) it again preferres WAN1.

    There are (at the moment) no firewall or nat rules.

    Any suggestions?



  • You cannot bind together multiple WAN connections and aggregate all of that bandwidth because pfSense cannot do that. You have to go to your ISP and have them bind together all of those WAN circuits for you to aggregate the bandwidth.

    Load balancing isn't designed to work the way you want it to, and there is nothing that can be changed in pfSense or any other router to make it do what you want it to do. The circuits need to be bonded for bandwidth aggregation, and that's at the ISP level.



  • Well, pfsense can do what I want, but I may have told you wrong.

    First: I solved the problem. I forgot to add the gateway-group to the IPv6 firewall rule an the speed test ran via IPv6.

    Of couse pfsense can not bond two connections. But it can provide a combined speed of WAN1 + WAN2 if there are 2 streams of data (one going via WAN1, the other via WAN2). And that is what I wanted to do. This is even supported by some speedtesters (linke speedtest.net). pfsense uses a round robin method to send and recive packages via two WAN connections. In my case: before max 25 MBit/s, now about 41 Mbit/s (more tuning to be done).

    Problem solved!


  • Netgate

    @pascalts said in Load Balancing Problem:

    pfsense uses a round robin method to send and recive packages via two WAN connections.

    Not exactly. pfSense uses a round robin method to distribute connections between the two WANs. This ratio can be controlled by the weights on each gateway. The amount of traffic currently being sent/received on each interface has nothing to do with this decision.

    Load balancing works best when lots of states are being distributed between the various WAN interfaces.

    It does not balance bandwidth per se because there is no way to know what a state/connection is going to do when it is established.



  • @derelict said in Load Balancing Problem:

    Load balancing works best when lots of states are being distributed between the various WAN interfaces.

    Okay, thanks for the clearification. As it happens we do have many "small" connections, so pfsense will do its job (7 VOIP Phones, 7 PCs with Mail and Database acces, file transfers). Next step will be traffic shaping... Priority for VOIP ;-)

    By the way: Until now I used ipfire. But a single WAN will be to slow and ipfire does only support failover but not Multi WAN.