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 to 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,,;

# 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;
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 "";

default-lease-time 604800;
max-lease-time 1209600;

shared-network corp {

subnet netmask {
option routers;
option broadcast-address;

pool {
 range dynamic-bootp;
 allow members of "PXE";
 allow members of "KVM";
 allow members of "SuperMicro";

pool {
 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.

  • What you looked at the packet dumps, did you see the physical mahines setting PXEClient in the vendor-class-identifier field? – Zypher Jul 10 '15 at 1:33
  • I see this: "10:04:02.896990 IP > sv1.example.com.pxe: BOOTP/DHCP, Request from 00:25:90:ed:a2:78 (oui Unknown), length 548" – GreenTeaTech Jul 10 '15 at 17:07

I think you're not matching on the MAC's OUI. You should look at the full packet dump of the Supermicro server to see if they are setting the "PXEClient" in the vendor-class field such as Zypher mentioned. You should run tcpdump with -vvv options to show the full packet dump.

Right now, you would go into the DHCP pool for ANY PXE client (that sets the option properly) OR any KVM host OR any supermicro host... so not sure why you have the multiple classes.

You are logging the MAC's OUI for each packet (only if it matches). Do you see anything on the system's logfile?

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.