Static IP and IP management

classic Classic list List threaded Threaded
22 messages Options
12
Reply | Threaded
Open this post in threaded view
|

Re: Static IP and IP management

glenn.satchell
Hi Bernard,

ISC dhcpd ships with a very comprehensive set of man pages, so I would
suggest perusing these:

dhcpd.conf, dhcpd, dhcp-options, dhcp-eval

In this case the reserved leases are mentioned in the dhcpd.conf man page.
I've included the section below in the hope that google will find it for
future searches.

I would also suggest that you can approximate a reserved lease by setting
the lease time to be very long, say 1 year (31536000 seconds).

regards,
-glenn

man dhcpd.conf
...
RESERVED LEASES
     It's often useful to allocate a single address to  a  single
     client,  in  approximate  perpetuity.   Host statements with
     fixed-address clauses exist to a  certain  extent  to  serve
     this  purpose,  but  because host statements are intended to
     approximate 'static configuration',  they  suffer  from  not
     being referenced in a littany of other Server Services, such
     as dynamic DNS, failover, 'on events' and so forth.

     If a standard dynamic lease, as from any range statement, is
     marked  'reserved',  then the server will only allocate this
     lease to the client it is identified by (be that  by  client
     identifier or hardware address).

     In practice, this means that the lease  follows  the  normal
     state  engine,  enters ACTIVE state when the client is bound
     to it, expires, or is released, and any events  or  services
     that would normally be supplied during these events are pro-
     cessed normally, as with any other dynamic lease.  The  only
     difference is that failover servers treat reserved leases as
     special when they enter the FREE or  BACKUP  states  -  each
     server applies the lease into the state it may allocate from
     - and the leases are not placed on the queue for  allocation
     to  other  clients.   Instead  they  may  only be 'found' by
     client identity.  The result  is  that  the  lease  is  only
     offered to the returning client.

     Care should probably be taken to ensure that the client only
     has  one  lease  within a given subnet that it is identified
     by.

     Leases may  be  set  'reserved'  either  through  OMAPI,  or
     through  the 'infinite-is-reserved' configuration option (if
     this is  applicable  to  your  environment  and  mixture  of
     clients).

     It should also be noted that leases  marked  'reserved'  are
     effectively treated the same as leases marked 'bootp'.

On Fri, February 26, 2016 2:26 am, Bernard Fay wrote:

> I have to find out about this "reserved" thing. I don't understand it.
> Google, please, help me!
>
>
> On Wed, Feb 24, 2016 at 1:44 PM, Chuck Anderson <[hidden email]> wrote:
>
>> On Wed, Feb 24, 2016 at 01:17:13PM -0500, Bernard Fay wrote:
>> > When the dhcpd server assign a static IP to a device, it also instruct
>> bind
>> > to add an entry in the DNS zone file.  One thing I realized is that if
>> a
>> > device didn't renew his lease, the entry in the DNS zone file is not
>> > removed.  I would have thought to use the zone files to know if a
>> device
>> is
>> > in use or not.  I had in mind that the lease time would have help to
>> know
>> > if a device therefore an IP is use or not.  In other words, a device
>> > requires an IP and the dhcpd server assigned it a statically defined
>> IP
>> > address. The dhcpd server also instruct bind to add an entry in the
>> > appropriate zone file.  Eventually the device is turned off, the lease
>> time
>> > reach its limit then I would have expected the dhcpd server to
>> instruct
>> > bind to remove the entry regarding this device but it is not the case.
>> > Then I could have take a look at the zone files to know what is in
>> used
>> and
>> > I would know what is not in use.
>> >
>> > Either I made something in my configuration or I was expecting too
>> much
>> > from dhcpd and bind.
>>
>> You can do that, but you have to use "reserved" leases rather than
>> fixed-address statements.  ISC dhcpd doesn't track the expiry of
>> fixed-address leases.
>> _______________________________________________
>> dhcp-users mailing list
>> [hidden email]
>> https://lists.isc.org/mailman/listinfo/dhcp-users
>>
> _______________________________________________
> dhcp-users mailing list
> [hidden email]
> https://lists.isc.org/mailman/listinfo/dhcp-users


_______________________________________________
dhcp-users mailing list
[hidden email]
https://lists.isc.org/mailman/listinfo/dhcp-users
Reply | Threaded
Open this post in threaded view
|

Re: Static IP and IP management

Bernard Fay
Thanks Glenn,

