build a tftp server on linux

For a cisco AP to be able to use a TFTP server, it needs an IP address first. If you don't have a switch, you can use a laptop to create a TFTP server on Linux Ubuntu 22.04.

First of all, you need to install the TFTP server on your Linux Ubuntu 22.04. You can use the following command to install it:


sudo apt-get install tftpd-hpa

Then, you need to create a folder to store the firmware files. You can use the following command to create a folder named firmware:


sudo mkdir /tftpboot/firmware

Then, you need to copy the firmware files to the folder you just created. You can use the following command to copy the firmware files to the folder:


sudo cp -r /path/to/firmware/files/* /tftpboot/firmware

Then, you need to edit the /etc/default/tftpd-hpa file. You can use the following command to edit the file:


sudo nano /etc/default/tftpd-hpa

Then, you need to change the TFTP_DIRECTORY variable to the folder you just created. You can use the following command to change the variable:


TFTP_DIRECTORY="/tftpboot/firmware"

Then, you need to change the TFTP_ADDRESS variable to the IP address of the TFTP server. You can use the following command to change the variable:


TFTP_ADDRESS=" : "

Then, you need to change the TFTP_OPTIONS variable to the following:


TFTP_OPTIONS="--secure --create"

Then, you need to restart the TFTP server. You can use the following command to restart the TFTP server:


sudo systemctl restart tftpd-hpa

Then, you need to check if the TFTP server is running. You can use the following command to check if the TFTP server is running:


sudo systemctl status tftpd-hpa

If the TFTP server is running, you should see the following output:


 tftpd-hpa.service - Trivial File Transfer Protocol (TFTP) server
     Loaded: loaded (/lib/systemd/system/tftpd-hpa.service; enabled; vendor preset: enabled)
     Active: active (running) since Thu 2021-09-09 10:00:00 UTC; 1min 30s ago

That’s it. You have successfully created a TFTP server on Linux Ubuntu 22.04.