Information Technology IT – 14 Communications technology | e-Consult
14 Communications technology (1 questions)
FTP (File Transfer Protocol) is a standard network protocol used for transferring files between a client and a server on a computer network. It allows users to upload, download, delete, rename, and create directories on a remote server.
FTP operates using two connections: one control connection (for commands) and one data connection (for file transfer). The control connection is typically port 21, and the data connection can use port 20 (active mode) or a dynamically assigned port (passive mode).
Active FTP Mode: In active mode, the client initiates a connection to the server on port 21. The server then initiates a connection back to the client on a port chosen by the server. This can be problematic if the client is behind a firewall, as the firewall may block incoming connections from the server.
Passive FTP Mode: In passive mode, the client initiates a connection to the server on port 21. The client then requests the server to assign a port for the data connection. The client then connects to the server on the assigned port. This mode is generally preferred because it allows clients behind firewalls to connect to the server without firewall issues.
When to use Active vs. Passive:
- Active FTP: Suitable when the client is not behind a firewall and the server is directly accessible. However, avoid if the client is behind a firewall.
- Passive FTP: Preferred when the client is behind a firewall or NAT (Network Address Translation). It provides better compatibility with firewalls and networks with NAT.