0

I have a linux server which acts as a dhcp server. Dhcp lasse range is 10.15.0.50 - 10.15.255.250. The first ip it leased is 10.15.80.10 Is there any specific reason for this? It keeps leasing ips lik 10.81 .82 and so on.

1
  • Please edit your question and add more information. Did you change the configuration? Were address ranges 10.81.* etc. part of a previous configuration? Please show the configuration file and the configuration of the network interface[s], e.g output of ip addr.
    – Bodo
    Commented Sep 23, 2019 at 10:49

1 Answer 1

1

My understanding is that addresses are no longer assigned (or "offered") sequentially, but are rather from a hashed selection of the range. This means that a DHCP client could be offered any of the available addresses, and the next client could be offered any other. If they seem to be sequential after the first, that may be coincidence, or some artifact of the hashing used, but in any case as long as all the addresses offered are in the expected range I wouldn't worry about it.

https://linux.die.net/man/5/dhcpd.conf says:

The DHCP server generates the list of available IP addresses from a hash table. This means that the addresses are not sorted in any particular order, and so it is not possible to predict the order in which the DHCP server will allocate IP addresses. Users of previous versions of the ISC DHCP server may have become accustomed to the DHCP server allocating IP addresses in ascending order, but this is no longer possible, and there is no way to configure this behavior with version 3 of the ISC DHCP server.

You must log in to answer this question.

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