Dnsmasq pxe boot not working

bootpdnsmasqpxe-boottftp

Maybe someone can point me into the right direction here

I have a dnsmasq DHCP Server in a separate Subnet (10.17.131.42)
and another Network that has NO local DHCP Server (10.33.0.0/16)

The Switch in this Network forwards the DHCP requests properly to the dnsmasq server wich responds accordingly. (so far, so good)

BUT PXE clients (HP Server, Dell Server and Laptop) won't accept the DHCP Offer made by the dnsmasq server.

I can see the DHCP discover Packets arriving

Jul  2 14:03:11 dhcp-server dnsmasq-dhcp[15220]: 2294628971 available DHCP range: 10.33.10.1 -- 10.33.99.254
Jul  2 14:03:11 dhcp-server dnsmasq-dhcp[15220]: 2294628971 vendor class: udhcp 1.23.1
Jul  2 14:03:11 dhcp-server dnsmasq-dhcp[15220]: 2294628971 DHCPREQUEST(eth0) 10.33.75.79 0c:c4:7a:dd:ac:14
Jul  2 14:03:11 dhcp-server dnsmasq-dhcp[15220]: 2294628971 Marken: testnet, eth0
Jul  2 14:03:11 dhcp-server dnsmasq-dhcp[15220]: 2294628971 DHCPACK(eth0) 10.33.75.79 0c:c4:7a:dd:ac:14
Jul  2 14:03:11 dhcp-server dnsmasq-dhcp[15220]: 2294628971 requested options: 1:netmask, 3:router, 6:dns-server, 12:hostname,
Jul  2 14:03:11 dhcp-server dnsmasq-dhcp[15220]: 2294628971 requested options: 15:domain-name, 28:broadcast, 42:ntp-server
Jul  2 14:03:11 dhcp-server dnsmasq-dhcp[15220]: No IPv4 address found for tftp,10.17.159.200
Jul  2 14:03:11 dhcp-server dnsmasq-dhcp[15220]: 2294628971 Name der Bootdatei: testnet
Jul  2 14:03:11 dhcp-server dnsmasq-dhcp[15220]: 2294628971 Server-Name: /tftpboot/BOOT/bios/gpxelinux.0
Jul  2 14:03:11 dhcp-server dnsmasq-dhcp[15220]: 2294628971 sent size:  1 option: 53 message-type  5
Jul  2 14:03:11 dhcp-server dnsmasq-dhcp[15220]: 2294628971 sent size:  4 option: 54 server-identifier  10.17.131.42
Jul  2 14:03:11 dhcp-server dnsmasq-dhcp[15220]: 2294628971 sent size:  4 option: 51 lease-time  8h
Jul  2 14:03:11 dhcp-server dnsmasq-dhcp[15220]: 2294628971 sent size:  4 option: 58 T1  3h40m50s
Jul  2 14:03:11 dhcp-server dnsmasq-dhcp[15220]: 2294628971 sent size:  4 option: 59 T2  6h40m50s
Jul  2 14:03:11 dhcp-server dnsmasq-dhcp[15220]: 2294628971 sent size:  4 option:  1 netmask  255.255.0.0
Jul  2 14:03:11 dhcp-server dnsmasq-dhcp[15220]: 2294628971 sent size:  4 option: 28 broadcast  10.33.255.255
Jul  2 14:03:11 dhcp-server dnsmasq-dhcp[15220]: 2294628971 sent size:  4 option:  6 dns-server  10.17.131.42
Jul  2 14:03:11 dhcp-server dnsmasq-dhcp[15220]: 2294628971 sent size:  4 option: 42 ntp-server  10.17.160.3
Jul  2 14:03:11 dhcp-server dnsmasq-dhcp[15220]: 2294628971 sent size:  4 option:  3 router  10.33.255.254

Interesting fact: an iPXE boot in a Virtualbox environment works.
But I can't debug local PXE implementations as the don't output anything at all. They just ignore the DHCO offer and send a new DHCP discover packet.

Maybe It has something todo with the fact that the TFTP server is ANOTHER host?

Here is my dnsmasq configuration

addn-hosts=/etc/hosts.dnsmasq
expand-hosts
interface=eth0
resolv-file=/etc/resolv.dnsmasq
server=/example.org/10.17.0.1
server=/example.org/10.17.0.2
server=/example.org/10.17.0.8
server=/17.10.in-addr.arpa/10.17.0.1
server=/17.10.in-addr.arpa/10.17.0.2
server=/17.10.in-addr.arpa/10.17.0.8
server=/22.10.in-addr.arpa/10.17.0.1
server=/22.10.in-addr.arpa/10.17.0.2
server=/22.10.in-addr.arpa/10.17.0.8
dhcp-leasefile=/var/lib/dnsmasq/dnsmasq.leases
dhcp-range=testnet,10.33.10.1,10.33.99.254,255.255.0.0,8h
dhcp-option=testnet,option:domain-search,test.example.org,example.org
dhcp-option=testnet,3,10.33.255.254
dhcp-option=testnet,42,10.17.160.3
dhcp-boot=testnet,/tftpboot/BOOT/bios/gpxelinux.0,tftp,10.17.159.200
dhcp-range=testnet-server,10.29.22.1,10.29.27.254,255.255.240.0,8h
dhcp-option=testnet-server,option:domain-search,test.example.org,example.org
dhcp-option=testnet-server,3,10.29.31.254 #Router
dhcp-option=testnet-server,42,10.17.160.3  #NTP
log-queries
log-dhcp

The issue seems to be a missing, or wrong option I guess, but I can't fund it.

PS.: When I configure the same options on a Windows DHCP server everything is working!

Best Answer

We have had issues with pxe boot on computers configured to use UEFI. Have you tried switching to Legacy BIOS instead? Do you still see the same issue or does it help?

So far I have not figured out the issue with booting from PXE when in UEFI mode but in my case it was just ok to go with Legacy BIOS instead.