Of course I saw it in the man page but yet I have no clue how to use it and more specifically how it will be useful for us. I think I'll have to experiment with it.  So far, what I understand is that an IP will be assigned by dhcpd daemon and the only, and probably good way, to find the IP assigned to a server will be by doing a nslookup on the hostname. Of course if proper integration is done with BIND.

Thanks,
Bernard



On Thu, Feb 25, 2016 at 7:10 PM, Glenn Satchell <[hidden email]> wrote:
Hi Bernard,

ISC dhcpd ships with a very comprehensive set of man pages, so I would
suggest perusing these:

dhcpd.conf, dhcpd, dhcp-options, dhcp-eval

In this case the reserved leases are mentioned in the dhcpd.conf man page.
I've included the section below in the hope that google will find it for
future searches.

I would also suggest that you can approximate a reserved lease by setting
the lease time to be very long, say 1 year (31536000 seconds).

regards,
-glenn

man dhcpd.conf
...
RESERVED LEASES
     It's often useful to allocate a single address to  a  single
     client,  in  approximate  perpetuity.   Host statements with
     fixed-address clauses exist to a  certain  extent  to  serve
     this  purpose,  but  because host statements are intended to
     approximate 'static configuration',  they  suffer  from  not
     being referenced in a littany of other Server Services, such
     as dynamic DNS, failover, 'on events' and so forth.

     If a standard dynamic lease, as from any range statement, is
     marked  'reserved',  then the server will only allocate this
     lease to the client it is identified by (be that  by  client
     identifier or hardware address).

     In practice, this means that the lease  follows  the  normal
     state  engine,  enters ACTIVE state when the client is bound
     to it, expires, or is released, and any events  or  services
     that would normally be supplied during these events are pro-
     cessed normally, as with any other dynamic lease.  The  only
     difference is that failover servers treat reserved leases as
     special when they enter the FREE or  BACKUP  states  -  each
     server applies the lease into the state it may allocate from
     - and the leases are not placed on the queue for  allocation
     to  other  clients.   Instead  they  may  only be 'found' by
     client identity.  The result  is  that  the  lease  is  only
     offered to the returning client.

     Care should probably be taken to ensure that the client only
     has  one  lease  within a given subnet that it is identified
     by.

     Leases may  be  set  'reserved'  either  through  OMAPI,  or
     through  the 'infinite-is-reserved' configuration option (if
     this is  applicable  to  your  environment  and  mixture  of
     clients).

     It should also be noted that leases  marked  'reserved'  are
     effectively treated the same as leases marked 'bootp'.

On Fri, February 26, 2016 2:26 am, Bernard Fay wrote:
> I have to find out about this "reserved" thing. I don't understand it.
> Google, please, help me!
>
>
> On Wed, Feb 24, 2016 at 1:44 PM, Chuck Anderson <[hidden email]> wrote:
>
>> On Wed, Feb 24, 2016 at 01:17:13PM -0500, Bernard Fay wrote:
>> > When the dhcpd server assign a static IP to a device, it also instruct
>> bind
>> > to add an entry in the DNS zone file.  One thing I realized is that if
>> a
>> > device didn't renew his lease, the entry in the DNS zone file is not
>> > removed.  I would have thought to use the zone files to know if a
>> device
>> is
>> > in use or not.  I had in mind that the lease time would have help to
>> know
>> > if a device therefore an IP is use or not.  In other words, a device
>> > requires an IP and the dhcpd server assigned it a statically defined
>> IP
>> > address. The dhcpd server also instruct bind to add an entry in the
>> > appropriate zone file.  Eventually the device is turned off, the lease
>> time
>> > reach its limit then I would have expected the dhcpd server to
>> instruct
>> > bind to remove the entry regarding this device but it is not the case.
>> > Then I could have take a look at the zone files to know what is in
>> used
>> and
>> > I would know what is not in use.
>> >
>> > Either I made something in my configuration or I was expecting too
>> much
>> > from dhcpd and bind.
>>
>> You can do that, but you have to use "reserved" leases rather than
>> fixed-address statements.  ISC dhcpd doesn't track the expiry of
>> fixed-address leases.
>> _______________________________________________
>> dhcp-users mailing list
>> [hidden email]
>> https://lists.isc.org/mailman/listinfo/dhcp-users
>>
> _______________________________________________
> dhcp-users mailing list
> [hidden email]
> https://lists.isc.org/mailman/listinfo/dhcp-users


_______________________________________________
dhcp-users mailing list
[hidden email]
https://lists.isc.org/mailman/listinfo/dhcp-users


_______________________________________________
dhcp-users mailing list
[hidden email]
https://lists.isc.org/mailman/listinfo/dhcp-users
12