rss logo

Step-by-Step Guide: Setting Up a TFTP and DHCP Server on Windows

tftpf logo Microsoft logo

TFTP (Trivial File Transfer Protocol) is a simple File Transfer Protocol that allows a client to get or put a file on a remote host. (more details at: https://en.wikipedia.org/).

It is an old protocol, but still used in many network applications.

Personally, I use it to update the firmware on my network equipment (e.g., Cisco switches).

Here's how to set up a TFTP server on Windows.

I'll be using Ph. Jounin's Tftpd64 program (see: https://github.com/), because it doesn't need to be installed, so can be run only when necessary, is lightweight and free. In addition to the tftp protocol, it can be used as a DHCP, DNS, SNTP and Syslog server.

Network Diagram

  • OS: Windows
  • Tftp server: Tftpd64
  • Network Protocol: UDP 69
  • Tftp directory: C:\Users\user\Download\tftpd
Network diagram showing a Windows-based TFTP server sharing firmware files with a network switch via IP 192.168.1.10/24.

Download and run

Screenshot of the Tftpd64 download page on Bitbucket, highlighting the 64-bit portable edition option.
  • It's always a good idea to check the sha1 signature, here with PowerShell:
PS > Get-FileHash .\tftpd64_4-64_en_67602.zip -Algorithm SHA1 Algorithm Hash Path --------- ---- ---- SHA1 BB8A4DDD3821BE11B4BAFB07CD9475DBC036F8F9 C:\Users\administrator...
  • Once downloaded, decompress the zip archive:
Windows File Explorer showing the extraction option for the Tftpd64 ZIP file in the Downloads folder.
  • Double-click to run the tftpd64.exe application:
Windows File Explorer showing the extracted files of Tftpd64, with a red arrow pointing at tftpd64.exe, ready to be launched.

Configuration

  • First select your network interface, then click on Settings:
Tftpd64 interface showing the selection of the server network interface and the Settings button, both highlighted with red arrows.
  • In the GLOBAL tab, enable TFTP and DHCP services:
Tftpd64 settings window showing the TFTP Server and DHCP Server options checked to enable both services.
  • In the TFTP tab, check the Home Directory, which by default is the uncompressed folder. Click on Browse if you wish to change it:
Tftpd64 settings window displaying TFTP configuration options, including the Base Directory path selection and security settings.
  • If you wish to configure a DHCP server, go to the DHCP tab and set these parameters:
    • IP pool start: first IP address to be allocated
    • Size of pool: number of addresses that can be allocated (here 20 devices from 192.168.1.20 to 192.168.1.39)
    • Def. router: gateway address
    • Mask: network Mask
Tftpd64 DHCP settings window showing the IP pool start address, subnet mask, default gateway, and DHCP options configuration.

Check

tftp

To check that our server is running correctly, we can use the built-in tftp client.

  • In the Tftp Client tab, set the host IP, choose the file you want and click on Put:
Tftpd64 TFTP client interface showing the host IP address, local file path, and 'Put' button highlighted for uploading a file.
  • The previously sent file should appear in the directory where tftpd64.exe is located:
Windows File Explorer displaying the file '001.txt' transferred via Tftpd64, confirming a successful TFTP file transfer.

dhcp

  • To verify that the DHCP service is working properly, go to the DHCP server tab, and you should see the allocated leases:
Tftpd64 DHCP server log showing an allocated IP address 192.168.1.20 to a device with MAC address 00:50:56:80:33:19.
Creative Commons License
This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.

Contact :

contact mail address