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

    [2.3.x] No default route on WAN PPPoE after link failure (with FIX, please test)

    Scheduled Pinned Locked Moved Problems Installing or Upgrading pfSense Software
    42 Posts 7 Posters 13.6k 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.
    • M
      Marlenio
      last edited by

      in the past days i post two thread about a problem with my pfSense installation with PPPoE fiber connection (Telecom Fibra). I have a bridged modem and pfSense made the authentication in PPPoE. With 2.2.6 it works without any kind of problem, with 2.3.x i have no internet connection, no ping, absolutely nothing.

      After some test, i find that after a link failure, pfSense lost default route on WAN (see attached "ko_default_route-png"). If i add manually (es: route add -net 0.0.0.0/0 79.19.236.134) all works (see "ok_default_route.png"), but my IP is dynamic, so when it changes internet connection get lost.

      With 2.2.6 default route works without problem. I don't know if is a issue of pfSense 2.3.x, but a make two different installation (x64 and Alix) and i had the same problem.
      Is there a way to add a workaround like adding a static default route on the PPPoE inferface instead of assigned PPPoE dynamic IP?

      EDIT: i found the way to add 0.0.0.0 static route to PPPoE interface: route add -net 0.0.0.0/0 -interface pppoe0. Is this a issue? Is there a way to fix, or make the route permanent?
      ko_default_route.png
      ko_default_route.png_thumb
      ok_default_route.png
      ok_default_route.png_thumb

      Marlenio

      1 Reply Last reply Reply Quote 0
      • J
        jumpymonkey
        last edited by

        I'm seeing the same thing. Up until 2.3.1_1 I didn't have a problem. 2.3.1_1 I had one incident which was resolved by a reboot. 2.3.1_5 never gets the route set up.

        Native IPv6 over the same link is fine, as is the ping test on the line (which is the only route entry in the IPv4 routing table).

        My configuration is a VMWare VM with the NIC passed through. Everything runs over VLANs on the NIC. PPPoE is using a 1500 baby-jumbo MTU.

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

          I open a ticket with pfSense, and found a temporary workaround: https://redmine.pfsense.org/issues/6495 . In this way, code is like 2.2.6 and pfSense works without any problem.

          Marlenio

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

            Sounds like that gateway isn't marked as default under System>Routing, what does that screen look like?

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

              Could be related: I noticed after upgrading Pfsense to todays minor updated, after the reboot the PPPoE interface said it was up, but no traffic was flowing, I had  to click 'disconnect' and 'reconnect' again under the interfaces, then all internet traffic started working again.

              From memory this has been a problem for quite some time, I'll see if I can find the original bug report.

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

                @cmb:

                Sounds like that gateway isn't marked as default under System>Routing, what does that screen look like?

                Gateway is marked as default: i tried to edit config and then save too, but with no luck. The only way i find to solve issue (without adding manually a static route every PPPoE restart) was modifying /etc/inc/interfaces.inc like this:

                /* Omit this, we maintain the default route by other means, and it causes problems with * default gateway switching. See redmine #1837 */
                if (($interface "wan" && $founddefaultgw false) || $setdefaultgw == true) {
                $setdefaultgw = true;
                $mpdconf .= <<<eod<br>set iface route default
                
                EOD;</eod<br> 
                

                I remove the REM in this piece of code, so it looks like same file in pfSense 2.2.6. In this way if i reboot pfSense, disconnect WAN cable, reset (bridget) modem, disconnect/reconnect WAN interface, default route is created and all PC in my LAN have internet access.

                default_gw.png
                default_gw.png_thumb
                default_gw_1.png
                default_gw_1.png_thumb

                Marlenio

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

                  @sammcj:

                  […]
                  From memory this has been a problem for quite some time, I'll see if I can find the original bug report.

                  Yes, there is redmine #1837 ticket about a similar issue, but the proposed solution by editing the file (/etc/inc/interfaces.inc) stop the creation of the default gateway if the PPPoE session is disconnected. For this reason i modified the code and now it look like that in version 2.2.6 (which worked perfectly).

                  Today i made some other test with my pfSense box (Atom 1037U CPU), an Alix, an HP DL380 end a portable DELL. My ISP is a 100/20 FTTC (Telecom Fibra). Same config: clean install, then restore from 2.2.6 config backup. Everybody have the same problems on PPPoE.

                  Marlenio

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

                    fyi - mine also has the default gateway set.

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

                      @cmb: do you think it would be possible to modify code so as to keep both version (2.2.6 and 2.3.x) in file /etc/inc/interfaces.inc? Code was modifyied in 2.3 for a issue (#1837) about multiwan gateway switching, but it seems to have problems with a single wan gateway config. In "single gateway mode" code would run set iface route default command, in "multi gateway mode" no.

                      Marlenio

                      1 Reply Last reply Reply Quote 0
                      • J
                        jumpymonkey
                        last edited by

                        I came back to pfsense having used another router while having this problem. Having started it up, I found that the PPP interface wouldn't come up. Looking under advanced config on the PPPoE link, no underlying interface was selected. Having set that the interface came up and routed correctly. I'll continue to monitor and see want happens when the underlaying DSL link fail cycles.

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

                          @jumpymonkey:

                          I came back to pfsense having used another router while having this problem. Having started it up, I found that the PPP interface wouldn't come up. Looking under advanced config on the PPPoE link, no underlying interface was selected. Having set that the interface came up and routed correctly. I'll continue to monitor and see want happens when the underlaying DSL link fail cycles.

                          Can you try the mod in /etc/inc/interfaces.inc i post?

                          Marlenio

                          1 Reply Last reply Reply Quote 0
                          • J
                            jumpymonkey
                            last edited by

                            It's working without the mod. I was about to try your mod, but now the interface is up and working as expected. I'll see what happens when I pull the modem link out later, and if that stops the routing working I'll apply the mod.

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

                              @jumpymonkey:

                              It's working without the mod. I was about to try your mod, but now the interface is up and working as expected. I'll see what happens when I pull the modem link out later, and if that stops the routing working I'll apply the mod.

                              What happened if you disconnect and riconnect WAN or PPPoE cable from modem?

                              Marlenio

                              1 Reply Last reply Reply Quote 0
                              • J
                                jumpymonkey
                                last edited by

                                I cycled the modem. When the link came back up, the I couldn't connect out to the Internet. Adding your fix and cycling the PPPoE link fixes the problem. Thanks!

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

                                  @jumpymonkey:

                                  I cycled the modem. When the link came back up, the I couldn't connect out to the Internet. Adding your fix and cycling the PPPoE link fixes the problem. Thanks!

                                  Well, my fix is actually the same code present in 2.2.6, that works without problem. Thank you for test.  :)

                                  Marlenio

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

                                    Is there a redmine on this?

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

                                      @robi:

                                      Is there a redmine on this?

                                      Yes: https://forum.pfsense.org/index.php?topic=113750.msg632702#msg632702

                                      Marlenio

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

                                        OK, for pfSense people to take this seriously you'll have to create it as a patch here:
                                        https://github.com/pfsense/pfsense

                                        Just register, choose your file, click the pencil icon to edit it, and it will create a fork for you. Then, submit a pull request for your fork. In the description, link to this topic and the redmine issue.

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

                                          @robi:

                                          OK, for pfSense people to take this seriously you'll have to create it as a patch here:
                                          https://github.com/pfsense/pfsense

                                          Just register, choose your file, click the pencil icon to edit it, and it will create a fork for you. Then, submit a pull request for your fork. In the description, link to this topic and the redmine issue.

                                          Hi Roby, i'm not a PHP developer, so i don't think it's a good idea modify code on my own. Anyway, in redmine #6495 i suggested a possibile change about code:

                                          if ONE GW then
                                              <the code="" i="" modify="">else (TWO or MORE GW)
                                              endif</the>
                                          `In this way it could work both configuration, one WAN gateway or two (or more).

                                          P.S. What do you mean for "…for pfSense people to take this seriously"?`

                                          Marlenio

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

                                            You said "my fix is actually the same code…" - I thougt you have a real fix for the problem...

                                            As far as I noticed over the years, code snippets posted on the forum almost never reach to be in the actual product.

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