Static Leases do not work

"Küppers, Malte" M.Kueppers at douglas-informatik.de
Fri Feb 3 08:33:04 UTC 2012


At first, thanks for your answers!

The problem I'am experiencing is that those reserved leases are not persistant.  When a client got a lease from the dynamic range and I set the "reserved" flag, which then is also shown in dhcpd.leases file. But after the client going offline and and some 
time passed, the lease is completely gone and therefore not stored anywhere? I still don't have a clue what "reserved" is good for if its not persistent? I guess I definetly will have to split my range into static and dynamic and set static hosts via omapi.
Editing the leases file or keeping a list of static MACs doesn't seem to be a sufficient solution to me. Will active static hosts update the dns or aren't the dns names set for static hosts?


Mit freundlichen Grüßen / Regards
Malte Küppers

-----Ursprüngliche Nachricht-----
Von: dhcp-users-bounces+m.kueppers=douglas-informatik.de at lists.isc.org [mailto:dhcp-users-bounces+m.kueppers=douglas-informatik.de at lists.isc.org] Im Auftrag von dhcp-users-request at lists.isc.org
Gesendet: Donnerstag, 2. Februar 2012 20:35
An: dhcp-users at lists.isc.org
Betreff: dhcp-users Digest, Vol 40, Issue 5

Send dhcp-users mailing list submissions to
	dhcp-users at lists.isc.org

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
	dhcp-users-request at lists.isc.org

You can reach the person managing the list at
	dhcp-users-owner at lists.isc.org

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 Leases do not work (Simon Hobson)
   2. Re: Static Leases do not work (jeffrey j donovan)
   3. Re: Static Leases do not work (Jeff Waller)
   4. Re: Static Leases do not work (Simon Hobson)
   5. Re: Static Leases do not work (Jeff Waller)


----------------------------------------------------------------------

Message: 1
Date: Thu, 2 Feb 2012 12:43:16 +0000
From: Simon Hobson <dhcp1 at thehobsons.co.uk>
To: Users of ISC DHCP <dhcp-users at lists.isc.org>
Subject: Re: Static Leases do not work
Message-ID: <p06240816cb50349497c9 at simon.thehobsons.co.uk>
Content-Type: text/plain; charset="iso-8859-1" ; format="flowed"

K?ppers, Malte wrote:
>... because the addresses defined are given out to dynamic clients 
>again (A side effect of mixing static and dynamic range).

Which is why any dtatic assignments must **NOT** be part of any dynamic range.

>Then I simply tried giving the lease the "reserved" state, which also 
>worked fine, but the reserved lease does not appear in dhcpd.leases 
>file after a while an so I guess it is not persistently stored? Whats 
>the difference between reserved and static ?

Static assignments are where you put a
fixed-address statement in a host declaration. 
These are processed differently to normal leases
- no dynamic DNS, no lease record, etc.
A reserved lease is just a normal lease which has been set as reserved to a specific client - it will not be reallocated even when long expired. 
It *should* appear in teh leases file.

>I just want a single IP range where leases can be dynamically made 
>static and keep that IP? Any ideas?

Either method shoudl work.
Either used fixed-address statements and do not include the fixed address in any dynamic range.
Or set a dynamic lease to reserved.

--
Simon Hobson

Visit http://www.magpiesnestpublishing.co.uk/ for books by acclaimed author Gladys Hobson. Novels - poetry - short stories - ideal as Christmas stocking fillers. Some available as e-books.


------------------------------

Message: 2
Date: Thu, 2 Feb 2012 07:55:35 -0500
From: jeffrey j donovan <donovan at beth.k12.pa.us>
To: Users of ISC DHCP <dhcp-users at lists.isc.org>
Subject: Re: Static Leases do not work
Message-ID: <AB0E0D44-98C4-44FE-ACC2-B4FD38443BB7 at beth.k12.pa.us>
Content-Type: text/plain; charset="windows-1252"


On Feb 2, 2012, at 4:10 AM, K?ppers, Malte wrote:

> Hi there,
>  
> I?m currently setting up a large DHCP Server in my company with about 10000 subnets. I managed to get everything working fine, but I want to set static addresses for some hosts (e.g. printers).
> The problem I?m experiencing is, that I don?t know how to make them 
> static persistently. I used omshell to register a new host object from 
> given MAC and set an IP but I?m not satisfied with that, because the addresses defined are given out to dynamic clients again (A side effect of mixing static and dynamic range). Then I simply tried giving the lease the ?reserved? state, which also worked fine, but the reserved lease does not appear in dhcpd.leases file after a while an so I guess it is not persistently stored? Whats the difference between reserved and static ?
> I just want a single IP range where leases can be dynamically made static and keep that IP? Any ideas?


create a zone and allocate a dynamic range. once your clients receive a lease you can create a static entry for them. BUT,.. you must change the range for dynamic. So that you don't have statics in the middle of your dynamic range.


#FHS-1541 zone1
subnet 10.154.0.0 netmask 255.255.0.0 {
		option routers 10.154.1.1;
		option domain-name-servers 10.154.1.2;
		range 10.154.2.1 10.154.2.254;
}

## static hosts
############
#### noc clients
include "/usr/local/etc/154_clients";

#### 154_clients
group {
option routers 10.154.1.1;
option domain-name-servers 10.154.1.21, 10.154.1.2;

	host recon77 {
	fixed-address 10.154.1.77;
	hardware ethernet 00:25:bc:df:b1:4c;
	}
	host FooBookPro {
	fixed-address 10.154.1.99;
	hardware ethernet 00:17:f2:d1:ff:f6;
	}
}#close group


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.isc.org/pipermail/dhcp-users/attachments/20120202/9af68a8f/attachment-0001.html>

------------------------------

Message: 3
Date: Thu, 2 Feb 2012 14:04:36 -0500
From: Jeff Waller <jeffw at cnxntech.com>
To: Users of ISC DHCP <dhcp-users at lists.isc.org>
Subject: Re: Static Leases do not work
Message-ID: <F44EDE2D-F721-4869-858E-13BAFE691E3D at cnxntech.com>
Content-Type: text/plain; charset="windows-1252"

I'm not sure this is what he is angling for.  I think what he wants is some directive that once a lease is given out to a mac address that matches a particular let's say class, that IP address is never given out to another mac address until it is revoked.  I think this is a not met by the suggestions so far.

Some important aspects:

1) He doesn't want to deal with the administrative hassle of defining a list of mac addresses, so "host" or "subclass" declarations can not be used

2) He doesn't want to deal with the minutia of having to edit the .conf file each time a new MAC is recognized.

What would happen if you set the lease time in a pool for these devices to infinity?  I think this would work for you, but if the client released the lease (which is something that clients are allowed to do) then if would become free.

Perhaps a new directive available at various scopes:

client-release-ignored

So how do get rid of a lease once you know you need to.  You could edit the leases file and restart, or more elegantly use OMAPI and forcibly set the lease expire time to now.


On Feb 2, 2012, at 7:55 AM, jeffrey j donovan wrote:


On Feb 2, 2012, at 4:10 AM, K?ppers, Malte wrote:

Hi there,

I?m currently setting up a large DHCP Server in my company with about 10000 subnets. I managed to get everything working fine, but I want to set static addresses for some hosts (e.g. printers).
The problem I?m experiencing is, that I don?t know how to make them static persistently. I used omshell to register a new host object from given MAC and set an IP but I?m not satisfied with that, because the addresses defined are given out to dynamic clients again (A side effect of mixing static and dynamic range). Then I simply tried giving the lease the ?reserved? state, which also worked fine, but the reserved lease does not appear in dhcpd.leases file after a while an so I guess it is not persistently stored? Whats the difference between reserved and static ?
I just want a single IP range where leases can be dynamically made static and keep that IP? Any ideas?


create a zone and allocate a dynamic range. once your clients receive a lease you can create a static entry for them. BUT,.. you must change the range for dynamic. So that you don't have statics in the middle of your dynamic range.


#FHS-1541 zone1
subnet 10.154.0.0 netmask 255.255.0.0 {
option routers 10.154.1.1;
option domain-name-servers 10.154.1.2;
range 10.154.2.1 10.154.2.254;
}

## static hosts
############
#### noc clients
include "/usr/local/etc/154_clients";

#### 154_clients
group {
option routers 10.154.1.1;
option domain-name-servers 10.154.1.21, 10.154.1.2;

host recon77 {
fixed-address 10.154.1.77;ia
hardware ethernet 00:25:bc:df:b1:4c;
}
host FooBookPro {
fixed-address 10.154.1.99;
hardware ethernet 00:17:f2:d1:ff:f6;
}
}#close group


_______________________________________________
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

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.isc.org/pipermail/dhcp-users/attachments/20120202/1a7d8325/attachment-0001.html>

------------------------------

Message: 4
Date: Thu, 2 Feb 2012 19:10:31 +0000
From: Simon Hobson <dhcp1 at thehobsons.co.uk>
To: Users of ISC DHCP <dhcp-users at lists.isc.org>
Subject: Re: Static Leases do not work
Message-ID: <p06240819cb508fa84058 at simon.thehobsons.co.uk>
Content-Type: text/plain; charset="us-ascii" ; format="flowed"

Jeff Waller wrote:

>I think what he wants is some directive that once a lease is given out 
>to a mac address that matches a particular let's say class, that IP 
>address is never given out to another mac address until it is revoked.  
>I think this is a not met by the suggestions so far.

That is exactly what the "Reserved" flag does. Except that it still reserves the lease even if the client releases it.

I believe it can be set by editing the leases file and adding the "reserved" statement, or using OMAPI.

--
Simon Hobson

Visit http://www.magpiesnestpublishing.co.uk/ for books by acclaimed author Gladys Hobson. Novels - poetry - short stories - ideal as Christmas stocking fillers. Some available as e-books.


------------------------------

Message: 5
Date: Thu, 2 Feb 2012 14:34:24 -0500
From: Jeff Waller <jeffw at cnxntech.com>
To: Users of ISC DHCP <dhcp-users at lists.isc.org>
Subject: Re: Static Leases do not work
Message-ID: <3856C624-1415-40EC-9557-BDBF9839BBB1 at cnxntech.com>
Content-Type: text/plain; charset="us-ascii"

Hmm almost, but I think what he wants is another directive based on reserved.

reserve-all-leases


On Feb 2, 2012, at 2:10 PM, Simon Hobson wrote:

> Jeff Waller wrote:
> 
>> I think what he wants is some directive that once a lease is given 
>> out to a mac address that matches a particular let's say class, that 
>> IP address is never given out to another mac address until it is 
>> revoked.  I think this is a not met by the suggestions so far.
> 
> That is exactly what the "Reserved" flag does. Except that it still 
> reserves the lease even if the client releases it.
> 
> I believe it can be set by editing the leases file and adding the 
> "reserved" statement, or using OMAPI.

Obviously the lease file edit approach is not workable, but even if a program were written to scan across all possible leases and reserve them, feels like not what you want, but instead behavior enforced by the server configuration directly.

Is it possible to use the executable-command support to set the reserved flag on any new lease granted?

> 
> --
> Simon Hobson
> 
> Visit http://www.magpiesnestpublishing.co.uk/ for books by acclaimed 
> author Gladys Hobson. Novels - poetry - short stories - ideal as 
> Christmas stocking fillers. Some available as e-books.
> _______________________________________________
> dhcp-users mailing list
> 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

End of dhcp-users Digest, Vol 40, Issue 5
*****************************************



More information about the dhcp-users mailing list