dhcpd issue static lease on first request

Sten Carlsen stenc at s-carlsen.dk
Tue Oct 26 01:03:53 UTC 2010


I am not sure I follow your problem.

As long as you keep your leases file, one MAC should always get the same
IP, except if it has been given out since last time that MAC was seen.
The only reason it would be given out again is if you run out of IPs.

So if:
- you always retain the leases file
- have enough IPs that it will never be necessary to reuse IPs
then the default behaviour (mandated by RFC) is to always give the same
IP to a MAC.

I assume you see the problem? What does it look like when it happens?
Any specific way to make it happen?

The leases file is added to every time something happens to a lease -
and at some interval a new file is written with the current content of
the in-memory tables. So the last entry in the leases file is the valid one.


On 26/10/10 2:48, Christ Schlacta wrote:
> I looked into the leases. Mine seems to have built up alot of drift.
>  Anyway, I did considder that. I was hoping there was some built in
> mechanism to accomplish the same effect before I pursued that
>
> Sent from my iPhone
>
> On Oct 25, 2010, at 17:40, Tom Martinson <thomas.s.martinson at gmail.com
> <mailto:thomas.s.martinson at gmail.com>> wrote:
>
>> how about setting your lease time to something really really long? 
>> Or writing a script that will check the dhcp.leases file and then
>> make an entry for you?
>>
>> Tom
>>
>> On 10/25/2010 08:38 PM, Christ Schlacta wrote:
>>> That's how I started but a I've gotten more hosts it gets a bit
>>> demanding trying to catch each new nic mac and set an ip. I'd like
>>> to somehow automate the process of ensuring that every nic gets the
>>> first ip for forever. 
>>>
>>> Sent from my iPhone
>>>
>>> On Oct 25, 2010, at 17:26, Tom Martinson
>>> <thomas.s.martinson at gmail.com <mailto:thomas.s.martinson at gmail.com>>
>>> wrote:
>>>
>>>> Well, there are a couple of ways to do it.  The way that I do it
>>>> might not work for you, but after I define my subnets, I put an
>>>> entry in like this.
>>>>
>>>> host hgw2 {
>>>> hardware ethernet 00:26:18:e6:0e:a3;
>>>> fixed-address 172.30.3.20;
>>>> }
>>>>
>>>>
>>>> Tom
>>>>
>>>> On 10/25/2010 07:50 PM, Christ Schlacta wrote:
>>>>> Could you explain how or at least link to the relavent config
>>>>> entries please?
>>>>>
>>>>> Sent from my iPhone
>>>>>
>>>>> On Oct 25, 2010, at 15:52, Tom Martinson
>>>>> <thomas.s.martinson at gmail.com
>>>>> <mailto:thomas.s.martinson at gmail.com>> wrote:
>>>>>
>>>>>> Yes it is.
>>>>>>
>>>>>> On 10/25/2010 06:49 PM, Christ Schlacta wrote:
>>>>>>> is it possible to have dhcpd issue a static lease to a client on it's
>>>>>>> first connection, such that later when the same MAC address tries to
>>>>>>> connect again later, the same IP address is issued again and the same
>>>>>>> DNS entries are updated?
>>>>>>> _______________________________________________
>>>>>>> dhcp-users mailing list
>>>>>>> dhcp-users at lists.isc.org <mailto:dhcp-users at lists.isc.org>
>>>>>>> https://lists.isc.org/mailman/listinfo/dhcp-users
>>>>>>>   
>>>>>> _______________________________________________
>>>>>> dhcp-users mailing list
>>>>>> dhcp-users at lists.isc.org <mailto:dhcp-users at lists.isc.org>
>>>>>> https://lists.isc.org/mailman/listinfo/dhcp-users
>>>>>
>>>>>
>>>>> _______________________________________________
>>>>> dhcp-users mailing list
>>>>> dhcp-users at lists.isc.org <mailto:dhcp-users at lists.isc.org>
>>>>> https://lists.isc.org/mailman/listinfo/dhcp-users
>>>> _______________________________________________
>>>> dhcp-users mailing list
>>>> dhcp-users at lists.isc.org <mailto:dhcp-users at lists.isc.org>
>>>> https://lists.isc.org/mailman/listinfo/dhcp-users
>>>
>>>
>>> _______________________________________________
>>> dhcp-users mailing list
>>> dhcp-users at lists.isc.org <mailto:dhcp-users at lists.isc.org>
>>> https://lists.isc.org/mailman/listinfo/dhcp-users
>> _______________________________________________
>> dhcp-users mailing list
>> dhcp-users at lists.isc.org <mailto:dhcp-users at lists.isc.org>
>> https://lists.isc.org/mailman/listinfo/dhcp-users
>
>
> _______________________________________________
> dhcp-users mailing list
> dhcp-users at lists.isc.org
> https://lists.isc.org/mailman/listinfo/dhcp-users

-- 
Best regards

Sten Carlsen

No improvements come from shouting:

       "MALE BOVINE MANURE!!!" 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.isc.org/pipermail/dhcp-users/attachments/20101026/058a425c/attachment.html>


More information about the dhcp-users mailing list