Search code examples
dhcp

What happens when DHCP renew on occupied ip address?


I am experimenting on the DHCP behavior and came across this thought. If I did not renew/rebind in time, and waited for the lease to be finished then at this moment, when I try to perform a renew, what will happen?

From what I understand, since the lease is up, it should be free to assign to another client. If the IP address I was having previously was allocated to another client, by performing a renew on it, will I still be connected to the router? Does anyone know about this?

Thank you. Sue~


Solution

  • „will I still be connected to the router?“ is a strange question in the context of DHCP, as DHCP is a UDP protocol and you never make any connections. And the DHCP client is only talking to a DHCP server and has no idea of a „router“. The other part of your question is about a renew after the lease is up. If the DHCP server has not used the IP in other assignments then you will get the IP address anyhow. If the IP is no longer available, then the response will be a DHCPNAK.