Send dhcp-users mailing list submissions to
[email protected]
Advertising
To subscribe or unsubscribe via the World Wide Web, visit
https://lists.isc.org/mailman/listinfo/dhcp-users
or, via email, send a message with subject or body 'help' to
[email protected]
You can reach the person managing the list at
[email protected]
When replying, please edit your Subject line so it is more specific
than "Re: Contents of dhcp-users digest..."
Today's Topics:
1. Re: Static IP and IP management (Bernard Fay)
2. Re:Question on DHCP lease expiration (David Li)
----------------------------------------------------------------------
Message: 1
Date: Mon, 29 Feb 2016 15:24:50 -0500
From: Bernard Fay <[email protected]>
To: Users of ISC DHCP <[email protected]>
Subject: Re: Static IP and IP management
Message-ID:
<CAH3AE4Zw2oHy2uh5tQrsUTmi-w5faR9dB8fcq9vV=hkhv3t...@mail.gmail.com>
Content-Type: text/plain; charset="utf-8"
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 <[email protected]>
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 <[email protected]> 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
> >> [email protected]
> >> https://lists.isc.org/mailman/listinfo/dhcp-users
> >>
> > _______________________________________________
> > dhcp-users mailing list
> > [email protected]
> > https://lists.isc.org/mailman/listinfo/dhcp-users
>
>
> _______________________________________________
> dhcp-users mailing list
> [email protected]
> https://lists.isc.org/mailman/listinfo/dhcp-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
<https://lists.isc.org/pipermail/dhcp-users/attachments/20160229/3e38dea6/attachment-0001.html>
------------------------------
Message: 2
Date: Mon, 29 Feb 2016 13:07:20 -0800
From: David Li <[email protected]>
To: [email protected]
Subject: Re:Question on DHCP lease expiration
Message-ID:
<CAEuTsAwWqnD7F9vkeEOGFu=TWvOrTvkFs8=f1j8jwmhf3ho...@mail.gmail.com>
Content-Type: text/plain; charset=UTF-8
Hi Glenn,
This is exactly what I am looking for - to be able to *dynamically*
assign IP based on MAC address and automatically remove it from DNS
when the host is gone. I have tested this solution and work well with
DNS.
Thanks.
David
On Mon, Feb 29, 2016 at 4:00 AM, <[email protected]> wrote:
>
> Date: Mon, 29 Feb 2016 00:14:09 +1100
> From: "Glenn Satchell" <[email protected]>
> To: "Users of ISC DHCP" <[email protected]>
> Subject: Re: Question on DHCP lease expiration
> Message-ID:
> <[email protected]>
> Content-Type: text/plain;charset=iso-8859-1
>
> Sounds like you just need normal dynamic leases. these will expire when
> the client doesn't renew any more. You can add a host clause to set the
> hostname, "option hostname foo.example.org;" or similar that will carry
> through to the dns system. Just leave out the fixed-address statement.
>
> Even though it is a 'random' address, if you only use the DNS name to
> access the system then it doesn't matter what the IP address is.
>
> regards,
> -glenn
>
> On Sun, February 28, 2016 6:47 am, Patrick Trapp wrote:
>> There was a similar thread to this on this list over the last few days. I
>> believe reserved addresses were suggested rather than static, but you will
>> probably benefit from looking at the archive from the last week to see if
>> that OP was truly looking at the same situation as you.
>>
>>> On Feb 27, 2016, at 11:42 AM, David Li <[email protected]> wrote:
>>>
>>> I see!
>>> Do you have any suggestions to get around this? I do need to remove
>>> the assignment from the DNS
>>> if the host failed so others won't bother to contact the failed host.
>>> Of course I can let the application to deal with the
>>> timeout but still prefer to resolving this at DHCP/DNS level. It just
>>> seems logical and convenient.
>>>
>>> Maybe another related question is if I have to use static lease to map
>>> host MAC to a name to assign the IP. I need to assign meaningful names
>>> to our hosts in order for others to use them. That means the name
>>> assignment has to be based on what kind of application this host runs.
>>> I haven't found other dynamic ways to do this yet. Any suggestions?
>>>
>>>
>>> David
>>>
>>>> Date: Fri, 26 Feb 2016 17:46:04 -0800
>>>> From: Shawn Routhier <[email protected]>
>>>> To: Users of ISC DHCP <[email protected]>
>>>> Subject: Re: Question on DHCP lease expiration
>>>> Message-ID: <[email protected]>
>>>> Content-Type: text/plain; charset=utf-8
>>>>
>>>> The server treats dynamic and static leases differently.
>>>>
>>>> Dynamic leases have a lease structure that moves between
>>>> different queues and this is how the server knows when to
>>>> expire the lease and thence when to remove it from the DNS.
>>>>
>>>> Static leases don?t have a lease structure and so don?t get
>>>> expired and don?t get removed from the DNS.
>>>>
>>>> regards,
>>>> Shawn
>>>>
>>>>> On Feb 26, 2016, at 5:37 PM, David Li <[email protected]> wrote:
>>>>>
>>>>> Hi,
>>>>>
>>>>> This is my first post here.
>>>>>
>>>>> I am testing to see if an expired DHCP lease can result in the removal
>>>>> of the corresponding DNS record on Centos 7.
>>>>>
>>>>> So far I am able to let DHCP server assign an static IP based on the
>>>>> host's MAC address and add a DNS A record. The host is also able to
>>>>> refresh its lease every time it expires.
>>>>>
>>>>> But when I shut down the host, I don't see the record removed after
>>>>> the lease expired (5 min). Even more the syslog doesn't show any
>>>>> messages from DHCP server attempting to remove the IP address and
>>>>> update the BIND 9 (named) server. So I am thinking there might be
>>>>> something wrong or missing in my dhcpd.conf.
>>>>>
>>>>> Here is a snippet of my dhcpd.conf:
>>>>>
>>>>>
>>>>> # DNS options
>>>>>
>>>>> ddns-updates on;
>>>>> ddns-update-style interim;
>>>>> update-static-leases on;
>>>>> authoritative;
>>>>>
>>>>> allow unknown-clients;
>>>>> use-host-decl-names on;
>>>>> default-lease-time 300; #5 min
>>>>> max-lease-time 300; #5min
>>>>> log-facility local7;
>>>>>
>>>>>
>>>>>
>>>>> # static assignment
>>>>> #
>>>>> host node1 {
>>>>> hardware ethernet 08:00:27:0A:C3:1C;
>>>>> fixed-address 10.4.1.11;
>>>>> ddns-hostname "node1";
>>>>> }
>>>>>
>>>>>
------------------------------
_______________________________________________
dhcp-users mailing list
[email protected]
https://lists.isc.org/mailman/listinfo/dhcp-users
End of dhcp-users Digest, Vol 89, Issue 1
*****************************************