I'm trying to configure the dhcpd.conf file so that when I boot through the network using PXE / BOOTP, a bare metal server or a virtual machine (KVM) would get an IP address in the 10.0.2.100 to 10.0.2.253 range.
It's currently working for the kvm, but not for the bare metal server.
I'm not familiar with the "match if substring" option, so that could be my problem.
It seems that only the class "KVM" is working. I first tried the mac address between double quotes "52:54:00" but it didn't work. It works without the quotes.
Here is my dhcpd.conf file:
option ntp-servers 0.us.pool.ntp.org;
option domain-name "corp.example.com";
option domain-name-servers 10.0.0.2, 75.75.75.75, 75.75.76.76;
# Configuration for the kickstart server
allow booting;
allow bootp;
class "PXE" {
match if substring(option vendor-class-identifier, 0, 9) = "PXEClient";
option vendor-class-identifier "PXEClient";
vendor-option-space PXE;
next-server 10.0.2.11;
filename "pxelinux.0";
}
class "KVM" {
match if substring(hardware,1,3) = 52:54:00;
log (info, (substring(hardware, 1, 3)));
}
class "SuperMicro" {
match if substring(hardware,1,3) = 00:25:90;
log (info, (substring(hardware, 1, 3)));
}
# tell DHCP to set option 66 as a string variable
# option boot-server code 66 = string;
# option option-66 code 66 = text;
option tftp-server-name "63.251.141.68";
default-lease-time 604800;
max-lease-time 1209600;
authoritative;
shared-network corp {
subnet 10.0.0.0 netmask 255.255.0.0 {
option routers 10.0.0.1;
option broadcast-address 10.0.255.255;
pool {
range dynamic-bootp 10.0.2.100 10.0.2.253;
allow members of "PXE";
allow members of "KVM";
allow members of "SuperMicro";
}
pool {
range 10.0.100.1 10.0.115.255;
deny members of "PXE";
deny members of "KVM";
deny members of "SuperMicro";
}
}
}
I ran tcpdump on the DHCP server and I saw requests coming from both the bare metal server and the virtual machine. So, I know it's not a network issue.
Any help would be appreciated.