File Transfer Protocol aka FTP is a very popularly used protocol for transfer of files from one system to another in TCP/IP environment.
FTP uses client-server architecture and two connections for the successful transfer, which makes it different from other client-server services.
1. Control Connection: It is established on port 21 of server and used for command and control purposes.
2. Data Connection: Once control connection has been made, actual data transfer is carried out by establishing data connection.
How Does FTP Work?
The block representation above visualizes the working in brief.
One side we have client and server on other. Client has UI, control process where control connection is established and data process where data connection is established. Server has control and data process.
Control Connection:
The server issues a passive open connection on port 21 for client.
The client uses an ephemeral port (port used for short-duration connections) to accept the request and connects with the server. Such a connection is called as control connection.
Control connection is necessary as long as FTP connection is to be used, also it is like a prerequisite for making data connection.
Data Connection:
Client issues a passive open on an ephemeral port. (Why can't server issue? Because it is client who is going to issue command for data transfer) Client sends this port number to server.
Server on receiving port number accepts the request on port 20 and data connection is established successfully.
Once the data connection is established, data transfer may begin. Client and server may be using any operating system, architecture may be same of different, file structures and file formats may be different, FTP can be used for communication.
DIY Tip: FTP connection can be easily implemented using your Windows machine or even with the help of third-party software like FileZilla. How? Hold on!
FTP uses client-server architecture and two connections for the successful transfer, which makes it different from other client-server services.
1. Control Connection: It is established on port 21 of server and used for command and control purposes.
2. Data Connection: Once control connection has been made, actual data transfer is carried out by establishing data connection.
How Does FTP Work?
The block representation above visualizes the working in brief.
One side we have client and server on other. Client has UI, control process where control connection is established and data process where data connection is established. Server has control and data process.
Control Connection:
The server issues a passive open connection on port 21 for client.
The client uses an ephemeral port (port used for short-duration connections) to accept the request and connects with the server. Such a connection is called as control connection.
Control connection is necessary as long as FTP connection is to be used, also it is like a prerequisite for making data connection.
Data Connection:
Client issues a passive open on an ephemeral port. (Why can't server issue? Because it is client who is going to issue command for data transfer) Client sends this port number to server.
Server on receiving port number accepts the request on port 20 and data connection is established successfully.
Once the data connection is established, data transfer may begin. Client and server may be using any operating system, architecture may be same of different, file structures and file formats may be different, FTP can be used for communication.
DIY Tip: FTP connection can be easily implemented using your Windows machine or even with the help of third-party software like FileZilla. How? Hold on!

No comments:
Post a Comment