Score:0

How to troubleshoot PXE boot from DD-WRT dnsmasq not sending tftp server info?

bf flag

I have a MikroTik hEXs router (firmware v6.47.1) which I want to flash with OpenWRT. The OpenWRT wiki site has detailed instructions on the procedure, and it requires that one netboot the router. My problem is that I can't get the hEXs router to reach out to my tftp server for some reason.

To act as the PXE boot host, I've setup dnsmasq on my currently in-use DD-WRT router and set the dhcp-boot option in the 'Additional DNSMasq options' text area as follows:

dchp-boot=initramfs.bin,,192.168.2.108

I have a tftpd instance running on a Mac Mini running OS X Ventura at the IP shown above. The OpenWRT file I want it to boot is at /private/tftpboot. I've confirmed that tftp works by ftp-ing the file across the network from another machine.

When I power-on the hEXs, and watch tcpdump output on the tftp host, I see a ton of requests like this:

14:21:36.898688 IP 0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from [hEXs MAC ADDRESS], length 300
14:21:37.098699 IP 0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from [hEXs MAC ADDRESS], length 300
14:21:37.298576 IP 0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from [hEXs MAC ADDRESS], length 300
14:21:37.498588 IP 0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from [hEXs MAC ADDRESS], length 300
14:21:37.698617 IP 0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from [hEXs MAC ADDRESS], length 300
14:21:37.898635 IP 0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from [hEXs MAC ADDRESS], length 300
14:21:38.098664 IP 0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from [hEXs MAC ADDRESS], length 300

... but I never see anything reaching out to Port 69, where tftpd is listening. Consequently, I have never been able to get the hEXs to actually boot the firmware. I have confirmed that the hEXs receives an IP address via DHCP, but it doesn't appear to be retrieving the boot file over tftp (that's my assumption without more fine-grained troubleshooting, which is why I'm asking this question). I can't seem to find anything relevant in log files, but I may not be looking in all the exhaustive right places.

$ cat /tmp/dnsmasq.conf
interface=br0
resolv-file=/tmp/resolv.dnsmasq
all-servers
strict-order
domain=attlocal.net
dhcp-leasefile=/tmp/dnsmasq.leases
dhcp-lease-max=102
dhcp-option=lan,3,192.168.2.1
dhcp-authoritative
dhcp-range=lan,192.168.2.100,192.168.2.199,255.255.255.0,1440m
stop-dns-rebind
dhcp-boot=initramfs.bin,,192.168.2.108

How can I low-level troubleshoot dnsmasq with the CLI (or something) to determine that it's properly handing out the dhcp-boot options to a PXE-boot client?

I've scoured the internet for about 2-3 weeks on this, including here on the StackExchange family of sites, and I either haven't used the right terminology, or no one has encountered this specific scenario.

pt flag
Please include your *complete* dnsmasq configuration in the question. Also, ensure you're running with the `log-dhcp` option enabled, and let us know if you're seeing any logs when the microtik is sending requests.
PattMauler avatar
bf flag
Adding this, as it *may* be the answer to my question. I will attempt as soon as convenient. http://www.aturnofthenut.com/2021/03/17/using-dnsmasq-under-openwrt-as-a-tftp-boot-server/
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.