Strange DHCP behaviour

Simon Hobson dhcp1 at thehobsons.co.uk
Wed Oct 24 19:22:48 UTC 2018


tony <lists at vanderhoff.org> wrote:

> Despite this configuration I have failed to get that address for the
> laptop; it seems to be stuck on 192.168.1.254, currently. It may have
> legitimately had that address in the past.

The client is obviously retaining state of the address it once had, and is requesting that address. As the address is available for teh client, it is given it. Some ways to fix it :

Remove the address from the range(s) allowed in the server config. Next time the client requests the address, it will be refused (DHCP-Nack message), the client will then be given it's fixed address.

Split out the address to separate range (in a separate pool) and add "deny booting" to the range. As above, on the next renew the client will be refused.

Add "deny known clients" to the range. The host statement makes the laptop a known client, and so the deny known clients statement will mean that the client is not allowed an address from the range. So as above, next time the client sends a request, it will be refused.
Note that this would affect other hosts with a host statement.

Similar to above, define a class that matches the client and add "deny members of <name of class>" to the range.

Stop the server and edit the leases file. Find the last lease entry for the host and edit it - change the hardware and/or Client-ID fields so that the lease now belongs to a different client. Then start the server again. Next time the client sends a request, it will be denied as the server now thinks that the address belongs to a different client.
The lease will eventually time out and go into the pot to be re-used. It won't be reused until every address in the range(s) has already been used at least once - "never used before" addresses are used before any previously used address is re-used for a different client.



More information about the dhcp-users mailing list