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

    Failover support added for Load balancing in latest snapshot

    Routing and Multi WAN
    14
    43
    18.1k
    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
      cheeky
      last edited by

      WAN is via PPPOE (ADSL), WAN2 is static(also ADSL).
      Load balancing is working before upgrading it to your latest snapshot (1-7-2007), so i'm sure my configs are working.
      Loaded it via firmware upgrade, not a full install. Is this an issue?

      Cannot access internet if the selected gateway in the LAN dafault rule is the balancer, but can access internet when changing it to default. My rules are all default, nothing special except for the 127.0.0.1 rule for the FTP.

      1 Reply Last reply Reply Quote 0
      • M
        Mercredi
        last edited by

        cheeky: i also updated my pfsense through the firmware update feature. but i didnt used load balance before on this installation, so it's a new pool. check your monitor IP's, be sure they are different from each other and are accesible also.

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

          And make sure the monitor ips are on the network of the ISP.  Adding google as a monitor ip which most people do is WRONG.

          The IP needs to be a few hops out on the SAME ISP.  Traceroute out of each of the WANS and find a next hop router to use as the monitor IP.  Just pulling one out of your head is wrong and is asking for trouble.

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

            Monitor IPs need to be unique over all interfaces. So you can not add the google IP for multiple interfaces.

            Ignoring the fact that the IP probably lives across a trans atlantic link or some such.

            Do a traceroute from/to each internet connection and find yourself the upstream router. That is way more reliable and they differ for each interface. After changing the firewall rule did you actually wait for the rules to finish loading?

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

              I just set up some testenvironment in my lab and tested this with a failoverpool of wan and opt1, both set to dhcp and it works like a charm. Good job seth!

              Btw, lot's of people have demanded this feature and now that it is available only that few testers? Come on all you loadbalancing users out there, we need some feedback!  ::)

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

                Firstly, Let me say great job guys. keep up the good work.

                Can someone get an updated/easier howto posted? I think this would help adoption.
                I have looked at two different articles, one from the wiki, and one from somewhere
                else on the site.  They are slightly different, and that makes things even more confusing
                for someone who hasn't done this before.

                That being said, I seem to have gotten mine to work well with three wans. I do have a problem
                that has caused me to turn off the Load Balancing. As soon as I create a firewall rule setting the
                default route the the loadbalancer, I can't access my IPSEC client's.

                I have tried to create different rules, etc to get traffic to pass over the IPSEC, but have failed.

                I am the IPSEC Host, the rest of the clients are all mobile. I was looking for a way to set IPSEC
                to use the default gateway, or force it to one lan, but can't seem to find a way to do so.

                I tried creating the following LAN rule, figuring ipsec could communicate to my network, but my
                network couldn't communicate back. the ip 111 used below would be the original default gateway
                ip.

                *  LAN net  *  192.168.2.0/24  *  111.111.111.111 Default LAN -> IPSEC

                Help, please :)

                1 Reply Last reply Reply Quote 0
                • M
                  Mercredi
                  last edited by

                  @hoba:

                  Btw, lot's of people have demanded this feature and now that it is available only that few testers? Come on all you loadbalancing users out there, we need some feedback!  ::)

                  failover available only in the "latest snapshot", we can test it only on the testing environment. for example me: my testing environment is my home and my home network.

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

                    @Sn3ak:

                    Firstly, Let me say great job guys. keep up the good work.

                    Can someone get an updated/easier howto posted? I think this would help adoption.
                    I have looked at two different articles, one from the wiki, and one from somewhere
                    else on the site.  They are slightly different, and that makes things even more confusing
                    for someone who hasn't done this before.

                    The new page is a lot easier. Just add a interface and it's monitor IP to the server list using the add button.
                    Or just pick the gateway from each interface as the monitor IP. that works in a pinch.

                    That being said, I seem to have gotten mine to work well with three wans. I do have a problem
                    that has caused me to turn off the Load Balancing. As soon as I create a firewall rule setting the
                    default route the the loadbalancer, I can't access my IPSEC client's.

                    Are your ipsec clients in another subnet or are they assigned addresses in the LAN address range?
                    If they have different addresses you need to create a allow any from lan to vpnsubnets rule with the default gateway assigned.

                    1 Reply Last reply Reply Quote 0
                    • T
                      tunge2
                      last edited by

                      Is there a doc availlable of how to install the load-balancing function….?

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

                        If you do have 2 wan, go to Services -> Load Balancer, Create a new pool, type gateway, add the interfaces and monitor IPs, Save and apply.
                        Then go to Firewall -> Rules -> Lan and edit the Lan->Any rule, change the gateway from default to your just created pool.

                        Good Luck.

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

                          Can I have 2 pools at the same time? One with simple load balancer and the other with failover?

                          I was thinking that the failover would be used with ssl stuff and load balancer for everything else

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

                            Yes, that will work fine.

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

                              I have setup load balance using DSL (PPPoE) as the WAN interface, and Cable (dhcp) as an optional interface.  I added a loadbalancing gateway pool as described in this thread, but it does not work properly.  If I used the loadbalancing gateway DNS name resolution doesn't work for any clients on my network.

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

                                Add static routes for the DNS servers forcing the traffic out the correct interfaces.

                                1 Reply Last reply Reply Quote 0
                                • R
                                  Rockyboa
                                  last edited by

                                  Hi all,

                                  Been trying this new feature.  I have two WAN and one is using a very costly per Mb.  If my top gateway become available again will it switch back after a fail over?

                                  Also I was wondering, how come in my routing table the gatway always stays to the top one in my pool when I look at my route.

                                  Martin

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

                                    Yes, it will switch back.  Not sure what you are asking about the route table but we do not route multi-wan via regular routing.  It is handled via PF itself.

                                    1 Reply Last reply Reply Quote 0
                                    • V
                                      Veni
                                      last edited by

                                      Great function  :D. I have at home a 100 Mbit line connected to the city's MAN and a ADSL line as a secondary link.
                                      Great to have something to automate the switch between the WAN's if the primary line goes down, instead of as today, manually connecting cables  :-.

                                      @databeestje:

                                      If you do have 2 wan, go to Services -> Load Balancer, Create a new pool, type gateway, add the interfaces and monitor IPs, Save and apply.
                                      Then go to Firewall -> Rules -> Lan and edit the Lan->Any rule, change the gateway from default to your just created pool.

                                      Good Luck.

                                      My problem appears at

                                      add the interfaces

                                      because only one NIC is in the list, the NIC named "WAN".
                                      I have my secondary ISP on the OPT1 NIC, but i cannot choose it.

                                      Both ISP's issues IP address with the help of DHCP. The ADSL unit is a modem with 4 switchports.
                                      The 100 Mbit MAN line is a simple Ethernet twisted pair cable.

                                      The computer running pfSense has 1 onboard 3Com and 2 3Com 3C905 PCI cards.

                                      How do I tell the failover function that the OPT1 NIC is a WAN NIC so that it gets in the list named "Interface Name" @ load_balancer_pool_edit.php page?

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

                                        Only NICs that have a gateway assigned will be listed in the selection. I guess your OPT1-WAN is not connected and/or has no dhcp lease yet. Make sure it got an IP and gateway assigned first. Then revisit the poolcreationscreen.

                                        1 Reply Last reply Reply Quote 0
                                        • V
                                          Veni
                                          last edited by

                                          Thanks, that did the trick  ;).

                                          Is there a way of controlling the

                                          ping intervall time,
                                          ping reply timeout time,
                                          how many ping timeouts that are needed before it failsover,
                                          plus controlling how many successful pings on the primary isp that are needed to do a failback?

                                          If at this time it is not possible to manually control the above values,
                                          is there a way to find out what the values are today, even if they are hardcoded?

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

                                            @Veni:

                                            Thanks, that did the trick  ;).

                                            Is there a way of controlling the

                                            ping intervall time,
                                            ping reply timeout time,
                                            how many ping timeouts that are needed before it failsover,
                                            plus controlling how many successful pings on the primary isp that are needed to do a failback?

                                            Not currently.

                                            @Veni:

                                            If at this time it is not possible to manually control the above values,
                                            is there a way to find out what the values are today, even if they are hardcoded?

                                            1 second timeout, 1 interval every 5 seconds.  Newer snapshots have been changed to ping interval of 3, timeout 2 seconds.

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