What is the TFTP Operation?

TFTP (Trivial File Transfer Protocol) operation is very simple compared to full-featured protocols like FTP. The client sends a read or write request to the server's UDP port 69. The server accepts the request by sharing data messages in case of a read request and sending acknowledgment in case of a write request. In either case, the server chooses a new UDP port for further communication and sends its first response to the client through the selected UDP port.

Each data message has a fixed size data block of 512 octets and is individually acknowledged. The last data block containing EOF (End of File) or a data block containing less than 512 octets terminates the session.

TFTP Operation Flow Client TFTP Server 1. Read/Write Request (Port 69) 2. First Response (New Port) 3. Data Block (512 octets) 4. Acknowledgment (ACK) ... (Repeat until EOF or block < 512 octets) 5. Final Block (< 512 octets or EOF) 6. Final ACK (Session Ends)

Error Handling and Timeouts

If a TFTP message is lost and there is no expected response, the message is retransmitted by the sender after a timeout. For example, if an acknowledgment is lost, the data message is repeated after a timeout. Similarly, if the next data message is not received after sending an acknowledgment, the last acknowledgment is repeated after the timeout period.

Key Features of TFTP

  • Simple protocol − Uses only five types of packets: RRQ (Read Request), WRQ (Write Request), DATA, ACK, and ERROR.

  • UDP-based − Uses UDP port 69 for initial contact, then switches to a different port for data transfer.

  • Fixed block size − Each data block is exactly 512 octets, except the final block which may be smaller.

  • Stop-and-wait − Each data block must be acknowledged before the next one is sent.

Use Cases of TFTP

  • Device bootstrapping − TFTP is mainly used during the device bootstrap process for downloading device OS/firmware and configuration files. It is commonly used for copying bootstrap and configuration data between nodes on the same LAN.

  • Network device initialization − It is used along with boot protocols such as BOOTP and DHCP to initialize network devices. When a device boots up, it gets its IP address and other parameters through BOOTP or DHCP, including the TFTP server address and bootstrap file location.

  • Lightweight file transfer − TFTP is used in situations where the full features of a complete file transfer protocol such as FTP are not required, particularly in embedded systems and network equipment.

Conclusion

TFTP provides a simple, lightweight file transfer mechanism using UDP with 512-octet data blocks and individual acknowledgments. It is primarily used for device bootstrapping and network equipment initialization where simplicity and minimal overhead are more important than advanced features.

Updated on: 2026-03-16T23:36:12+05:30

838 Views

Kickstart Your Career

Get certified by completing the course

Get Started
Advertisements