Netgate Discussion Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Search
    • Register
    • Login

    Load balancing over 4 WAN & One LAN…?

    Scheduled Pinned Locked Moved Routing and Multi WAN
    10 Posts 4 Posters 3.9k Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • A
      amitabh
      last edited by

      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:
      http://wiki.pfsense.com/wikka.php?wakka=OutgoingLoadBalancing
      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.

      Regards
      Amitabh
      network.jpg
      network.jpg_thumb

      1 Reply Last reply Reply Quote 0
      • A
        amitabh
        last edited by

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

        Amitabh

        rrd_wan.png
        rrd_wan.png_thumb
        rrd_opt1.png
        rrd_opt1.png_thumb
        rrd_opt2.png
        rrd_opt2.png_thumb
        rrd_opt3.png
        rrd_opt3.png_thumb
        nat_rules.jpg
        nat_rules.jpg_thumb
        lb_screen.jpg
        lb_screen.jpg_thumb

        1 Reply Last reply Reply Quote 0
        • S
          sai
          last edited by

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

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

          1 Reply Last reply Reply Quote 0
          • A
            amitabh
            last edited by

            Thanks for the new link.

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

            1 Reply Last reply Reply Quote 0
            • D
              databeestje
              last edited by

              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.

              1 Reply Last reply Reply Quote 0
              • A
                amitabh
                last edited by

                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 192.168.2.1), (vr0 192.168.3.1), (rl2 192.168.4.1), (vr1 192.168.5.1) } round-robin inet from 192.168.1.0/24 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.)

                1 Reply Last reply Reply Quote 0
                • H
                  hoba
                  last edited by

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

                  1 Reply Last reply Reply Quote 0
                  • A
                    amitabh
                    last edited by

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

                    1 Reply Last reply Reply Quote 0
                    • A
                      amitabh
                      last edited by

                      Verified. Seems to be working as expected.

                      Amitabh

                      1 Reply Last reply Reply Quote 0
                      • S
                        sai
                        last edited by

                        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.

                        1 Reply Last reply Reply Quote 0
                        • First post
                          Last post
                        Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.