PfSense does not renew dhcp after flaky modem reconnects
-
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.
-
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?
-
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.
-
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.
-
You had a really special case.
No need to clutter the WegbGUI with stuff only very few people even think about to use. -
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 -
@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.