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

    PfSense does not renew dhcp after flaky modem reconnects

    Scheduled Pinned Locked Moved DHCP and DNS
    7 Posts 3 Posters 6.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.
    • W
      Wayhome
      last edited by

      I have a Toshiba cable modem that feeds my pfSense 1.2 box and has the nasty habit of disconnecting from my ISP at random.  Each time it reconnects, however, pfSense does not automatically renew the WAN dhcp lease.  I  have to manually click release and renew on the interface status page to regain connectivity.  Is there a way to make pfSense do this automatically?  I'd like it to renew dhcp as soon as the modem has a good connection.  Your help is greatly appreciated.

      1 Reply Last reply Reply Quote 0
      • W
        Wayhome
        last edited by

        The system log tell me that when pfSense loses a connection, it only sends out DHCPDISCOVER for about a minute and if there are no DHCPOFFERS received, it binds to the previous address it had even though there is no connection.  It can be hours before it will try to renew the lease again.

        So it appears the answer to my problem is to make pfSense send DHCPDISCOVERs continuously until connected.  I do not want it to time out and bind to the old address.  How can I accomplish this?  What and where are the settings that control dhclient to make it do what I need?

        1 Reply Last reply Reply Quote 0
        • W
          Wayhome
          last edited by

          Where are all the pfSense gurus?  I desperately need some help with this.  Are the settings I need documented anywhere?  I'd hate to return to my old WRT54G (openwrt) which does not exhibit the same behavior but has other issues.

          1 Reply Last reply Reply Quote 0
          • W
            Wayhome
            last edited by

            I have solved this problem.  I had to dig into the code to find the "timeout" and "retry" entries I needed to change for dhcpclient in interfaces*dhcp_configure_ functions in /etc/inc/interfaces.inc.

            Why are they hardcoded?  Is there be an easy to edit dhcpclient.conf file or web form to override these values?  The ease-of-use factor goes way down when you have to hunt through code to configure the app.

            1 Reply Last reply Reply Quote 0
            • GruensFroeschliG
              GruensFroeschli
              last edited by

              You had a really special case.
              No need to clutter the WegbGUI with stuff only very few people even think about to use.

              We do what we must, because we can.

              Asking questions the smart way: http://www.catb.org/esr/faqs/smart-questions.html

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

                I have a similar problem with my cable.
                When it for some reason cuts out (the modem gives me a rfc1918-ip), it needs a reeboot.

                However, on that line, i use an OpenBSD-box with standard dhclient and the next time the dhcp-lease expires (it sets to 10mins when the line cuts out), and the modem have isp-connection again, it automaticcly gives me a real ip.

                So; net time it goes down for you, and you restart the modem, try and just wait out the lease-expire-time for your pf-box.

                Regards,
                Rikard

                1 Reply Last reply Reply Quote 0
                • W
                  Wayhome
                  last edited by

                  @GruensFroeschli:
                  You don't have to clutter the web-gui.  Simply look for a standard dhcpclient.conf first and if it exists, use that instead of the values in the code.

                  @rnilsson:
                  In my case, the pfsense box was not reconnecting again no matter how long I waited.  Besides, I rely heavily on my voip phone so even the 10 minute wait can be too long.  Most of my outages last only a couple of minutes or less.

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