Article Categories
- All Categories
-
Data Structure
-
Networking
-
RDBMS
-
Operating System
-
Java
-
MS Excel
-
iOS
-
HTML
-
CSS
-
Android
-
Python
-
C Programming
-
C++
-
C#
-
MongoDB
-
MySQL
-
Javascript
-
PHP
-
Economics & Finance
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.
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.
