All Windows Server version support the ability to run built-in TFTP server. Though there is no dedicated role or service of the TFTP server (don’t look for it in the FTP section of your IIS server), this feature, like in Windows Server 2003, is a part of Windows Deployments Services (WDS). TFTP service operates inside WDS process svchost.exe.
TFTP (Trivial File Transfer Protocol) is a simplified file transfer protocol offering an easy way to download and upload files. As a rule, TFTP is used in PXE boot systems (network boot, diskless workstations, etc.), import/export network equipment configurations and some other specific tasks. This protocol has no means of security, authentication or management. Its main advantage is easy client-side implementation and high performance when large files are transferred. The protocol uses UDP port 69.
To install the TFTP service on Windows Server 2012 R2, start Server Manager and select Windows Deployment Services role using Add Roles and Features Wiazrd.
In the next step, select only Transport Server in the WDS role components and uncheck Deployment Server.
After the role is installed, create a directory, which is going to be a root directory of the TFTP server, for example, C:\tftp.
Then using the Registry Editor in HKLM\SYSTEM\CurrentControlSet\services\WDSServer\Providers\WDSTFTP create a new string parameter with the name RootFolder and value containing the path to the root directory created earlier.
Pay attention to the value of ReadFilter parameter. By default, it allows downloading files only from \boot and \tmp directories. If you need an opportunity to download files from the root or other folders, change the ReadFilter value to \*.
Start WDS with the following command:
WDSUTIL /Start-TransportServer
set-service WDSServer -StartupType Automatic
In Windows Firewall, a rule will appear, which allows the incoming traffic to UDP Port 69 (the service responds from any port higher than 1023). Some antiviruses can block Port 69 (McAffee Enterprise does so).
So you have configured your TFTP server.
To test the TFTP server, you’ll need the TFTP client. It can be installed using Server Manager, in which you select TFTP Client.
Let’s try to connect to the deployed TFTP server locally and download test.zip file.
You can download the file using this command:
tftp –i localhost GET tmp\test.zip C:\temp\test.zip
In theory, it should, but in practice I got the following error after running the last command:
When starting or restarting Windows Deployment Services Server, the following event from WDSTFTP service and EventID 259 appeared in the Application log:
To make the TFTP server work, I had to install the component of the role WDS -> Deployment Service and delete it at once. After it had been installed, I changed the RootFolder value from C:\RemoteInstall to c:\tftp. Then I tried to download the file again.
PS C:\temp> tftp -i localhost get boot\test.zip
Success!
We have considered how to deploy a TFTP server in Windows Server 2012 easily with no third-party tools. The features of this kind of a server will be crippled, so in more complicated installations the alternative TFTP server implementations are preferable, e. g., tftpd32.