Modify DHCP lease time on WAN Interface?

Started by agriff, December 03, 2020, 11:52:56 AM

Previous topic - Next topic
Hi,

My ISP's DHCP server has very long leases (~70 hours). However, if the cable modem is power-cycled or otherwise goes through a reset I need to re-request in order to get connectivity back. And it seems that OPNSense won't do this until the lease is running down. So I'm forced to manually intervene and bounce the WAN interface.

Is there someway to override the lease time so I can get opnsense to renew more frequently? Or alternatively trigger a renewal when the gateway goes unreachable?

Thanks,

Alan

Figured it out in the end (all answers are on Google, if you only know what to search for). For reference, in case anyone else needs to do this.


  • Select Interfaces -> WAN from the GUI
  • Select Advanced under  DHCP client configuration
  • In the Option Modifiers box add supersede dhcp-lease-time xxx
  • Where xxx is your desired lease time in seconds. dhclient will attept to renew when 50% of the lease time has elapsed.

Thanks for posting the solution after you found it! This (hopefully) saved my but! :)