Trivial File Transfer Protocol
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 System terminal or any other thin client boots from a network host or server.
Some details of TFTP:
- Uses UDP (port 69) as its transport protocol (unlike FTP which uses TCP).
- It cannot list directory contents
- No authentication or encryption mechanisms
- Used to write files from/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's 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.
See also
- "The TFTP protocol (revision 2)"