Interview questions on FTP

How much data can be send in a Single FTP session

The amount of data which can be send is infinite. FTP uses TCP. The TCP channel can be used until the complete data is transferred. Multiple TCP segments can be used within the same TCP channel.

Can an IP packet carry FTP data

An IP packet is a carrier protocol used for carrying application layer data. The FTP data is packaged in TCP, which is sent to the intended recepient using the IP protocol in an IP based network

How does Active FTP communication Work

When a FTP client initiates a connection with FTP server in Active FTP mode, initially the FTP client initiates tcp 3 way handshake with the FTP server. This is initiated to port 21 on the server and is referred to as the control connection. Once the control connection is succesfull, the client responds with the port command to the server, which contains the port number to which the server needs to initiate the second TCP connection. The server initiates the connection ( 2ND tcp 3 way handshake) from port 20 on it to the port number provided by the client. This is known as data connection.Once the data connection connection is succesfull, the data transmission can commence.

How many TCP connections are used by Active and Passive FTP respectively

Both Active and Passive FTP uses two TCP connections

Why does Active FTP not work when a firewall is involved between the client and the server.

In Active FTP , once the FTP client establishes the connectivity with the server, the server initiates the data connection to the client. This is a TCP connection which is initiated from a system (FTP Server) which resides outside the network. All traffic initiated from outside is considered as untrusted, and the firewall would drop it by default.

How does Passive FTP resolve the issue with firewalls

In Passive FTP, the FTP client initiates the connection with the server and not the FTP server with the client. Since the client is residing within the network , the connection is considered as trusted by the firewall.

In Active FTP, which TCP port is used for initiating the control channel

Port 21

Ebook Store – Click Here