# dhcp address release



## net_tech (Apr 16, 2016)

I have an eight day lease on DHCP addresses.  VMX0 NIC on FreeBSD 10.3 is configured for DHCP.
The only work around I came up with was to update rc.conf  with a static IP, restart the system or networking stack, then update rc.conf with DHCP and restart one more time.

Is there an easier way to release/renew IP address?

`service dhclient restart vmx0` mentioned here http://www.cyberciti.biz/faq/freebsd-unix-force-dhcp-client-to-get-a-new-lease does not renew the IP.


----------



## zspider (Apr 16, 2016)

I understand the solution was to delete the lease file.

`rm /var/db/dhclient.leases.interfacename`

That worked for me when I needed to remove a lease during a networking lab in college. It will recreate the lease file on it's own.


----------



## net_tech (Apr 16, 2016)

Yes, deleting the leases file and then restarting dhclient worked.

Thanks


----------



## da1 (Apr 18, 2016)

Or you can just kill the dhclient() daemon and manually start it up again.


----------

