Open In App

What is TFTP (Trivial File Transfer Protocol)?

The network is made up of various devices. These devices are either connected by ethernet or by any wireless means. The communication for transferring files takes place between these connected devices. Therefore network protocols are required. Network protocols are defined as rules that describe the format of data, sending and receiving of data between the devices connected in a network. The below article covers in detail the Trivial File Transfer Protocol(TFTP).

TFTP (Trivial File Transfer Protocol)

TFTP stands for Trivial File Transfer Protocol. TFTP is defined as a protocol that is used to transfer a file from a client to a server and from a server to a client. TFTP is majorly used when no complex interactions are required by the client and server. The service of TFTP is provided by UDP (User Datagram Protocol) and works on port number 69. TFTP does not provide security features therefore it is not used in communications that take place over the Internet. Therefore it is used only for the systems that are set up on the local internet. TFTP requires less amount of memory.



TFTP Protocol

TFTP Message Formats

There are four types of TFTP Message formats. They are as follows



1. Read Request:

Read Request is also known as Type 1. A read request is used by the client to get a copy of a file from the server. Below is the format of the Read Request

Read Request (1)

(2 Octets)

File Name

(variable)

0

(1 Octet)

Mode

(Variable)

0

(1 Octet)

2. Write Request:

Write Request is also known as Type 2. Write Request is being used by the client for writing a file into the server. Below is the format of the Write Request.

Write Request(2)

(2 Octets)

File Name

(variable)

0

(1 Octet)

Mode

(Variable)

0

(1 Octet)

3. Data

Data is also known as Type 3. Data consists of a portion of a file that is being copied. The data block is of fixed size that is 512 octets. Below is the format of the Data.

Data (3)

(2 Octets)

Sequence Number

(2 Octets)

Data

(Upto 512 octets)

4. Acknowledgement

Acknowledgment is also known as Type 4. The data present at the last in the message consists of the End of File(EOF) where the size is less than 512 octets. This acknowledgment is used by both client and server for acknowledging the received data.

Ack(4)

(2 Octets)

Sequence Number

(2 Octets)

Working of TFTP

Advantages of TFTP

Disadvantages of TFTP

Applications of TFTP

Difference between TFTP and SFTP: TFTP vs SFTP

Difference between FTP and TFTP: FTP vs TFTP

Frequently Asked Questions on TFTP

Q1. In the working of TFTP what if the file is not received by the client during communication?

Answer:

When the server sends the packet to the client it puts on the timer. If any acknowledgement is not received from the client side the server again sends this packet. Upon receiving the acknowledgment from the client, served and then sends the next packet.

Q2. Why TFTP is considered an unsecured protocol?

Answer:

TFTP does not provide any security features such as authentication, it does not have any error recovery methods and the data that is transferred is not encrypted. Therefore TFTP is considered an unsecured protocol.

Q3. What is the difference between FTP and TFTP?

Answer:

Both FTP and TFTP are used for transferring files from one system to another but the difference between both is that FTP provides more security and allows complex functions, commands, and operations on data whereas TFTP does not provides security features and complex commands.

Q4. What is meant by a TFTP server?

Answer:

TFTP server provides communication with the TFTP client for sending and receiving the files in the form of packets.


Article Tags :