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.