A Question on Dynamic DHCP/DNS IP Lease Renew

David Li dlipubkey at gmail.com
Thu Sep 29 01:34:22 UTC 2016


Hi Simon,

Thanks for the explanation. It seems like most of the cases the IP
will be the same after reboot unless it's taken somehow.

What if I want a fixed IP assignment to the server?

Should I use "fixed address":

#
# host name and MAC
#
host node-1-1 {

  hardware ethernet   10:00:00:7a:a9:98;

  option host-name    "node-1-1";

  fixed-address 10.3.2.38;

}

My concern is will this work with Dynamic DNS update?


Or is there a "dynamic address allocation algorithm" option I can use
to fix the assignment?


David


> ------------------------------
>
> Message: 6
> Date: Wed, 28 Sep 2016 22:30:31 +0100
> From: Simon Hobson <dhcp1 at thehobsons.co.uk>
> To: Users of ISC DHCP <dhcp-users at lists.isc.org>
> Subject: Re: A Question on Dynamic DHCP/DNS IP Lease Renew
> Message-ID: <A25B5C53-6596-4708-A16A-F4D3EE1BC1DE at thehobsons.co.uk>
> Content-Type: text/plain; charset=us-ascii
>
> David Li <dlipubkey at gmail.com> wrote:
>
>> My question is: if the server is rebooted, will it come back and be
>> assigned the same IP 10.3.2.38 again as long as its MAC stays the
>> same?
>>
>> I tested a few times and it seemed to be the case. Are there any
>> circumstances that a different IP will be assigned to the same server?
>
> Yes - mostly.
>
> The server will attempt to give every client the same address as it had previously. If the address has not been reassigned to another client, then this will happen. At this point, it's probably worth setting out the allocation algorithm used by the ISC server (other servers operate differently, and mostly in a non-RFC-compliant manner).
>
> In the following, everything is subject to admin restrictions/policies - eg by allow/deny rules ...
> If a client has previously had an address from this server appropriate to the network segment AND that address is still available AND the address is permitted to be allocated to the client THEN the client will be given that address. Otherwise a different address will be allocated as follows :
> If there are any "never used" addresses available then one of those will be allocated.
> Else an expired lease will be recycled - based on least recently used.
> If there are no free leases, then any abandoned leases will be recycled.
> If we get to this point, then there's no address available.
>
> So for a device to lose it's address, regardless of how long it's been off the network and it's lease expired, there must have been enough client churn for the address to have been reused in accordance with the above.
>
> Lastly, there is the definition of client. The primary key for the lease database is the Client-ID, and only if that is missing will the client MAC be used. This means that if the Client-ID changes - or if it's missing, the MAC - then the client is deemed to be a different client.
> There is also the issue of multiple client OSs. Windows defaults to using the MAC address as Client-ID, most other OSs default to leaving it blank - thus the client will appear as two different clients to the server. Eg when using PXE - at every boot the PXE client gets one address, then the OS gets a different one.
>
>
>
>
> ------------------------------
>
> Subject: Digest Footer
>
> _______________________________________________
> dhcp-users mailing list
> dhcp-users at lists.isc.org
> https://lists.isc.org/mailman/listinfo/dhcp-users
>
> ------------------------------
>
> End of dhcp-users Digest, Vol 95, Issue 15
> ******************************************


More information about the dhcp-users mailing list