Trivial File Transfer Protocol (TFTP) is a very simple file transfer protocol akin to a basic version of FTP. TFTP is often used to transfer small files between hosts on a network, such as when a remote X Window Systemterminal or any other thin clientboots from a network host or server.
Used to read files from/write files to a remote server
Supports three different transfer modes, "netascii", "octet" and "mail", with the first two corresponding to the "ascii" and "image" (binary) modes of the FTP protocol.
Details of a TFTP session
Since TFTP utilizes UDP, there's no formal definition of session, client and server. However, each file transferred via TFTP constitutes an independent exchange of packets, and an informal client-server relationship exists between the initiating and responding hosts.
The initiating host A sends an RRQ (read request) or WRQ (write request) packet to host B, containing the filename and transfer mode.
B replies with an ACK (acknowledgement) packet, which also serves to inform A of which port on host B the remaining packets should be sent to.
The source host sends numbered DATA packets to the destination host, all but the last containing 512 bytes of data. The destination host replies with numbered ACK packets for all DATA packets.
The final DATA packet must contain less than 512 bytes of data to signal that it is the last. If the size of the transferred file is an exact multiple of 512 bytes, the source sends a final DATA packet containing 0 bytes of data.