Here is my attempt so far
from a fresh openwrt install
mkdir /etc/dnsmasq.d/ /tftp /iso
wget https://boot.ipxe.org/ipxe.efi -P /tftp/
wget https://boot.ipxe.org/ipxe.pxe -P /tftp/
wget https://boot.ipxe.org/snponly.efi -P /tftp/
uci set dhcp.@dnsmasq[0].confdir='/etc/dnsmasq.d'
set dhcp.@dnsmasq[0].enable_tftp='1'
uci set dhcp.@dnsmasq[0].tftp_root='/tftp'
uci commit dhcp
/etc/init.d/dnsmasq restart
File /etc/dnsmasq.d/pxe.conf
# Enable Proxy DHCP
#dhcp-range=proxy,192.168.1.1,192.168.1.200
dhcp-range=192.168.1.0,proxy,255.255.255.0
# PXE boot options for BIOS and UEFI clients
#pxe-service=x86PC,'Network Boot BIOS',pxelinux.0
#pxe-service=X86-64_EFI,'Network Boot UEFI x86_64',pxelinux.efi
# bios"
pxe-service=x86PC,'Network Boot BIOS',ipxe.pxe
# uefi"
#pxe-service=X86-64_EFI,'Network Boot UEFI x86_64',snponly.efi
pxe-service=X86-64_EFI,'Network Boot UEFI x86_64',ipxe.efi
# PXE prompt message
#pxe-prompt='Press F12 for Network Boot',10
added for debug help
uci set dhcp.@dnsmasq[0].logqueries='1'
uci set dhcp.@dnsmasq[0].logdhcp='1'
uci set dhcp.@dnsmasq[0].logfacility='/var/log/dnsmasq.log'
uci commit dhcp
/etc/init.d/dnsmasq restart
Current config
uci show dhcp
dhcp.@dnsmasq[0]=dnsmasq
dhcp.@dnsmasq[0].domainneeded='1'
dhcp.@dnsmasq[0].boguspriv='1'
dhcp.@dnsmasq[0].filterwin2k='0'
dhcp.@dnsmasq[0].localise_queries='1'
dhcp.@dnsmasq[0].rebind_protection='1'
dhcp.@dnsmasq[0].rebind_localhost='1'
dhcp.@dnsmasq[0].local='/lan/'
dhcp.@dnsmasq[0].domain='lan'
dhcp.@dnsmasq[0].expandhosts='1'
dhcp.@dnsmasq[0].nonegcache='0'
dhcp.@dnsmasq[0].cachesize='1000'
dhcp.@dnsmasq[0].authoritative='1'
dhcp.@dnsmasq[0].readethers='1'
dhcp.@dnsmasq[0].leasefile='/tmp/dhcp.leases'
dhcp.@dnsmasq[0].resolvfile='/tmp/resolv.conf.d/resolv.conf.auto'
dhcp.@dnsmasq[0].nonwildcard='1'
dhcp.@dnsmasq[0].localservice='1'
dhcp.@dnsmasq[0].ednspacket_max='1232'
dhcp.@dnsmasq[0].filter_aaaa='0'
dhcp.@dnsmasq[0].filter_a='0'
dhcp.@dnsmasq[0].confdir='/etc/dnsmasq.d'
dhcp.@dnsmasq[0].tftp_root='/tftp'
dhcp.@dnsmasq[0].logqueries='1'
dhcp.@dnsmasq[0].logdhcp='1'
dhcp.@dnsmasq[0].logfacility='/var/log/dnsmasq.log'
dhcp.lan=dhcp
dhcp.lan.interface='lan'
dhcp.lan.start='100'
dhcp.lan.limit='150'
dhcp.lan.leasetime='12h'
dhcp.lan.dhcpv4='server'
dhcp.lan.dhcpv6='server'
dhcp.lan.ra='server'
dhcp.lan.ra_slaac='1'
dhcp.lan.ra_flags='managed-config' 'other-config'
dhcp.lan.ignore='1'
dhcp.wan=dhcp
dhcp.wan.interface='wan'
dhcp.wan.ignore='1'
dhcp.odhcpd=odhcpd
dhcp.odhcpd.maindhcp='0'
dhcp.odhcpd.leasefile='/tmp/hosts/odhcpd'
dhcp.odhcpd.leasetrigger='/usr/sbin/odhcpd-update'
dhcp.odhcpd.loglevel='4'
result of /etc/init.d/dnsmasq from /var/log/dnsmasq.log
Dec 30 14:02:31 dnsmasq[4736]: exiting on receipt of SIGTERM
Dec 30 14:02:31 dnsmasq[4892]: started, version 2.90 cachesize 1000
Dec 30 14:02:31 dnsmasq[4892]: DNS service limited to local subnets
Dec 30 14:02:31 dnsmasq[4892]: compile time options: IPv6 GNU-getopt no-DBus UBus no-i18n no-IDN DHCP no-DHCPv6 no-Lua TFTP no-conntrack no-ipset no-nftset no-auth no-cryptohash no-DNSSEC no-ID loop-detect inotify dumpfile
Dec 30 14:02:31 dnsmasq[4892]: UBus support enabled: connected to system bus
Dec 30 14:02:31 dnsmasq-dhcp[4892]: DHCP, proxy on subnet 192.168.1.0
Dec 30 14:02:31 dnsmasq[4892]: using only locally-known addresses for test
Dec 30 14:02:31 dnsmasq[4892]: using only locally-known addresses for onion
Dec 30 14:02:31 dnsmasq[4892]: using only locally-known addresses for localhost
Dec 30 14:02:31 dnsmasq[4892]: using only locally-known addresses for local
Dec 30 14:02:31 dnsmasq[4892]: using only locally-known addresses for invalid
Dec 30 14:02:31 dnsmasq[4892]: using only locally-known addresses for bind
Dec 30 14:02:31 dnsmasq[4892]: using only locally-known addresses for lan
Dec 30 14:02:31 dnsmasq[4892]: reading /tmp/resolv.conf.d/resolv.conf.auto
Dec 30 14:02:31 dnsmasq[4892]: using nameserver 192.168.1.1#53
Dec 30 14:02:31 dnsmasq[4892]: using nameserver 192.168.1.1#53
Dec 30 14:02:31 dnsmasq[4892]: using nameserver fe80::dcad:beff:feef:6644%eth1#53
Dec 30 14:02:31 dnsmasq[4892]: using only locally-known addresses for test
Dec 30 14:02:31 dnsmasq[4892]: using only locally-known addresses for onion
Dec 30 14:02:31 dnsmasq[4892]: using only locally-known addresses for localhost
Dec 30 14:02:31 dnsmasq[4892]: using only locally-known addresses for local
Dec 30 14:02:31 dnsmasq[4892]: using only locally-known addresses for invalid
Dec 30 14:02:31 dnsmasq[4892]: using only locally-known addresses for bind
Dec 30 14:02:31 dnsmasq[4892]: using only locally-known addresses for lan
Dec 30 14:02:31 dnsmasq[4892]: read /etc/hosts - 14 names
Dec 30 14:02:31 dnsmasq[4892]: read /tmp/hosts/dhcp.cfg01411c - 0 names
Dec 30 14:02:31 dnsmasq[4892]: read /tmp/hosts/odhcpd - 0 names
Dec 30 14:02:31 dnsmasq-dhcp[4892]: read /etc/ethers - 0 addresses
Here is the exchange I see on the wire
NOTE -----
192.168.1.1 router.lan actual dhcp server
192.168.1.153 ipxe.lan dhcp proxy server (no packet seen)
bc:24:11:72:ba:18 PXE boot client
NOTE -----
13:40:13.071408 IP (tos 0x0, ttl 64, id 20386, offset 0, flags [none], proto UDP (17), length 375)
0.0.0.0.68 > 255.255.255.255.67: [udp sum ok] BOOTP/DHCP, Request from bc:24:11:72:ba:18 (oui Unknown), length 347, xid 0x5b79e0e, secs 4, Flags [Broadcast] (0x8000)
Client-Ethernet-Address bc:24:11:72:ba:18 (oui Unknown)
Vendor-rfc1048 Extensions
Magic Cookie 0x63825363
DHCP-Message (53), length 1: Discover
MSZ (57), length 2: 1472
Parameter-Request (55), length 35:
Subnet-Mask (1), Time-Zone (2), Default-Gateway (3), Time-Server (4)
IEN-Name-Server (5), Domain-Name-Server (6), Hostname (12), BS (13)
Domain-Name (15), RP (17), EP (18), RSZ (22)
TTL (23), BR (28), YD (40), YS (41)
NTP (42), Vendor-Option (43), Requested-IP (50), Lease-Time (51)
Server-ID (54), RN (58), RB (59), Vendor-Class (60)
TFTP (66), BF (67), GUID (97), Unknown (128)
Unknown (129), Unknown (130), Unknown (131), Unknown (132)
Unknown (133), Unknown (134), Unknown (135)
GUID (97), length 17: 0.205.2.112.198.77.118.112.78.171.192.66.117.72.90.44.243
NDI (94), length 3: 1.3.1
ARCH (93), length 2: 7
Vendor-Class (60), length 32: "PXEClient:Arch:00007:UNDI:003001"
0x0000: 4500 0177 4fa2 0000 4011 29d5 0000 0000 E..wO...@.).....
0x0010: ffff ffff 0044 0043 0163 3a51 0101 0600 .....D.C.c:Q....
0x0020: 05b7 9e0e 0004 8000 0000 0000 0000 0000 ................
0x0030: 0000 0000 0000 0000 bc24 1172 ba18 0000 .........$.r....
0x0040: 0000 0000 0000 0000 0000 0000 0000 0000 ................
0x0050: 0000 0000 0000 0000 0000 0000 0000 0000 ................
0x0060: 0000 0000 0000 0000 0000 0000 0000 0000 ................
0x0070: 0000 0000 0000 0000 0000 0000 0000 0000 ................
0x0080: 0000 0000 0000 0000 0000 0000 0000 0000 ................
0x0090: 0000 0000 0000 0000 0000 0000 0000 0000 ................
0x00a0: 0000 0000 0000 0000 0000 0000 0000 0000 ................
0x00b0: 0000 0000 0000 0000 0000 0000 0000 0000 ................
0x00c0: 0000 0000 0000 0000 0000 0000 0000 0000 ................
0x00d0: 0000 0000 0000 0000 0000 0000 0000 0000 ................
0x00e0: 0000 0000 0000 0000 0000 0000 0000 0000 ................
0x00f0: 0000 0000 0000 0000 0000 0000 0000 0000 ................
0x0100: 0000 0000 0000 0000 6382 5363 3501 0139 ........c.Sc5..9
0x0110: 0205 c037 2301 0203 0405 060c 0d0f 1112 ...7#...........
0x0120: 1617 1c28 292a 2b32 3336 3a3b 3c42 4361 ...()*+236:;<BCa
0x0130: 8081 8283 8485 8687 6111 00cd 0270 c64d ........a....p.M
0x0140: 7670 4eab c042 7548 5a2c f35e 0301 0301 vpN..BuHZ,.^....
0x0150: 5d02 0007 3c20 5058 4543 6c69 656e 743a ]...<.PXEClient:
0x0160: 4172 6368 3a30 3030 3037 3a55 4e44 493a Arch:00007:UNDI:
0x0170: 3030 3330 3031 ff 003001.
13:40:13.108126 IP (tos 0xc0, ttl 64, id 37583, offset 0, flags [none], proto UDP (17), length 328)
192.168.1.1.67 > 255.255.255.255.68: [udp sum ok] BOOTP/DHCP, Reply, length 300, xid 0x5b79e0e, Flags [Broadcast] (0x8000)
Your-IP 192.168.1.139
Server-IP 192.168.1.1
Client-Ethernet-Address bc:24:11:72:ba:18 (oui Unknown)
Vendor-rfc1048 Extensions
Magic Cookie 0x63825363
DHCP-Message (53), length 1: Offer
Server-ID (54), length 4: 192.168.1.1
Lease-Time (51), length 4: 43200
RN (58), length 4: 21600
RB (59), length 4: 37800
Subnet-Mask (1), length 4: 255.255.255.0
BR (28), length 4: 192.168.1.255
Default-Gateway (3), length 4: 192.168.1.1
Domain-Name-Server (6), length 4: 192.168.1.1
Domain-Name (15), length 3: "lan"
0x0000: 45c0 0148 92cf 0000 4011 246d c0a8 0101 E..H....@.$m....
0x0010: ffff ffff 0043 0044 0134 2195 0201 0600 .....C.D.4!.....
0x0020: 05b7 9e0e 0000 8000 0000 0000 c0a8 018b ................
0x0030: c0a8 0101 0000 0000 bc24 1172 ba18 0000 .........$.r....
0x0040: 0000 0000 0000 0000 0000 0000 0000 0000 ................
0x0050: 0000 0000 0000 0000 0000 0000 0000 0000 ................
0x0060: 0000 0000 0000 0000 0000 0000 0000 0000 ................
0x0070: 0000 0000 0000 0000 0000 0000 0000 0000 ................
0x0080: 0000 0000 0000 0000 0000 0000 0000 0000 ................
0x0090: 0000 0000 0000 0000 0000 0000 0000 0000 ................
0x00a0: 0000 0000 0000 0000 0000 0000 0000 0000 ................
0x00b0: 0000 0000 0000 0000 0000 0000 0000 0000 ................
0x00c0: 0000 0000 0000 0000 0000 0000 0000 0000 ................
0x00d0: 0000 0000 0000 0000 0000 0000 0000 0000 ................
0x00e0: 0000 0000 0000 0000 0000 0000 0000 0000 ................
0x00f0: 0000 0000 0000 0000 0000 0000 0000 0000 ................
0x0100: 0000 0000 0000 0000 6382 5363 3501 0236 ........c.Sc5..6
0x0110: 04c0 a801 0133 0400 00a8 c03a 0400 0054 .....3.....:...T
0x0120: 603b 0400 0093 a801 04ff ffff 001c 04c0 `;..............
0x0130: a801 ff03 04c0 a801 0106 04c0 a801 010f ................
0x0140: 036c 616e ff00 0000 .lan....