I'm trying to set up a Centos 7 server as a dhcp server for PXE (UEFI). I'be tried several changes to the dhcpd.conf file, but nothing seems to make a difference.
dhcpd.conf:
allow booting;
allow bootp;
max-lease-time 120;
default-lease-time 120;
option domain-name "domain.tld";
option domain-name-servers 192.168.1.9, 192.168.1.10;
option space pxe;
option pxe.magic code 208 = string;
option pxe.configfile code 209 = text;
option pxe.pathprefix code 210 = text;
option pxe.reboottime code 211 = unsigned integer 32;
option pxe.mtftp-ip code 1 = ip-address;
option pxe.mtftp-cport code 2 = unsigned integer 16;
option pxe.mtftp-sport code 3 = unsigned integer 16;
option pxe.mtftp-tmout code 4 = unsigned integer 8;
option pxe.mtftp-delay code 5 = unsigned integer 8;
option pxe.discovery-control code 6 = unsigned integer 8;
option pxe.discovery-mcast-addr code 7 = ip-address;
option architecture-type code 93 = unsigned integer 16;
class "pxe" {
match if substring (option vendor-class-identifier, 0, 9) = "PXEClient";
option vendor-class-identifier "PXEClient";
vendor-option-space pxe;
option pxe.mtftp-ip 0.0.0.0;
if option architecture-type = 00:07 {
filename "shim.efi";
} else {
filename "pxelinux/pxelinux.0";
}
}
subnet 192.168.1.0 netmask 255.255.255.0 {
not authoritative;
}
# PXE Network
########################################################################
subnet 172.16.10.0 netmask 255.255.255.0 {
authoritative;
allow unknown-clients;
next-server 172.16.10.3;
option routers 172.16.10.1;
option broadcast-address 172.16.10.255;
pool {
range dynamic-bootp 172.16.10.10 172.16.10.49;
allow members of "pxe";
}
pool {
range 172.16.10.50 172.16.10.99;
allow members of "pxe";
}
pool {
range 172.16.10.100 172.16.10.149;
}
}
host dev2 {
hardware ethernet ec:f4:bb:d8:59:9f;
option host-name "dev2.domain.tld";
}
host dev1 {
hardware ethernet ec:f4:bb:bf:c8:e7;
option host-name "dev1.domain.tld";
}
I tried running the server manually to make sure I saw any logs, but this is all that comes out:
[root@kickstart dhcp]# /usr/sbin/dhcpd -f -cf /etc/dhcp/dhcpd.conf -user dhcpd -group dhcpd --no-pid -4 -d eth1
Internet Systems Consortium DHCP Server 4.2.5
Copyright 2004-2013 Internet Systems Consortium.
All rights reserved.
For info, please visit https://www.isc.org/software/dhcp/
Not searching LDAP since ldap-server, ldap-port and ldap-base-dn were not specified in the config file
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/eth1/52:54:00:fa:4d:fc/172.16.10.0/24
Sending on LPF/eth1/52:54:00:fa:4d:fc/172.16.10.0/24
Sending on Socket/fallback/fallback-net
I also ran a packet trace on the server. I see the DHCP DISCOVER packet come in, but there is never a response.
<bash>$tcpdump -vvvvvvvvvvvvvvvvvvvvv -ttttt -i eth1
00:37:05.338983 IP (tos 0x0, ttl 64, id 43032, offset 0, flags [none], proto UDP (17), length 375)
0.0.0.0.bootpc > 255.255.255.255.bootps: [udp sum ok] BOOTP/DHCP, Request from ec:f4:bb:d8:59:9f (oui Unknown), length 347, xid 0x777a345e, secs 12, Flags [Broadcast] (0x8000)
Client-Ethernet-Address ec:f4:bb:d8:59:9f (oui Unknown)
Vendor-rfc1048 Extensions
Magic Cookie 0x63825363
DHCP-Message Option 53, length 1: Discover
MSZ Option 57, length 2: 1464
Parameter-Request Option 55, length 35:
Subnet-Mask, Time-Zone, Default-Gateway, Time-Server
IEN-Name-Server, Domain-Name-Server, Hostname, BS
Domain-Name, RP, EP, RSZ
TTL, BR, YD, YS
NTP, Vendor-Option, Requested-IP, Lease-Time
Server-ID, RN, RB, Vendor-Class
TFTP, BF, GUID, Option 128
Option 129, Option 130, Option 131, Option 132
Option 133, Option 134, Option 135
GUID Option 97, length 17: 0.68.69.76.76.84.0.16.57.128.75.180.192.79.67.52.50
NDI Option 94, length 3: 1.3.16
ARCH Option 93, length 2: 7
Vendor-Class Option 60, length 32: "PXEClient:Arch:00007:UNDI:003016"
END Option 255, length 0
Some other system info:
<bash> $ip addr
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN qlen 1
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000
link/ether 52:54:00:59:e9:5d brd ff:ff:ff:ff:ff:ff
inet 192.168.1.203/24 brd 192.168.1.255 scope global eth0
valid_lft forever preferred_lft forever
3: eth1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000
link/ether 52:54:00:fa:4d:fc brd ff:ff:ff:ff:ff:ff
inet 172.16.10.3/24 brd 172.16.10.255 scope global eth1
valid_lft forever preferred_lft forever
<bash>$ sestatus
SELinux status: enabled
SELinuxfs mount: /sys/fs/selinux
SELinux root directory: /etc/selinux
Loaded policy name: targeted
Current mode: permissive
Mode from config file: enforcing
Policy MLS status: enabled
Policy deny_unknown status: allowed
Max kernel policy version: 28
<bash>$ firewall-cmd --state
not running
<bash>$ netstat -nap | grep dhcp
udp 0 0 0.0.0.0:67 0.0.0.0:* 21050/dhcpd
udp 0 0 0.0.0.0:67 0.0.0.0:* 17697/dhcpd
udp 0 0 0.0.0.0:67 0.0.0.0:* 15042/dhcpd
raw 0 0 0.0.0.0:1 0.0.0.0:* 7 21050/dhcpd
raw 0 0 0.0.0.0:1 0.0.0.0:* 7 17697/dhcpd
raw 0 0 0.0.0.0:1 0.0.0.0:* 7 15042/dhcpd
unix 2 [ ] DGRAM 94586 15042/dhcpd
unix 2 [ ] DGRAM 107361 17697/dhcpd
unix 2 [ ] DGRAM 110207 21050/dhcpd
<bash>$ iptables-save
<bash>$
I'm not sure if/how this would matter, but the PXE server is a KVM/QEMU running on a Centos 7 hypervisor. On the host, em1 is joined to br1, em2 to br2, em3 to br3, em4 to br4. Each NIC is attached to a switch on it's own VLAN. The VM has eth0 linked to br1 and eth1 to br4.
The PXE client is a physical server. There are multiple switches between this PXE client and the dhcp server.
Update:
(config above updated):
I configured a standard linux client on the network, and it was able to get a lease. So, it appears to be something about the UEFI PXE client. Here is pcap of a single request: https://pastebin.com/hp6n1ExR (base64 encoded)