Responding BOOTP Requests using TFTP Daemon in Fedora
In this article, we will discuss how to respond to BOOTP requests using the Trivial File Transfer Protocol (TFTP) daemon in Fedora. BOOTP (Bootstrap Protocol) is a network protocol used for obtaining an IP address and other configuration information when a device boots up. The TFTP protocol is used to transfer files between hosts over a network.
TFTP Daemon in Fedora
The TFTP daemon in Fedora is a service that listens for incoming TFTP requests and responds accordingly. By default, the TFTP daemon is not installed in Fedora. To install it, run the following command:
sudo dnf install tftp-serverOnce installed, the TFTP daemon can be started by running the following command:
sudo systemctl start tftpBy default, the TFTP daemon listens on UDP port 69.
Responding to BOOTP Requests
When a device boots up and sends a BOOTP request, it is looking for a server that can provide it with an IP address and other configuration information. To respond to BOOTP requests, we need to have a server that is configured to provide this information. In Fedora, we can use the dnsmasq package to provide this functionality.
To install dnsmasq, run the following command:
sudo dnf install dnsmasqOnce installed, we need to configure dnsmasq to respond to BOOTP requests. This can be done by editing the /etc/dnsmasq.conf file and adding the following lines:
dhcp-range=192.168.0.100,192.168.0.200,255.255.255.0,12h
dhcp-boot=pxelinux.0
pxe-service=x86PC, "Boot from network", pxelinux
The dhcp-range line specifies the range of IP addresses that will be assigned to devices that send BOOTP requests. The dhcp-boot line specifies the name of the file that will be used to boot the device. The pxe-service line specifies the name of the boot service that will be offered to the device.
Once the dnsmasq configuration file has been updated, the service can be restarted by running the following command:
sudo systemctl restart dnsmasqTesting the Configuration
To test the configuration, we need to have a device that can send BOOTP requests. One way to do this is to use a virtual machine. When the virtual machine boots up, it should send a BOOTP request. If everything is configured correctly, the dnsmasq server should respond with the appropriate configuration information, and the virtual machine should be able to obtain an IP address and boot from the network.
References
- Fedora Project. (2021). TFTP Server.
- The dnsmasq Project. (2021). dnsmasq.
Note: The user mentioned that they are trying to boot embedded machines using an RNDIS network link (USB) and cannot seem to get the TFTP server daemon to respond to BOOTP requests. The BOOTP request packet was provided, but the issue was not resolved in the article as it focused on responding to BOOTP requests using TFTP daemon in Fedora.