0

How long is the IP reserved by the DHCP server, when it sends the offer message? Imagine the client does not send back the request message, after how much time is the IP available again?

Thanks for your help.

Chris
  • 103
  • 4
ragnar
  • 11
  • Some details there: https://datatracker.ietf.org/doc/html/rfc2131#section-3.1 "Servers need not reserve the offered network address, although the protocol will work more efficiently if the server avoids allocating the offered network address to another client." => implementation specific. – A.B Feb 25 '22 at 23:12

1 Answers1

1

It's not available. A DHCP reservation, by definition, is reserved. It won't be assigned to any other device.

joeqwerty
  • 109,901
  • 6
  • 81
  • 172
  • It's been a couple of days that I've been trying to verify the above statement; unfortunately, with no luck. On the contrary, I came accross a few third-party sites, where people state that in case a device (with an associated MAC address) that has been assgined a reserved IP address (e.g., 192.168.1.2) is **offline** (disconnected), any other device may be assigned that very same IP address by the DHCP server. Is that true at all? Any relevant references are welcomed. – Chris Dec 18 '22 at 16:43
  • Can you cite those sources? I'd like to read them. – joeqwerty Dec 18 '22 at 16:56
  • 1
    If the DHCP server is configured to assign the IP address to a device with a specific MAC address it should not assign it to a device with a different MAC address. I don't think the second source is claiming anything different, although I didn't read all the comments. I wouldn't follow anything posted on Quora. – dunxd Dec 19 '22 at 19:44
  • @dunxd I wish there was a reference supporting that statement. So, the DHCP server would never assign that IP address to a different device, even if the original device (e.g., PC) is disconnected for some time? I managed to manually assign the same static IP to a different device (e.g., phone) by adjusting the network settings on the phone (not by using DHCP reservation on the router), while the PC was disconnected. Then, when the PC got connected, I came accross IP conflict. So, the DHCP server on its own may not assign that IP, but if another device requests it when is not used, is it given? – Chris Dec 19 '22 at 19:59
  • 1
    DHCP has no control over static assigned ip addresses. So it is possible to assign a static ip address to a device which conflicts with a DHCP assigned ip address. DHCP has no mechanism to prevent that. Furthermore, if a DHCP enabled device requested an ip address from the DHCP server that is reserved for another DHCP client, the DHCP server would refuse the request. – joeqwerty Dec 20 '22 at 00:41
  • Clients don't request a specific IP address. They just say, "hey, any DHCP server out there, tell me which IP address, subnet and gateway to use". The server decides how to answer. – dunxd Dec 20 '22 at 20:19
  • 1
    DHCP Option 50 would beg to differ with you. – joeqwerty Dec 20 '22 at 21:07
  • @dunxd By _"...if another device requests it"_, I meant by manually assigning a static IP address (as well as subnet mask, gateway, etc.) on the printer device. As joeqwerty explained, _"DHCP has no control over static assigned ip addresses"_ and that is the reason the example I provided eariler works, i.e., a second device can get the IP that is reserved for some other device, if the IP address is manually assigned on the second device and at the same time the other one is offline/disconnected. – Chris Dec 21 '22 at 04:58