Load balancing over 4 WAN & One LAN…?

  • Hi

    I am trying to Load Balance 4 WAN (DSL lines) with a single LAN connection on my 1.2BETA1 machine. All the WAN (WAN, OPT1,OPT2,OPT3) lines are of same capacity(512Kbps), being routed through DSL routers. All the 4 attached DSL routers are in 192.168.x.x range (made sure that all of them fall in different subnet - Please see the attached network diagram). The fifth line (with static ip) is not part of the Load Balancer.

    The problem is that apart from the WAN connection, data doesn't seems to be going on any other interface. I have checked the RRD graphs  and no data is being passed through them. I have checked the DSL lines individually through my laptop, and they are working fine.
    I have worked according to the page here:
    I have set up all the NAT rules as described, but still can't get it to work. All the traffic still goes to WAN interface only.

    I can put in the graphs and the NAT rules screenshot if that helps in resolving the problems.


  • Just to add, all the DSL routers are reachable via ping from the pfsense box.


  • Sorry, but you've used an old bit of doc….

    start again with  http://doc.pfsense.org/index.php/MultiWanVersion1.2

  • Thanks for the new link.

    I just forgot to modify the default LAN rule to set the gateway to Load balancer.

  • For you information, I use a similar setup with 2 dsl lines and 1 fiber line for outbound port 80 web traffic using load balancing. And that works really well.

  • yep, working like a charm now.

    Now off to a more complicated setup, where I would like to put more weight to one line with greater capacity than the others. It's possible in OpenBSD with pf, where you put in the gateway multiple times while defining the round-robin rule. Looking into the pf ruleset using "pfctl-sa", I see this line:
    pass in quick on rl0 route-to { (rl1, (vr0, (rl2, (vr1 } round-robin inet from to any keep
    state label "USER_RULE: LAN -> Any"

    If we can repeat the occurrence of any of the gateway multiple times, the weightage  given to that gateway increases. Atleast that's how it happens in OpenBSD+pf .

    Time to experiment it seems, although I must admit that I am not good at either sys-admin, or at PHP.

    (In case this is already possible through some other means, please indicate so that I don't go around fooling myself.)

  • Just add one of the gateways multiple times to the pool. Let us know if this works for you. I think it should.

  • This would work.
    Will get back to you after I verify it.

  • Verified. Seems to be working as expected.


  • I have one installation with 1Mb + a 256k links. To increase the load on the 1Mb link I added an additional monitor ip with the same gateway and worked great.