OPNsense Forum

English Forums => 25.7, 25.10 Series => Topic started by: clarknova on January 20, 2026, 04:16:06 AM

Title: Periodic interface reset - renews DHCP lease?
Post by: clarknova on January 20, 2026, 04:16:06 AM
OPNsense 25.7.11_2

My ISP has informed me that my assigned IP address will change at midnight. Looking at /var/db/dhclient.leases.igc0 (WAN), I see that my lease is valid for a few more days.

So I set up a cron job for shortly after midnight for periodic interface reset on wan. Will this have the desired effect of renewing the lease on the WAN and pulling the new address?
Title: Re: Periodic interface reset - renews DHCP lease?
Post by: franco on January 20, 2026, 12:16:58 PM
Well it cannot renew, but the interface reset is indeed what you want it will release and get a new one.


Cheers,
Franco
Title: Re: Periodic interface reset - renews DHCP lease?
Post by: nero355 on January 20, 2026, 01:07:24 PM
Quote from: clarknova on Today at 04:16:06 AMinterface reset
Quote from: franco on Today at 12:16:58 PMinterface reset
Why are we not talking about a nice and clean DHCP Release & DHCP Renew ?!

When someone says 'Interface Reset' it sounds to me like they are just Disabling/Enabling the Interface or doing some weird driver related stuff or just pulling the cable and those things are a last resort in general...
Title: Re: Periodic interface reset - renews DHCP lease?
Post by: franco on January 20, 2026, 01:31:39 PM
Well, we're talking about the documented cron job name "periodic interface reset":

https://docs.opnsense.org/manual/settingsmenu.html#cron

And not all interfaces use DHCP but can still be "periodically reset".

Please don't shoot the messenger.  This terminology was invented before we started our project.  :)


Cheers,
Franco