FTP (File transfer protocol) is a standard internet protocol provided by TCP/IP and basically used for transmitting the files from one host to another.
In the early-70s, FTP created and the protocol was officially approved by the IETF(Internet Engineering Task Force) in the mid-80s and designated RFC-959.
It is mainly used for transferring the web page files from their creator to the computer that acts as a server for other computers on the internet.
It is also used to transfer web page files from server to local computer.

👉 What is TCP and UDP, difference and what is used in youtube?
More detials about FTP

FTP Connections types

FTP connections are of two types:

1. Active FTP connection.

2. Passive FTP connection.

Active FTP connection:

The client establishes the command channel and the server establishes the data channel. When the client requests the data over the connection the server initiates the transfer of the data to the client. It is not the default connection because it may cause problems if there is a firewall in between the client and the server.

Passive FTP connection:

The client establishes both the data channel as well as the command channel. When the client requests the data over the connection, the server sends a random port number to the client, as soon as the client receives this port number it establishes the data channel. It is the default connection, as it works better even if the client is protected by the firewall.

Mode of Transmission

FTP transfer files using any of the following modes:

1. Stream Mode or

2. Block Mode or

3. Compressed Mode

Stream Mode

The stream Mode is the default mode. In this mode, the data is transferred from FTP to TCP in stream bytes. Here TCP is the cause for fragmenting data into small segments. The connection is automatically closed if the transforming data is in the stream bytes. Otherwise, the sender will close the connection.

Block Mode

In this mode, the data is transferred from FTP to TCP in the form of blocks, and each block followed by a 3-byte header. The first byte of the block contains the information about the block so it is known as the description block and the other two bytes contain the size of the block.

Compressed Mode

In this mode, The big files used to transfer. Due to the size limit we can not transfer big files on the internet, therefore compressed mode is used to decrease the size of the file into small and send it on the internet.

The advantages

Multiple Transfers FTP helps in transferring many large files between systems.
Efficiency FTP helps to organize files in an efficient manner and transfer them efficiently over the network.
Security FTP provides access to any user through user ID and password only.
Continuous Transfer If the transfer of the file is interrupted by chance, the user can resume the file transfer when the connection is established.
Simple FTP is widely used connection because of easy to implement and use.
Speed Fastest way to transfer files from one computer to another.

👈       👉