What is TFTP?


TFTP represents the Trivial File Transfer Protocol. Some applications do not need the full functionality of TCP, nor can they afford the complexity. TFTP supports an inexpensive structure that does not require complex interactions between the client and the server. TFTP confine operations to simple File Transfer and does not support authentications.

The benefit of using TFTP is that it enables bootstrapping code to use the similar underlying TCP/IP protocols that the operating framework uses once it starts execution. Thus it is the possibility for a device to bootstrap from a server on another physical network.

TFTP does not have a dependable stream transport service. It runs on the top of UDP of any other unreliable packet delivery system using timeout and retransmission to ensure that data arrives. The sending side transmits a file in fixed-size blocks and awaits each block's acknowledgement before sending the text.

Features of TFTP

The main features of TFTP are as follows−

TFTP is based on the client-server principle and uses well-known UDP port number 69 for the TFTP server.

TFTP is an unsecured protocol and does not support authentication.

TFTP incorporates idle − RQ (stop and wait) error recovery mechanism.

  • Every TFTP data unit bears a sequence number.
  • Each data unit is separately acknowledged. After taking the acknowledgement, the next data unit is transmitted.
  • Error recovery is by retransmission after timeout. TFTP uses adaptive timeout with an exponential back-off algorithm.

TFTP Message Formats

There are four types of TFTP Messages which are as follows −

Read Request −The client uses this command to get 0 copy of a file from the server

Read Request (1)File Name0mode0

        2 octets                      variable                     1 octet                                  variable                      1 octet

Write Request − The client uses this command to write a file into the server

Read Request (1)File Name0mode0

        2 octets                         variable                  1 octet                               variable                           1 octet

Data − This TFTP message contains blocks of data.

Data (3)Sequence NumberData

                         2 octets                                   2 octets                                                                   up to 512 octets

Acknowledgement− The client and the server used this to acknowledge the received data units.

Ack (4)Sequence Number

                    2 octets                                                                              2 octets

In this figure, the first two octets indicate the type of message. Mode fields define the type of data (ASCII or Binary). The file name and mode fields are delimited using an all zero's octet.

Type 3 message contains the data blocks of the fixed size of 512 octets. The session is removed if a data message appears with a data octet less than 512 octets. The last data message can have a data block (with EOF) with less than 512 octets. Type 4 message is used for acknowledgement.

Updated on: 04-May-2021

5K+ Views

Kickstart Your Career

Get certified by completing the course

Get Started
Advertisements