بِسْمِ اللَّهِ الرَّحْمَنِ الرَّحِيم

اقْرَأْ بِاسْمِ رَبِّكَ الَّذِي خَلَقَ
Bacalah dengan (menyebut) nama Tuhanmu Yang menciptakan [Al-'Alaq 96:1]

2.2.3 Explain various file transfer protocol (FTP) client




File Transfer Protocol (FTP) is a standard network protocol used to transfer files from one host to another host over a TCP-based network, such as the Internet. FTP is built on a client-server architecture and uses separate control and data connections between the client and the server.[1] FTP users may authenticate themselves using a clear-text sign-in protocol but can connect anonymously if the server is configured to allow it.
In the second age, the first FTP client applications were interactive command-line tools, implementing standard commands and syntax. Graphical user interface clients have since been developed for many of the popular desktop operating systems in use today
FTP operates on the application layer of the OSI model, and is used to transfer files using TCP/IP.[3] To do so, an FTP server has to be running and waiting for incoming requests.[3] The client computer is then able to communicate with the server on port 21.[3][7] This connection, called the control connection,[8] remains open for the duration of the session, with a second connection, called the data connection,[2][8] which can either be opened by the server from its port 20 to a negotiated client port (active mode), or by the client from an arbitrary port to a negotiated server port (passive mode) as required to transfer file data.[2][7] The control connection is used for session administration (i.e., commands, identification, passwords)[9] exchanged between the client and the server using a telnet-like protocol. For example "RETR filename" would transfer the specified file from the server to the client. Due to this two-port structure, FTP is considered an out-of-band protocol, as opposed to an in-band protocol such as HTTP.[9]
The server responds on the control connection with three digit status codes in ASCII with an optional text message, for example "200" (or "200 OK.") means that the last command was successful. The numbers represent the code number and the optional text represent explanations (e.g., <OK>) or needed parameters (e.g., <Need account for storing file>).[1] A file transfer in progress over the data connection can be aborted using an interrupt message sent over the control connection.
FTP may run in active or passive modes, any of which determines how the data connection is established.[8] In the active mode, the client sends the server the IP address and port number, then the client waits till the server initiates the TCP connection.[7] In situations where the client is behind a firewall and unable to accept incoming TCP connections, the passive mode may be used. In this mode the client sends a PASV command to the server and receives an IP address and port number in return.[7][8] The client uses these to open the data connection to the server.[6] Both modes were updated in September 1998 to support IPv6. Further changes were introduced to the passive mode at that time, updating it to extended passive mode.[10]
While transferring data over the network, four data representations can be used:[2][3][5]
  • ASCII mode: used for text. Data is converted, if needed, from the sending host's character representation to "8-bit ASCII" before transmission, and (again, if necessary) to the receiving host's character representation. As a consequence, this mode is inappropriate for files that contain data other than plain text.
  • Image mode (commonly called Binary mode): the sending machine sends each file byte for byte, and the recipient stores the bytestream as it receives it. (Image mode support has been recommended for all implementations of FTP).
  • EBCDIC mode: use for plain text between hosts using the EBCDIC character set. This mode is otherwise like ASCII mode.
  • Local mode: Allows two computers with identical setups to send data in a proprietary format without the need to convert it to ASCII
For text files, different format control and record structure options are provided. These features were designed to facilitate files containing Telnet or ASA formatting.
Data transfer can be done in any of three modes:[1][2]
  • Stream mode: Data is sent as a continuous stream, relieving FTP from doing any processing. Rather, all processing is left up to TCP. No End-of-file indicator is needed, unless the data is divided into records.
  • Block mode: FTP breaks the data into several blocks (block header, byte count, and data field) and then passes it on to TCP.[5