Assigning a Fixed IP Address Based on dhcp-client-identifier
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
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
=== /etc/dhcpd.conf ===
# DHCP Server Configuration file.
match pick-first-value (option dhcp-client-identifier, hardware);
subnet 10.24.0.0 netmask 255.255.0.0
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;
option dhcp-client-identifier "\0pos_30";
option host-name "pos_30";
option dhcp-client-identifier "\0pos_31";
option host-name "pos_31";
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the dhcp-users