-   Linux - Networking (
-   -   Tell DHCP to not rebind its old lease. (

1veedo 12-14-2009 05:37 PM

Tell DHCP to not rebind its old lease.
DHCP automatically wants to rebind an old lease which, after switching mac addresses, causes it to fail.

net.eth0          |dhcpcd: version 5.0.6 starting
net.eth0          |dhcpcd: eth0: rebinding lease of XXX.XXX.XXX.XXX
net.eth0          |dhcpcd: eth0: broadcasting for a lease
net.eth0          |dhcpcd: timed out                                    [ !! ]
net.eth0          |* ERROR: net.eth0 failed to start

If I do this two or three times it eventually gets a NAK fail and then broadcasts for a new lease (at which point it gets and new IP address and starts working). Is there a way to make it skip that step altogether and try to get a brand new IP address from the beginning?

edit -- FYI I'm pretty sure the old lease is stored in a file somewhere, it might be sufficient to simple delete the file but I don't know where it's located.

nimnull22 12-14-2009 07:05 PM

In my OpenSuse it is /var/lib/dhcpcd

1veedo 12-15-2009 05:34 PM

Yep, removing the file in that directory works. Thanks.

1veedo 06-20-2010 06:30 PM

Another way to prevent dhcpcd from renewing its old leases, in gentoo, is USE=-zeroconf.

All times are GMT -5. The time now is 01:37 PM.