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

    Load balancing - round-robin / random

    Routing and Multi WAN
    4
    10
    13.3k
    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.
    • C
      charles.regan
      last edited by

      Is pfsense doing round-robin or random load balancing?

      Does it pass outgoing traffic on both interface ? If I am loadbalancing two T1 will a speed test give me 3mbit ?

      Thanks

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

        Check the FAQ and wiki for pfSense.

        LoadBalancing will NOT double your speed. It will double your bandwidth.

        A simpler way to see it…
        You are adding more water pipes to your water tank, not making the water flow faster.

        This is useful if you have lots of clients on the LAN side with hefty bandwidth hogging
        applications. (Otherwise, you would use QoS to enforce how much they can consume).

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

          It uses roundrobin.

          You can have 3 mbi/s with that but not with a single download. If your client downloads from multiple sites with multiple connections you'll get 3 mbit.

          Example: at the same client downloading pfsense embedded image from mirror 1 and live cd from mirror 2:

          1.5 mbit/s from download mirror 1 (wan1 maxed out)
          1.5 mbit/s from download mirror 2 (wan2 maxed out)
          –-------------------------------------------------------------------------
          =3 mbit/s over all

          1 Reply Last reply Reply Quote 0
          • C
            charles.regan
            last edited by

            Thank you very much.

            1 Reply Last reply Reply Quote 0
            • C
              charles.regan
              last edited by

              OK two more questions :)

              Can i use QoS on both interface. OPT and WAN?

              Traffic seems to go only on the OPT interface. I've tried downloading multiple file on different PC from different server but the traffic was sent only to OPT.

              Thanks

              1 Reply Last reply Reply Quote 0
              • B
                billm
                last edited by

                @charles.regan:

                Is pfsense doing round-robin or random load balancing?

                Round robin.

                –Bill

                pfSense core developer
                blog - http://www.ucsecurity.com/
                twitter - billmarquette

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

                  The trafficshaper currently only works at two interfaces, so the answer is no (atm).

                  Are your WANs both static with static gateways? The loadbalancer needs static gateways. Did you create a gatewaypool and changed your rules to use the pool instead of one dedicated gateway?

                  1 Reply Last reply Reply Quote 0
                  • C
                    charles.regan
                    last edited by

                    Yes two different gateway. I've created a pool with both gateways. Firewall rules pointing to loadbalancing pool.

                    WAN – T1 (IP 149.217.134.185 Gateway: 149.217.134.190)
                    OPT1 --- Cable (IP 149.217.134.211 Gateway: 149.217.134.1)

                    I have a big problem with load balancing and host on the same subnet as OPT1.
                    All hosts that are with the same ISP and on the same subnet (OPT1 Cable) can't access my NATED server on my WAN T1 ?!?!
                    I have a server (DNS server, WEB Server, FTP server) behind pfsense with NAT port forwarding rules

                    I need to disable OPT1 and loadbalancing so these hosts can access my server.

                    Here is the firewall log.....
                    Dec 4 22:36:27 WAN 149.217.134.254:3695 10.0.0.2:21 TCP

                    Why is it trying to access my server with it's internal ip address ?

                    Can anybody help me figure this out
                    Thanks alot.

                    1 Reply Last reply Reply Quote 0
                    • C
                      charles.regan
                      last edited by

                      Ok. Dual WAN Config:

                      WAN: 149.217.134.185 /29
                      OPT: 149.217.134.211 /26

                      Client : 149.217.134.251 /26
                      Can't access NATed server on WAN . Blocked by firewall.

                      Firewall is saying:
                      WAN 149.217.134.251:3695 10.0.0.2:21 TCP

                      What's wrong!

                      1 Reply Last reply Reply Quote 0
                      • C
                        charles.regan
                        last edited by

                        170212 rule 10/0(match): block in on rl1: 149.217.134.251 > 10.0.0.2: ICMP echo request, id 512, seq 59649, length 40

                        If I put OPT interface DHCP, IP address is 149.217.50.100 /24, and it work.
                        If I put OPT interface Static, IP address is 149.217.134.211 /26, doesn't work.

                        help me please

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