Computer Networks Multiple Choice Questions on “FTP”.
1. Expansion of FTP is __________
a) Fine Transfer Protocol
b) File Transfer Protocol
c) First Transfer Protocol
d) Fast Transfer Protocol
Answer: b
Clarification: File Transfer Protocol is an application layer protocol used to share “files” between a server and a client. The protocol uses two separate ports for data and control connections: port 20 for data and port 21 for control.
2. FTP is built on _____ architecture.
a) Client-server
b) P2P
c) Data centric
d) Service oriented
Answer: a
Clarification: An FTP connection includes a Server and a Client which wish to share a number of data files. The server can transfer files with multiple clients at the same time while the client communicates with only one server at a time.
3. FTP uses _________ parallel TCP connections to transfer a file.
a) 1
b) 2
c) 3
d) 4
Answer: b
Clarification: Control connection using FTP port: 21, and data connection using FTP port: 20. The FTP session is started or ended using port 21 and the actual data i.e. files are sent through port 20.
4. Identify the incorrect statement regarding FTP.
a) FTP stands for File Transfer Protocol
b) FTP uses two parallel TCP connections
c) FTP sends its control information in-band
d) FTP sends exactly one file over the data connection
Answer: c
Clarification: FTP is out-of-band because the data connection is done separately through port 20 and control connection is done separately through port 21.
5. If 5 files are transferred from server A to client B in the same session. The number of TCP connections between A and B is _______
a) 5
b) 10
c) 2
d) 6
Answer: d
Clarification: The client would first initiate the TCP control connection through port 21. Then for every file transfer, a separate connection would be made through port 20. Now, since we have five files to be transferred, 1 control connection + 5 data connections = 6 total TCP connections.
6. FTP server _____________
a) Maintains state information
b) Is stateless
c) Has single TCP connection for a file transfer
d) Has UDP connection for file transfer
Answer: a
Clarification: FTP server maintains state information of every control connection to keep track of the active and inactive connections in the session. This helps the server decide which connection to terminate, in case the connection is inactive for too long.
7. The commands, from client to server, and replies, from server to client, are sent across the control connection in ________ bit ASCII format.
a) 8
b) 7
c) 3
d) 5
Answer: b
Clarification: FTP was designed to transmit commands only in English characters that are possible with just 7 bits in ASCII. Even the media has to be converted to ASCII before transmission.
8. Find the FTP reply whose message is wrongly matched.
a) 331 – Username OK, password required
b) 425 – Can’t open data connection
c) 452 – Error writing file
d) 452 – Can’t open data connection
Answer: d
Clarification: The correct response code for the message “Can’t open data connection” is 425. Response code 452 is sent usually when the connection is suddenly closed.
9. The data transfer mode of FTP, in which all the fragmenting has to be done by TCP is ________
a) Stream mode
b) Block mode
c) Compressed mode
d) Message mode
Answer: a
Clarification: Stream mode is the default mode of FTP, in which the TCP transforms/fragments the data into segments, and then after the transmission is completed, converts it back to stream of bytes.
10. The password is sent to the server using ________ command.
a) PASSWD
b) PASS
c) PASSWORD
d) PWORD
Answer: b
Clarification: The PASS command, preceded by the username, completes the user’s identification for access control in an FTP session. Without the valid password, the user won’t be able to initiate the FTP connection.