rss logo

Windows - Setting up a TFTP and DHCP server

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.

Personnaly, I use it to update the firmware on my network equipment. (Cisco switches for examples).

Here's how to set up a TFTP server under 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
Windows | tftp server architecture

Download and run

Tftpd | Download page
  • 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:
Tftpd | Unzip tftpd64_4-64_en_67602.zip file
  • Double-click to run the tftpd64.exe application:
Tftpd | run tftpd64.exe

Configuration

  • First select your network interface, then click on Settings:
Tftpd | main interface
  • In the GLOBAL tab, enable TFTP and DHCP services:
Tftpd | global tab
  • In the TFTP tab, check the Home Directory, which by default is the uncompressed folder. Click on Browse if you wish to change it:
Tftpd | TFTP tab
  • 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
Tftpd | DHCP tab

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:
Tftpd | Tftp Client tab
  • The file previously sent should appear in the directory where tftpd64.exe is located:
Tftpd | Tftp transferred file

dhcp

  • To check that the DHCP service is working properly, simply go to the DHCP server tab, and you should see the allocated leases:
Tftpd | Tftp transferred file
Creative Commons License
This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.

Contact :

contact mail address