Fixed address inside dynamic range
David Forrest
drf at maplepark.com
Tue Mar 6 15:35:40 UTC 2012
On Tue, 6 Mar 2012, perl-list wrote:
> Not that this is exactly on-topic for this thread, but I would like to make sure I am correctly understanding...
>
> It seems that in DHCPv6 that fixed-address6 DOES remove the IP from the pool. man dhcpd.conf:
>
> " Any IPv6 addresses given to hosts with fixed-address6 are excluded from the range6, as are IPv6 addresses on the server itself. "
>
> That seems pretty clear, but given that this is NOT the case in DHCPv4, I just wanted to clarify.
>
> ----- Original Message -----
>
>> From: "Simon Hobson" <dhcp1 at thehobsons.co.uk>
>> To: "Users of ISC DHCP" <dhcp-users at lists.isc.org>
>> Sent: Tuesday, March 6, 2012 9:25:22 AM
>> Subject: Re: Fixed address inside dynamic range
>
>> Nuno Marques wrote:
>
>>> Isn't there any option so the dhcp server doesn't give a dynamic
>>> client one already used fixed address?
>
>> No
>
>>> It would be a real pain to reconfigure all my networks (which have
>>> lots of hosts inside dynamic range)
>
>> You reap the reward for an unplanned (not well managed ?) network.
>
>>> Any thoughts?
>
>> You may want to consider reserved leases. These act like normal
>> leases, but cannot be re-allocated to another client.
>> So you get the benefit of having a "fixed" address for a client, but
>> also the advantages of following the normal lease lifecycle (so DNS
>> updates work for example).
>
Assuming your fixed IPv4 address is in the pool and has NOT been
reassigned through dhcpd activities (yet), you can set up the reserved
statement by adding it to the dhcpd.leases file when dhcpd is not running.
You must add the complete statement and it should be expired (I just
picked this one out of my leases file):
lease 192.168.102.123 {
starts 1 2011/09/05 17:34:21;
ends 1 2011/09/12 17:34:21;
tstp 1 2011/09/12 17:34:21;
cltt 1 2011/09/05 17:34:21;
binding state free;
reserved;
hardware ethernet 1c:af:f7:d0:64:ee;
client-hostname "n150router" ;
}
Upon restart, dhcpd will write out the updated lease file and it will
include your new expired reserved lease which will be updated and assigned
per normal usage of dhcp (comment out the fixed-address statement in your
dhcpd.conf, if any). In any case, dhcpd will not allocate it to another
machine.
Dave
--
David Forrest
St. Louis, Missouri
More information about the dhcp-users
mailing list