networking

Stands for: Trivial File Transfer Protocol

A minimal file-transfer protocol with no authentication, used for booting devices.

Trivial File Transfer Protocol (RFC 1350) is a tiny UDP-based protocol common for network boot (PXE) and device firmware, deliberately simple and therefore unauthenticated.

Every packet starts with a two-byte opcode: 1 read request (RRQ), 2 write request (WRQ), 3 DATA, 4 ACK and 5 ERROR. The request goes to UDP port 69, but the server answers from a port it chooses, and RFC 1350 calls the two ports transfer identifiers: for the rest of the transfer a packet from any other source port is discarded and answered with an error. Data moves in 512-byte blocks numbered from one, each acknowledged before the next is sent, and a block shorter than 512 bytes ends the transfer.

That lock step keeps the protocol small, and its cost is throughput. RFC 2347 (1998) lets the client append options to its request and the server confirm them in an option acknowledgment (OACK, opcode 6); only the client may propose. RFC 2348 negotiates blksize, 8 to 65464 octets, RFC 2349 a timeout of 1 to 255 seconds and tsize, the file size, and RFC 7440 (2015) a windowsize of 1 to 65535 blocks sent before each ACK. In RFC 7440's test of a 180 MB file in 1456-byte blocks, one block per ACK took 257 seconds and a window of 16 took 42.

TFTP has no login or access control, so RFC 1350 says servers are often set up to offer only publicly readable files and to refuse writes, and RFC 7440 adds that it has no protection against an on-path attacker. An ERROR packet is never acknowledged or retransmitted, so a lost one shows up only as a timeout. A two-byte block number starting at one counts 65535 blocks, 33,553,920 bytes at 512 bytes each, and RFC 1350 does not say what comes after.

Also known as: tftp

← All glossary entries