Isc-dhcpd static ip within range

isc-dhcp

I have a isc-dhcpd server with dhcp-range 10.0.0.10 – 10.0.0.20.
There is also a device connected with static ip 10.0.0.10.
What would happen when a client with dynamic ip connects to the network?

What if I changed the static ip to 10.0.0.20, and connect the client with the dynamic ip?

Thanks in advance

Best Answer

So you have a subnet declaration... Presumably 10.0.0.0/8 (or /24, I suppose).

And you have a subnet range inside the subnet declaration, of 10.0.0.10 10.0.0.20

Like:

subnet 10.0.0.0 netmask 255.255.255.0 {
  range 10.0.0.10 10.0.0.20
}

And then you have a static IP declaration, presumably like

group {
host static-host {
    hardware ethernet 1a:6b:6a:32:a5:01;
    fixed-address 10.0.0.10;
  }
}

So the next available address that the DHCPd knows about is .11

The dhcp server will never hand out an address to a dynamic client where the fixed-address is specified elsewhere with a hardware ethernet address.

You should be able to change the static-host's declaration to change the fixed-address, restart the dhcp server, and then rebind any dynamic clients. They address may change (if they had either .10 or .20), but if they were in the range .11 to .19, their address may not change.