{{Short description|Very basic transfer protocol over UDP}} {{redirect-synonym|TFTP|Terrorist Finance Tracking Program}} {{Infobox networking protocol | title = Trivial File Transfer Protocol | logo = | logo alt = | image = | image alt = | caption = | is stack = No | abbreviation = TFTP | purpose = File transfer | developer = Karen R. Sollins | date = {{Start date and age|1981|06}} | based on = | influenced = | osilayer = | ports = 69/UDP | rfcs = {{IETF RFC|1350|plainlink=yes}} | hardware = }}

The '''Trivial File Transfer Protocol''' ('''TFTP''') is a simple communication protocol for transmitting or receiving files in a client-server application. A primary use of TFTP is in the early stages of nodes booting on a local area network when the operating system or firmware images are stored on a file server.<ref name="Intel_1999_PXE">{{cite book |title=Preboot execution environment (PXE) specification |publisher=Intel Corporation |date=1999}}</ref>

TFTP was first standardized in 1981<ref name="rfc783">{{cite IETF | title = The TFTP Protocol (Revision 2) | rfc = 783 | author = Karen R.Sollins |date=June 1981 | publisher = IETF | access-date = 2026-04-23 }}</ref> and updated in {{IETF RFC|1350}}.

==Overview== Due to its simple design, TFTP can be easily implemented by code with a small memory footprint. It is, therefore, the protocol of choice for the initial stages of any network booting strategy like BOOTP, PXE, BSDP, etc., when targeting from highly resourced computers to very low resourced Single-board computers (SBC) and System on a Chip (SoC). It is also used to transfer firmware images and configuration files to network appliances like routers, firewalls, IP phones, etc. Today, TFTP is virtually unused for Internet transfers.<ref name="Intel_1999_PXE"/>

TFTP's design was influenced from the earlier protocol EFTP, which was part of the PARC Universal Packet protocol suite. TFTP was first defined in 1980 by IEN 133.<ref>{{cite IETF | title = The TFTP Protocol | ien = 133 | author = Karen R. Sollins | date = 1980-01-29 | publisher = IETF | access-date = 2010-05-01 | autolink = yes | url = http://www.rfc-editor.org/ien/ien133.txt

}}</ref> In June 1981 The TFTP Protocol (Revision 2) was published as RFC 783 and later updated in July 1992 by RFC 1350 which fixed among other things the Sorcerer's Apprentice syndrome.<ref>{{cite IETF |rfc= 1123 |publisher=Internet Engineering Task Force |date = October 1989 |access-date=23 April 2026}}</ref> In March 1995 the TFTP Option Extension RFC 1782 updated later in May 1998 by RFC 2347, defined the option negotiation mechanism which establishes the framework for file transfer options to be negotiated prior to the transfer using a mechanism that is consistent with TFTP's original specification.<ref name="rfc2347">{{cite IETF |title = RFC 2347 |rfc = 2347 |publisher = Internet Engineering Task Force |access-date = 23 April 2026 }}</ref>

TFTP is a simple protocol for transferring files, implemented on top of the UDP/IP protocols using well-known port number 69. TFTP was designed to be small and easy to implement, and therefore it lacks most of the advanced features offered by more robust file transfer protocols. TFTP only reads and writes files from or to a remote server. It cannot list, delete, or rename files or directories and it has no provisions for user authentication. Today TFTP is generally only used on local area networks (LAN).

==Operation== thumb|A visual explanation of the TFTP protocol A TFTP transfer is initiated by the client issuing a request to read or write a particular file on the server.<ref name="rfc1350"/> The request can optionally include a set of negotiated transfer parameters proposed by the client as specified by RFC 2347<ref name="rfc2347"/> and may specify a block size as specified by RFS 2348<ref name="rfc2348">{{cite IETF | title = The TFTP Protocol (Revision 2) | rfc = 2347 | author1 = Gary Scott Malkin | author2 = Art Harkin |date=July 1992 | publisher = IETF | access-date = 2026-04-23 }}</ref>

If the server grants the request, the file is sent in fixed-length blocks (512 bytes unless otherwise specified). Each block of transferred data, which is usually carried within a single IP packet in order to avoid IP fragmentation, must be acknowledged by the client before the next block can be sent. A data packet of less than 512 bytes or the agreed blocksize option signals the termination of a transfer.<ref name="rfc1350"/>

If a packet gets lost in the network, the intended recipient will timeout and may retransmit their last packet (which may be data or an acknowledgment), thus causing the sender of the lost packet to retransmit that lost packet.<ref name="rfc1350"/>

TFTP defines three modes of transfer: "Netascii",<ref name="rfc783"/> which is a modified form of the ASCII character set with modifications similar to that of the Telnet protocol, "Octet", which consists of arbitrary binary data, and "Mail", which involves Netascii characters sent to an email address rather than a file. The latter mode of transfer has since been labelled obsolete.<ref name="rfc1350"/>

TFTP uses the User Datagram Protocol (UDP) at the transport layer. A transfer request is always initiated targeting port 69, but the data transfer ports are chosen independently by the sender and receiver during the transfer initialization. The ports are chosen at random according to the parameters of the networking stack, typically from the range of ephemeral ports.<ref name="rfc1350">{{cite IETF | title = The TFTP Protocol (Revision 2) | rfc = 1350 | author = Karen R.Sollins |date=July 1992 | publisher = IETF | access-date = 2010-05-01 }}</ref>

