Does the DHCP server know about static IP addresses?

17

4

I have a simple setup up at home with a vendor provided ADSL router and a few home devices I connect to it to connect to the outside world. I would like one of my devices to have a static internal IP address so I can use it as a server inside my house. I have done this by just setting up a static IP address on the particular device. This seems to work. However,

Does the dhcp server in the router somehow know about this static ip address or might it try to hand out that ip address to another device that joins the networks?

felix

Posted 2015-04-10T14:18:42.640

Reputation: 471

1you should tell the router to assign a static ip to that particular client. That way, it will not give out that IP to another device. Depending on the setup, sometimes you don't even need to config the client. e.g.: my server gets its IP via DHCP, but the router has a static IP entry for it, so it ALWAYS gets the same IP. – Russell Uhl – 2015-04-10T14:23:44.200

Answers

21

In short the general rule of thumb is no the DHCP server will not know about this Static IP and if hands that same IP out to another device you will have an IP conflict which can take both devices offline.

You have a two options really:

  1. Check what the DHCP scope is and make sure your static IP is outside of that scope for example if your device hands out between 192.168.0.10 to 192.168.0.200 then set the static IP to 192.168.0.210

  2. If your DHCP router supports IP reservations you can reserve the IP so even if it is in the IP range you can tell it the Servers MAC address and it will always hand the same IP out to that device (kind of a mix of static and DHCP).

Hope that helps.

CharlesH

Posted 2015-04-10T14:18:42.640

Reputation: 1 943

Is this answer the complete? While working with local IT people I have had them tell me multiple times that setting the current DHCP-assigned address as a static IP is fine because the router will see it and not hand it out to another device. I can't for the life of me think of what to google to confirm this as there are a thousand pages about how to set a static IP on the local computer or at the router. Avoiding the DHCP range is best practice but my customers never have access to the router so I have to guess at the DHCP range by pinging for empty spots. – user922020 – 2019-10-07T14:49:57.030

1Hey, there is a little bit more to DHCP than what is written above, it was a simplified answer as most home routers DHCP is very basic. In terms of more expensive devices and Windows Server DHCP you do have something called 'Conflict Detection Attempts'. This setting will allow your DHCP Server to 'test' an IP to see if there is a conflict, this can normally be tweaked, if set to 0 and you have static IP's in your range could cause an IP conflict, if you up this to maybe 2 or more attempts before it will hand out the IP it can prevent conflicts...... – CharlesH – 2019-10-09T14:17:59.733

1....However if the device with a static IP does not respond back to say 'yes I have that IP assigned statically to me', in other words if no reply comes back to the device it will still hand it out and this can cause an IP conflict. As far as I'm aware there is no DHCP service which actively scans the range to check for static IP addresses, and DHCP naively does not add static IP's to its assigned pool. Hope this helps. – CharlesH – 2019-10-09T14:20:43.150