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

    Multi-WAN gateway failover not switching back to tier 1 gw after back online

    Scheduled Pinned Locked Moved Routing and Multi WAN
    119 Posts 35 Posters 53.3k 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.
    • Y
      yanakis
      last edited by

      @Derelict:

      Well you need to fix your DNS.  Sounds like it might not be working right on one or both WANs.  Are you using the forwarder or the resolver?

      It shouldn't matter which WAN the resolver uses because it should only be trying to talk to authoritative name servers that should accept queries from everywhere.

      The problem lies in forwarders because you usually point the forwarder at ISP caching servers and they might only accept connections from their network so it matters which DNS servers are used out which interface.

      I tried both the resolver and the forwarder, some sites are just not resolved. Unfortunately I don't think I can use pfsense in a production environment, for me at least failover it's not working with pppoe  :(.

      should "State Killing on Gateway Failure" should be on?

      Thanks

      1 Reply Last reply Reply Quote 0
      • DerelictD
        Derelict LAYER 8 Netgate
        last edited by

        Depends on whether or not you want states killed on a gateway failure.

        Chattanooga, Tennessee, USA
        A comprehensive network diagram is worth 10,000 words and 15 conference calls.
        DO NOT set a source address/port in a port forward or firewall rule unless you KNOW you need it!
        Do Not Chat For Help! NO_WAN_EGRESS(TM)

        1 Reply Last reply Reply Quote 0
        • Y
          yanakis
          last edited by

          @Derelict:

          Depends on whether or not you want states killed on a gateway failure.

          Well, isn't better to have them reset on a gw failure? The definition is a bit tricky for this option

          1 Reply Last reply Reply Quote 0
          • luckman212L
            luckman212 LAYER 8
            last edited by

            I only skimmed through this thread so I apologize if this was already suggested but – are you certain your clients are set to use the pfSense IP as their DNS resolver?  If e.g. you have a gateway defined with a custom monitor IP of 8.8.8.8 or the DNS servers on your General settings page are locked to a specific gateway, then static routes are built which will force traffic out that specific gateway, even if it's down.  So this could result in DNS being "dead" when one of the gateways goes down.  Is this possibly what's happening?

            1 Reply Last reply Reply Quote 0
            • Y
              yanakis
              last edited by

              @luckman212:

              I only skimmed through this thread so I apologize if this was already suggested but – are you certain your clients are set to use the pfSense IP as their DNS resolver?  If e.g. you have a gateway defined with a custom monitor IP of 8.8.8.8 or the DNS servers on your General settings page are locked to a specific gateway, then static routes are built which will force traffic out that specific gateway, even if it's down.  So this could result in DNS being "dead" when one of the gateways goes down.  Is this possibly what's happening?

              Monitor IPs are currently set to one of each ISP, in General I have a pair of DNSes set for each gateway (four servers in total). Clients DNS is manullay set  192.168.1.1 (pfsense)

              General.PNG
              General.PNG_thumb
              gateways.PNG
              gateways.PNG_thumb

              1 Reply Last reply Reply Quote 0
              • DerelictD
                Derelict LAYER 8 Netgate
                last edited by

                I tried both the resolver and the forwarder, some sites are just not resolved.

                If you do not know how to get more information than that about what's actually happening, you are probably in over your head.

                Chattanooga, Tennessee, USA
                A comprehensive network diagram is worth 10,000 words and 15 conference calls.
                DO NOT set a source address/port in a port forward or firewall rule unless you KNOW you need it!
                Do Not Chat For Help! NO_WAN_EGRESS(TM)

                1 Reply Last reply Reply Quote 0
                • Y
                  yanakis
                  last edited by

                  @Derelict:

                  I tried both the resolver and the forwarder, some sites are just not resolved.

                  If you do not know how to get more information than that about what's actually happening, you are probably in over your head.

                  Oh, nice. What can I say?Thanks? :)…..Thanks.

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

                    Hi

                    yanakis, in my case we have the fiber media converter and the router (not PPPoE), and happens the same. I switched off or disconnected the router, but never tried switching off media converter (good idea).

                    In my last installations I don't usually use DNS forwarder/resolver for localhost, but in this case I do (I configured it in the past and never change it). Have you tried deactivating that option in General Settings? Just to see if something changes.

                    I understand luckman212 concerns about DNS and static routes created by pfsense for each DNS associated to a wan, but in my case we had two different DNS configured and working, and failed. And in any case, once wan is recovered again, DNS works again and everything should work again.

                    By the way, I tried with "State Killing on Gateway Failure" on and off, and recover fails in both cases. I keep it unchecked, because with external sip connections is mandatory to make failover work (at least in my case). And I personally prefer to reset states if a gateway fails, to avoid problems.

                    Regards

                    PD: I don't think you are in over your head… Thanks for all

                    1 Reply Last reply Reply Quote 0
                    • Y
                      yanakis
                      last edited by

                      @arcanos:

                      Hi

                      yanakis, in my case we have the fiber media converter and the router (not PPPoE), and happens the same. I switched off or disconnected the router, but never tried switching off media converter (good idea).

                      In my last installations I don't usually use DNS forwarder/resolver for localhost, but in this case I do (I configured it in the past and never change it). Have you tried deactivating that option in General Settings? Just to see if something changes.

                      I understand luckman212 concerns about DNS and static routes created by pfsense for each DNS associated to a wan, but in my case we had two different DNS configured and working, and failed. And in any case, once wan is recovered again, DNS works again and everything should work again.

                      By the way, I tried with "State Killing on Gateway Failure" on and off, and recover fails in both cases. I keep it unchecked, because with external sip connections is mandatory to make failover work (at least in my case). And I personally prefer to reset states if a gateway fails, to avoid problems.

                      Regards

                      PD: I don't think you are in over your head… Thanks for all

                      Well, I left empty the DNS fields in General but failback to WAN still not working after WAN recovery unless I change something in Firewall or Routing and apply changes  :(

                      1 Reply Last reply Reply Quote 0
                      • Y
                        yanakis
                        last edited by

                        @jahonix:

                        @arcanos:

                        …and this looks like a pfsense problem...

                        I cannot second that!
                        I have this working for quite some time now with WAN1 (100Mb cable) and a rather old WAN2 (6Mb DSL).
                        I have failover to W2 if W1 is down and immediately W1 again when available.

                        Show us your System | Routing | Gateway Groups page.

                        Hi Cris. Can you please post your setup? Thanks

                        1 Reply Last reply Reply Quote 0
                        • jahonixJ
                          jahonix
                          last edited by

                          Well, Derelict wrote that my config seems to be a bit more complicated than necessary.
                          Since I trust him I usually would test his suggestion first and post afterwards. I just don't have the time for that in the foreseeable future…

                          I only use DSL as failover (it's 6Mbit) and rely on cable which is 100Mbit.
                          You will know why if you have teen kids...
                          Just checked and failover to DSL is working as well as fallback to cable when available again.

                          I set this up about a year ago and used the pfsense docs for that.

                          System-Gateways.png
                          System-Gateways.png_thumb
                          System-Gateway_groups.png
                          System-Gateway_groups.png_thumb
                          System-Gateways-Edit_gw_group.png
                          System-Gateways-Edit_gw_group.png_thumb

                          1 Reply Last reply Reply Quote 0
                          • DerelictD
                            Derelict LAYER 8 Netgate
                            last edited by

                            I have mine set up exactly like you do (A group with Tier 1 Cable, Tier 2 DSL and a group with Tier 1 DSL, Tier 2 Cable).

                            I was just commenting it's only necessary if you want to have rules that prefer the other circuit while maintaining the ability for those rules to fail over too.

                            I tested my failover yesterday since I was putting new splitters on my cable in anticipation of MoCA 2.0.  It all worked exactly as configured and when I was done it brought my Tier 1 back online just as it has many times before.

                            Chattanooga, Tennessee, USA
                            A comprehensive network diagram is worth 10,000 words and 15 conference calls.
                            DO NOT set a source address/port in a port forward or firewall rule unless you KNOW you need it!
                            Do Not Chat For Help! NO_WAN_EGRESS(TM)

                            1 Reply Last reply Reply Quote 0
                            • jahonixJ
                              jahonix
                              last edited by

                              i didn't criticize! I only mentioned that I might be done with half the work.  ;)

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

                                Hi again

                                Past week we've installed a new machine with 2.2.4 and two WAN with failover, and same problem. In this case we have to different LANs, and each one has one failover group with different order (one with wan1->wan2 and the other with wan2->wan1), and none of them redirect traffic to the main one when it's recovered (we have to do some change and Save, as yanakis says).

                                It's a new installation without anything strange. We run several tests in both directions, and I can confirm the problem exists. Never went back automatically to the recovered main wan.

                                We didn't find nothing new or more clues, it just doesn't work.

                                Regards

                                1 Reply Last reply Reply Quote 0
                                • superweaselS
                                  superweasel
                                  last edited by

                                  +1 with arcanos.

                                  In fact, instead of attempting to troubleshoot this and failing, it would be better if someone that has this working, would post a complete series of screenshots showing their setup. Then we can all learn from a working environment.

                                  pfSense rig: pfSense SG-4860/120GB SSD
                                  WAN: CenturyLink Gigabit Fiber

                                  1 Reply Last reply Reply Quote 0
                                  • DerelictD
                                    Derelict LAYER 8 Netgate
                                    last edited by

                                    Is PPPoE a common factor for those that don't work?  Both my WANs are DHCP.

                                    There's really nothing to it.  Create a gateway group with a Tier 1 and Tier 2 with member down as the trigger level and policy route to it.

                                    Chattanooga, Tennessee, USA
                                    A comprehensive network diagram is worth 10,000 words and 15 conference calls.
                                    DO NOT set a source address/port in a port forward or firewall rule unless you KNOW you need it!
                                    Do Not Chat For Help! NO_WAN_EGRESS(TM)

                                    1 Reply Last reply Reply Quote 0
                                    • superweaselS
                                      superweasel
                                      last edited by

                                      Correct, PPPoE is the default and DHCP is the failover.

                                      pfSense rig: pfSense SG-4860/120GB SSD
                                      WAN: CenturyLink Gigabit Fiber

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

                                        Not PPPoE in my case. This last case are two cable connections with routers with NAT and DMZ pointing to the wan interface of pfsense. But I've seen the problem with DSL and cable in bridge mode.

                                        1 Reply Last reply Reply Quote 0
                                        • E
                                          Enrica_CH
                                          last edited by

                                          On the first view I have the same issue but looking deeper I can see that my Gateway keeps really offline until I reapply the interface config page or reboot.

                                          Short decription of config and behavior:

                                          I have two gateways (1. fiber / 2. cable modem) with a routing group for balancing (tier 1 / tier 1). Both gateways are monitored against external DNS servers. The routing group is defined as gateway in FW rule. "Use sticky connection" on System-advanced-misc. is on.

                                          At the beginning after reboot all works fine an traffic is distributed to both gateways with weight 1:4.

                                          But after some minutes / hours always second gateway goes offline (100% package loss) and keeps this status until I reapply the interface config or reboot. It's not an apinger problem. The gateway is really broken. A ping from Diagnostic - ping with source of gateway doesn't work (100% loss). The cable modem isn't disconnect and it works if a plugin a notebook there. So Pfsense stops the gateway really and keep it broken. Even if I disconnect the lan wire and reconnect no reaction.

                                          Same happens on my backup Pfsense which is running in CARP mode. There is no traffic load but GW stops also.

                                          If I set routing group in redundant mode (GW 1 tier 1 / GW 2 tier 2 OR GW 2 tier 1 / GW 1 tier 2) then all work OK. The gateways keep online. Also after reconnection of wire the interface comes online again.

                                          My estimation is that there must be something wrong with balancing gateways. But I need the capacity of both gateways.

                                          1 Reply Last reply Reply Quote 0
                                          • C
                                            cheonne
                                            last edited by

                                            you should put a working monitor ip for each interfaces like dns ip

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