4

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

2 Answers 2

2

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.

1

If you are asking if the DHCP server will assign a client an IP address that is already in use, the answer is no. At least not for the ISC server, per their documentation.

The DHCP server will check to see if an address is in use by using an ICMP echo packet before assigning it to a client. This allows a client with a self-assigned static IP address in your DHCP scope to peacefully exist on the network.

A well-administrated network will use DHCP reservations in cases like these.

If you are asking if a device with a self-assigned (static) IP address will connect to a network where that IP address is currently in use, it depends on the network device. The device should recognize that there is a duplicate IP address on the network, and de-activate the network interface.

However, the device doesn't have to. A rogue device could simply try to force itself on the network and cause connection problems for the other device that is using that IP address.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .