DHCP "static" assignments
Gruher, Joseph R
joseph.r.gruher at intel.com
Wed Aug 7 20:53:24 UTC 2013
Sounds like you're overcomplicating it. I just do it like below. Here .10 through .99 will be handed out dynamically to whoever comes along, and MAC 00:1e:67:38:de:69 will always get .201. Add additional host entries as needed. The host name needs to _not_ be in the range of the pool or I get an error and a fail when I try to start DHCP services, IIRC.
subnet 12.12.12.0 netmask 255.255.255.0 {
option subnet-mask 255.255.255.0;
option domain-name "joedomain.org";
range 12.12.12.10 12.12.12.99;
host node01 {
hardware ethernet 00:1e:67:38:de:69;
fixed-address 12.12.12.201;
option subnet-mask 255.255.255.0;
}
}
-----Original Message-----
From: dhcp-users-bounces+joseph.r.gruher=intel.com at lists.isc.org [mailto:dhcp-users-bounces+joseph.r.gruher=intel.com at lists.isc.org] On Behalf Of Gregory Sloop
Sent: Wednesday, August 07, 2013 1:40 PM
To: Users of ISC DHCP
Subject: Re: DHCP "static" assignments
SC> On 7 August 2013 20:43, Gregory Sloop <gregs at sloop.net> wrote:
>> [IMO, it would still be a lot easier if you just had to put in the
>> host entry, and then define the pool as 1-20, and it wouldn't assign
>> any IP's for defined hosts to any other host.
SC> So ISC's take is that if it's defined it can lease it, if it's not
SC> defined then it can't be given out, unlike Microsoft's stance of we
SC> can lease it unless you tell me not to.
SC> If you configure a "static" host then that IP will be given to that
SC> host regardless of where it is in the subnet and whether or not it
SC> overlaps an existing pool (if it does overlap the pool then the pool
SC> won't issue that IP address, it ignores it - so in your case above
SC> there is no point in defining a pool when the pool is never going to
SC> get used anyway).
SC> IMHO this is a much simpler model than defining all available space
SC> and then restricting it afterwards, just define what you want to
SC> actually use and ignore the rest.
I see the point, I don't really like how [I think] it works, but it is what it is.
---
But these aren't actually "static" IP assignments - or at least I'm not sure we're using the same terminology in the same way. [Probably my fault.]
Here's the effect I want...
I want the DHCP server to hand out specific IP's to specific MAC addresses, [as defined in the host record.]
They're static DHCP assignments, not static IP clients.
---
i.e. I want 10.0.0.10 to get assigned *via the DHCP server* to the host with MAC Address aa:bb:cc:dd:ee:ff
Also, I'm assigning via DHCP addresses from 10.0.0.1-10.0.0.20 to anyone who asks via DHCP.
The way I do it now, is assign pools as follows
10.0.0.1-10.0.0.9 && set "allow unknown-hosts"
10.0.0.10 && set "deny unknown-hosts"
10.0.0.11-10.0.0.20 && set "allow unknown-hosts"
AND create a host entry for 10.0.0.10 like so:
host somehost {
hardware ethernet aa:bb:cc:dd:ee:ff;
fixed-address 10.0.0.10;
}
---
I *think* I have to include the relevant IP in a pool. (In this case
10.0.0.10) [If there's no pool with 10.0.0.10 in it, the DHCP server won't hand out an IP for 10.0.0.10, no matter what host record there is, will it?]
Provided I'm right... then...
IF: I include it [the IP Address] in a pool, and have a proper host entry, it will still get assigned to ANY host, not just the host defined in the host entry, *unless* the host defined in the host entry gets there first.
Thus, to *guarantee* that the host defined in the hosts entry is the
*only* host offered the relevant IP (10.0.0.10 in this case) you must do all three
1) create a pool, with that IP address included, that's set to "deny unknown-hosts"
2) Define the hosts entry
3) Make sure the "allow unknown-hosts" and the "deny unknown-hosts"
pools don't overlap, etc. [Obvious, but easy to screw up, at least for me. :) ]
Hope that's clear. Am I doing it right?
-Greg
_______________________________________________
dhcp-users mailing list
dhcp-users at lists.isc.org
https://lists.isc.org/mailman/listinfo/dhcp-users
More information about the dhcp-users
mailing list