written 6.7 years ago by |
File Transfer Protocol (FTP) is the standard mechanism provided by TCP/IP for copying a file from one host to another.
FTP uses two well-known TCP ports: Port 21 is used for the control connection, and port 20 is used for the data connection.
Figure shows the basic model of FTP. The client has three components: user interface, client control process, and the client data transfer process. The server has two components: the server control process and the server data transfer process.
The control connection is made between the control processes. The data connection is made between the data transfer processes.
The control connection remains connected during the entire interactive FTP session. The data connection is opened and then closed for each file transferred. It opens each time commands that involve transferring files are used, and it closes when the file is transferred.
The two FTP connections, control and data, use different strategies and different port numbers.
Limitations of FTP:
Transferring files with FTP is not secure.
All data is sent in clear text, including usernames and passwords.
TFTP:
Trivial File Transfer Protocol (TFTP) is a simple protocol used for transferring files.
TFTP uses the services of UDP on the well-known port 69.
TFTP is mostly used to read and write files/mail to or from a remote server.
There are five types of TFTP messages, RRQ, WRQ, DATA, ACK, and ERROR.
RRQ
The read request (RRQ) message is used by the client to establish a connection for reading data from the server.
WRQ
The write request (WRQ) message is used by the client to establish a connection for writing data to the server.
DATA
The data (DATA) message is used by the client or the server to send blocks of data.
ACK
The acknowledge (ACK) message is used by the client or server to acknowledge the receipt of a data block.
ERROR
The ERROR message is used by the client or the server when a connection cannot be established or when there is a problem during data transmission.