problem using if statement evaluation inside pool
Rob Burris
robert.burris at colorado.edu
Mon Nov 19 19:47:36 UTC 2007
Hi Guys,
I'm testing our NetReg registration system with a single client. The
client gets an IP address from our "unknown" pool, then client registers
with NetReg, and then is suppose to get an IP from our "known" pool. I
don't want any other clients on our subnet getting the NetReg
registration page just yet and the client I'm testing should only be
able to get an IP from the "unknown" pool based on it's MAC address.
Below is my subnet declaration.
subnet 172.16.136.0 netmask 255.255.255.0 {
pool {
option subnet-mask 255.255.255.0;
option broadcast-address 172.16.136.255;
option routers 172.16.136.1;
option domain-name-servers 172.16.136.2, 172.16.136.3;
option domain-name "example.com";
range 172.16.136.61 172.16.136.74;
range 172.16.136.76 172.16.136.77;
range 172.16.136.82 172.16.136.111;
range 172.16.136.113 172.16.136.132;
range 172.16.136.134 172.16.136.137;
range 172.16.136.139 172.16.136.171;
range 172.16.136.173 172.16.136.202;
range 172.16.136.204 172.16.136.250;
}
# Known Pool
pool {
option subnet-mask 255.255.255.0;
option broadcast-address 172.16.136.255;
option routers 172.16.136.1;
option domain-name-servers 172.16.136.2, 172.16.136.3;
option domain-name "example.com";
range 172.16.136.56 172.16.136.60;
deny unknown-clients;
}
# Unknown Pool
pool {
default-lease-time 120;
max-lease-time 120;
option subnet-mask 255.255.255.0;
option broadcast-address 172.16.136.255;
option routers 172.16.136.1;
option domain-name-servers 172.16.136.2;
range 172.16.136.51 172.16.136.55;
if hardware = 1:00:11:25:15:18:dc {
allow unknown-clients;
}
else {
deny unknown-clients;
}
}
}
include "/usr/local/etc/netreg/dhcpd/netreg.registered";
The problem is that the test client keeps getting the same IP address (
172.16136.51 ) even after it's host declaration is added and the dhcpd
server has been restarted. All the leases within the "unknown" and
"known" pools are available. The problem goes away if I remove the "if
statement" and just leave "deny unknown-clients;" and
"allow-unknown-clients;" in the appropriate pools. Perhaps there is an
easier way to go about this or maybe my logic is all wrong and I just
need a sanity check. Any thoughts or suggestions are appreciated.
Fedora Core 4
2.6.17-1.2142_FC4smp
dhcp-3.0.2-34.FC4
Cheers,
Rob
More information about the dhcp-users
mailing list