Assigning a Fixed IP Address Based on dhcp-client-identifier
Scott Coleman
swarga.research at gmail.com
Tue May 19 16:30:58 UTC 2009
I'm trying to do something that seems like it should be very simple but I
can't seem to get it quite right.
I want to assign IP addresses to clients based solely on their Option 61
client IDs. For convenience/test purposes, I want to do this on a subnet
that already has a regular DHCP server, so I want my test dhcpd to only
assign an address to "known" clients (i.e. clients which have a matching
client ID listed in the config file). I've come up with something that seems
like it should work, but every time a client does a DHCPDISCOVER the server
reports "no free leases."
Can someone tell me what I'm doing wrong? I'm sure it's ridiculously simple,
but I've blown a whole day on it so far and can't get it to work. Thanks for
your help!
The output of dhcpd and my dhcpd.conf file are attached.
-bash-3.2# dhcpd -f -d eth0
Internet Systems Consortium DHCP Server 4.1.0
Copyright 2004-2008 Internet Systems Consortium.
All rights reserved.
For info, please visit http://www.isc.org/sw/dhcp/
Wrote 0 class decls to leases file.
Wrote 0 deleted host decls to leases file.
Wrote 0 new dynamic host decls to leases file.
Wrote 0 leases to leases file.
Listening on LPF/eth0/00:a0:1e:07:01:00/10.24.0.0/16
Sending on LPF/eth0/00:a0:1e:07:01:00/10.24.0.0/16
Sending on Socket/fallback/fallback-net
DHCPDISCOVER from 00:a0:1e:a1:30:00 via eth0: network 10.24.0.0/16: no free
leases
=== /etc/dhcpd.conf ===
#
# DHCP Server Configuration file.
#
not authoritative;
ddns-update-style none;
default-lease-time 86400;
max-lease-time 172800;
boot-unknown-clients false;
class "test"
{
match pick-first-value (option dhcp-client-identifier, hardware);
}
subnet 10.24.0.0 netmask 255.255.0.0
{
pool
{
allow members of "test";
option routers 10.24.7.1;
option domain-name-servers 10.24.7.1;
range 10.24.7.10 10.24.7.100;
deny unknown-clients;
}
}
host pos_30
{
option dhcp-client-identifier "\0pos_30";
option host-name "pos_30";
fixed-address 10.24.7.30;
}
host pos_31
{
option dhcp-client-identifier "\0pos_31";
option host-name "pos_31";
fixed-address 10.24.7.31;
}
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.isc.org/pipermail/dhcp-users/attachments/20090519/54f70ee2/attachment.html>
More information about the dhcp-users
mailing list