3

I have a device(White rabbit switch), which during flashing downloads the firmware using tftp://0.0.0.0/firmware.tar. I set up a local network with this device and my laptop with TFTP server serving this file. While the file could be downloaded using the proper IP address assigned to my laptop by the router using another machine in the same LAN, the 0.0.0.0 address doesn't work.

The instruction for flashing mentions: The flashing procedure will use the server address reported by DHCP as IP address for the TFTP transfer.

and I can see that the switch is trying to download the firmware from 0.0.0.0. Any idea how to circumvent this? I can't change any parameters on the switch side.

1 Answers1

5

Disconnect the device from your LAN and connect it directly to the computer via Ethernet. (Although if the LAN is already dedicated for this purpose, then you can continue using the router for Wi-Fi if needed – as long as you disable its DHCP.)

Then configure the computer's Ethernet interface with a static IP address, and set up a DHCP server on the computer to offer the correct DHCP or BOOTP lease.

If you're running Linux, then dnsmasq is a good choice for a small DHCP server (it can even serve both DHCP and TFTP from the same process). Other options are the classic ISC DHCP server (recently EOL, but it's still good as is) or ISC Kea (a bit too 'enterprise').

Note that unlike most other information provided via DHCP, the TFTP server address is not configured as a "DHCP option" but a separate, built-in parameter. In dnsmasq you would set it using the dhcp-boot= option.

sudo dnsmasq \
    --no-daemon \
    --conf-file=/dev/null \
    --interface=eth0 \
    --bind-dynamic \
    --dhcp-range="192.168.1.50,192.168.1.100,255.255.255.0,1h" \
    --dhcp-boot="some_filename,192.168.1.1" \
    ;
grawity
  • 501,077