The original protocol has a transfer file size limit of 65535 blocks, or 32 MB. With RFC 2348 allowing for block sizes of up to 65535 bytes, the maximum size increased to 4 GB.<ref name="rfc2348" /> Some servers and clients support block number roll-over, where the block counter resets after passing the 65535 block limit. Although non-standard, this allows for theoretically unlimited transfer file size.<ref name="compuphase_extending">{{cite web | url = https://www.compuphase.com/tftp.htm | title = Extending TFTP | publisher = CompuPhase | access-date = 2018-12-12 }}</ref>

Due to requiring a successful round trip per block, TFTP provides low throughput especially over high latency links. In January 2015 TFTP RFC 7440 was published, which introduces a strategy where a larger amount of uninterrupted data blocks are sent before waiting for the acknowledgement, called "windowing". This substantially improves performance for use cases such as PXE booting, as an alternative to increasing the block size, which is limited by the risk of IP fragmentation.<ref name="rfc7440">{{cite IETF | title = The TFTP Protocol (Revision 2) | rfc = 7440 | author = Patrick Masotta |date =January 2015 | publisher = IETF | access-date = 2026-04-23 }}</ref>

==Usage== {{See also|Network booting}} TFTP has typically been associated with network booting. One of the first applications was the Bootstrap Loading using TFTP standard RFC 906, published in 1984, which established the 1981 published Trivial File Transfer Protocol standard RFC 783 to be used as the standard file transfer protocol for bootstrap loading.<ref name="rfc906">{{cite IETF | rfc = 904 | title = Exterior Gateway Protocol Formal Specification | access-date = 2026-04-23 | publisher = Internet Engineering Task Force | author = David L. Mills }} </ref><ref name="Intel_1999_PXE"/>

The Preboot Execution Environment (PXE) version 2.0 was released in December 1998, and the update 2.1 was made public in September 1999 counting on TFTP as its file transfer protocol.<ref name="pxespec">{{cite web |url = http://download.intel.com/design/archives/wfm/downloads/pxespec.pdf |title = Preboot Execution Environment (PXE) Specification - Version 2.1 |publisher = Intel Corporation |date = 1999-09-20 |access-date = 2014-02-08 |url-status = dead |archive-url = https://web.archive.org/web/20131102003141/http://download.intel.com/design/archives/wfm/downloads/pxespec.pdf |archive-date = 2013-11-02 }}</ref> Intel has recently decided to widely support PXE within the new UEFI specification extending the TFTP support to all EFI/UEFI environments.<ref name="2_4_Errata_A">{{cite web | url = http://www.uefi.org/sites/default/files/resources/2_4_Errata_A.pdf | title = Unified Extensible Firmware Interface Specification | publisher = UEFI | date = 2013-12-02 | access-date = 2014-04-04 }}</ref><ref name="Intel_UEFI_PXE_Boot_Performance_Analysis">{{cite web |url = https://uefidk.com/sites/default/files/Intel_UEFI_PXE_Boot_Performance_Analysis.pdf |title = UEFI PXE Boot Performance Analysis |publisher = Intel Corporation |date = 2014-02-02 |access-date = 2014-04-04 |url-status = dead |archive-url = https://web.archive.org/web/20140808044632/https://uefidk.com/sites/default/files/Intel_UEFI_PXE_Boot_Performance_Analysis.pdf |archive-date = 2014-08-08 }}</ref>

==Security considerations== TFTP provides no builtin security mechanisms. Care must be taken in the rights granted to a TFTP server process so as not to violate the security of the server's file system. As such, is often installed with controls such that only files that have public read access are available via TFTP.<ref name="rfc1350"/> Additionally, listing, deleting, renaming, and writing files via TFTP is not supported.<ref name="rfc2348"/> TFTP file transfers are not recommended where the inherent protocol limitations could raise insurmountable liability concerns.<ref name="rfc7440"/>

==IETF standards documentation== {| class="wikitable" |- ! RFC Number ! Title ! Published ! Author ! Obsolete and Update Information |-style="color:#777" |{{IETF RFC|783}} |The TFTP Protocol (Revision 1) |June 1981 |K. Sollins | {{dropped|Obsoleted by - {{IETF RFC|1350}}}} |- |{{IETF RFC|906}} |Bootstrap Loading using TFTP |June 1984 |Ross Finlayson | {{sdash}} |- |{{IETF RFC|951}} |Bootstrap Protocol |Sep.1985 |Bill Croft |Updated by {{IETF RFC|1395|1497|1532|1542|5494}} |- |{{IETF RFC|1350}} |The TFTP Protocol (Revision 2) |July 1992 |K. Sollins |Updated by {{IETF RFC|1782|1783|1784|1785|2347|2348|2349}} |-style="color:#777" |{{IETF RFC|1782}} |TFTP Option Extension |March 1995 |G. Malkin | {{dropped|Obsoleted by - {{IETF RFC|2347}}}} |- |{{IETF RFC|2090}} |TFTP Multicast Option |February 1997 |A. Emberson |Experimental |- |{{IETF RFC|2131}} |Dynamic Host Configuration Protocol |March 1997 |R. Droms |Updated by {{IETF RFC|3396|4361|5494|6842}} |- |{{IETF RFC|2347}} |TFTP Option Extension |May 1998 |G. Malkin | {{sdash}} |- |{{IETF RFC|2348}} |TFTP Blocksize Option |May 1998 |G. Malkin | {{sdash}} |- |{{IETF RFC|2349}} |TFTP Timeout Interval and Transfer Size Options |May 1998 |G. Malkin | {{sdash}} |- |{{IETF RFC|5505}} |Principles of Internet Host Configuration |May 2009 |B. Aboba | {{sdash}} |- |{{IETF RFC|7440}} |TFTP Windowsize Option |Jan 2015 |P. Masotta | {{sdash}} |- |}

== See also ==

* Simple File Transfer Protocol

== References == {{reflist}}

Category:Networking standards Category:Network protocols Category:Network file transfer protocols Category:Network booting