# PBM: dhcpcd lease file must be deleted to get a new IP

## VinzC

Hi.

I have dhcpcd-5.1.3-r1 and today I had to delete the lease file (/var/lib/dhcpcd/dhcpcd-bond0.lease) I had at work otherwise dhcpcd wouldn't get an IP address from my home DHCP server (a linksys router w/ DD-WRT v24). I saw in the log dhcpcd wanted to rebind the IP address I had at work, which was refused by DD-WRT. Is there a way to tell dhcpcd not to try to rebind a previous lease?

Thanks for any hint/suggestion.

----------

## UberLord

Get dhcpcd to release the lease when it stops, then it won't attempt to rebind at next start.

If using net.xxx, add this to /etc/conf.d/net

dhcp_eth0="release"

If using the dhcpcd init script, add this to /etc/conf.d/dhcpcd

stopsig=SIGHUP

----------

## VinzC

Thanks, Roy. That did it. I used dhcpcd config file in fact but that the same as using /etc/conf.d/net, I presume...

----------

## VinzC

Option release actually doesn't work. It's been a couple of times I've been forced to remove the lease file before dhcpcd could get an IP address at home. Otherwise dhcpcd systematically fails. I must have been mistaken the first time.

----------

