OPNsense Forum

Archive => 18.1 Legacy Series => Topic started by: DanMc85 on February 22, 2018, 07:04:08 pm

Title: WAN DHCP Lease Status
Post by: DanMc85 on February 22, 2018, 07:04:08 pm
Is there a spot that shows the date and time a WAN DHCP release is up and will renew?  I looked in the interfaces -> Overview section of the dashboard but didn't see anything.

Thanks
Title: Re: WAN DHCP Lease Status
Post by: seamus on February 23, 2018, 09:13:15 am
Your WAN interface is the client. As I understand the DHCP process, the client must know when his lease expires as it's the client's responsibility to reach out to the server before lease expiration, and request a renewal. But as the lease expiration time isn't shown in the WAN interface page, I don't think this is something that's provided in the GUI. But it's gotta' be in the system somewhere -  I'd hazard a guess that it's in the dhclient.leases database.

And FWIW, there is an "Advanced" tab for DHCP Client configuration under the Interfaces->WAN menu, but it doesn't seem to offer an answer to your question. You might want to have a look at it though - may give you some ideas.
Title: Re: WAN DHCP Lease Status
Post by: marjohn56 on February 23, 2018, 12:24:44 pm
It's handled by dhclient, providing you're not using pppoe, in which case it's handled by that.

If it's handled by dhclient, then the only place you'll see it is in the dhcpd logs, look for dhclient entries as shown here.

This is from my sub ( test ) router which gets its address from the primary router. You can see the renewal time is 3600 seconds, and sure enough, it renews 1 hour later.