Pfsense not renewing DHCP lease when WAN interface goes down

I have a WAN connection which seems to change it’s IP once a day and most of the time when this happens that interface in pfsense goes down and won’t come back up until I manually release and renew the DHCP lease.

Does anyone have any ideas on what I can try to get this to work more reliably?

What do DHCP logs say on the device? Sounds like DHCP may be giving up and not retrying, or the lease time is too long.

If you can reliably narrow down the time it changes, maybe a cron job?

There’s no errors in the logs, as far as I can tell the logs are saying it’s getting an IP.

Yeah that’s an option, or some kind of script. But I’d really like to figure out a way for it to just work properly.

You want these logs from the DHCP client. Without these logs we can only guess what the issue is, and we don’t want to go guessing here.

You can probably simulate WAN failure by pulling the cable, if you can’t wait for it to happen again.

https://www.reddit.com/r/PFSENSE/comments/7gm8jj/wan_dhcp_log/dqk6k48/

I’ll have another look tomorrow, but I didn’t see anything obvious

This is from the DHCP logs from yesterday when the DHCP renewed correctly, the interface in question is em0.300

and this is from today when it is not renewing correctly

It seems to be trying to renew from the same address whereas when I manually release and renew it will use a different gateway address.

in fact here it is

Not sure about all the expecting semicolon line errors but this was a successful renewal so :man_shrugging:

You can install Service Watchdog in the package manager to automatically restart DHCP service when it stops working and many others. Hopefully it will renew DHCP lease after restart.


I think dhcpd is the DHCP server not the client, besides the service is running. The gateway monitor service should restart interfaces when they go down but for some reason the DHCP isn’t working correctly unless I renew it manually. It probably some issue with too long of a lease time or some other DHCP option but I don’t see anywhere obvious to change that without messing with the config files,whichnid like to avoid doing.

You could try to change default and maximum DHCP lease time under Services/HDCP

That’s also the DHCP server, not the client.