Does a router know not to hand out static IP addresses to other devices?

  1. I set a computer on my network to use a Static IP address
  2. Shutdown the computer so its not on and not connected to the network

Question: How does my router know not to hand out that IP address to another device (using DHCP) that accesses the network?

All instructions that I see for understanding static IPs online only involve making changes to the client. It seems like you should need to tell your router/DHCP server not to assign that IP address to anyone else.

Can anyone help me understand this or point me to somewhere that will explain it?

UPDATE: Thanks for the responses. I guess what I've learned is that its better/easier to do DHCP Reservations at the router/DHCP server, instead of trying to do static IP addresses at each machine.


Solution 1:

Your router can indeed lease that IP address to another client once the lease expires if your machine is off or disconnected, and doesn't renew it. To guarantee you always get the same IP address, you'll want to make what's called a DHCP Reservation in your router (terminology may vary - see this question for details):

alt text

With DD-WRT firmware, you can find this under the Services section:

alt text

Solution 2:

If your router doesn't allow reservations (see John T's answer) then you should at least be able to change the DHCP pool, making it smaller and then use the IPs which fall outside of the pool for your statics.

Solution 3:

Agreed with the above. You can either setup a DHCP lease reservation for the addresses in question so that the DHCP server always gives that address to the machines in question, or you can define a static IP address that is outside of the DHCP pool.

I prefer option #1, using leave reservations. You handle all of your addresses in one place and are prevented from assigning the same address to more than one device. Also, for most devices with static IP addresses, they will not show up in the list of devices connected to the network due to most routers pulling that information from the DHCP lease information in the router. Client-side static IP addresses are very easy to mess up unless you keep a diagram or spreadsheet to keep them straight.