Introduction
Two everyday internet tasks — moving files between computers and exchanging email — are handled by their own families of application layer protocols. FTP (File Transfer Protocol) handles bulk file transfer, while SMTP, POP3, and IMAP together handle sending and retrieving email messages. Each of these protocols has a distinct role, and mixing them up is a common source of confusion.
Cricket analogy: Just as a cricket board has separate departments for ground logistics and match broadcasting, the internet has separate protocol families — FTP for hauling files and SMTP/POP3/IMAP for handling email — and confusing groundskeeping with commentary would be as odd as mixing up these protocols.
Explanation
FTP is unusual among application layer protocols because it uses two separate TCP connections instead of one. The control connection, established on port 21, stays open for the duration of the session and carries commands (like login, list directory, or request a file) and their responses. The data connection, which historically defaults to port 20 in active mode (or a negotiated port in passive mode), is opened separately and used only to actually transfer file contents or directory listings. Separating control from data lets FTP send commands and receive status updates independently of the (potentially large and slow) file transfer itself.
Cricket analogy: A cricket team keeps its captain on an open phone line with the coach throughout the match (control connection) while a separate runner physically carries the drinks tray onto the field only when needed (data connection), just like FTP's persistent control channel on port 21 versus its separate data connection.
Email relies on three different protocols because sending and receiving are fundamentally different jobs. SMTP (Simple Mail Transfer Protocol, port 25) is used to send email — both from a client to its outgoing mail server, and between mail servers relaying a message toward its destination. Once a message has arrived at the recipient's mail server, the recipient needs a way to retrieve it, and that is where POP3 and IMAP come in. POP3 (Post Office Protocol version 3, port 110) follows a download-and-delete model: the client connects, downloads waiting messages to local storage, and by default removes them from the server, making it best suited to a single device checking mail. IMAP (Internet Message Access Protocol, port 143) instead keeps messages on the server and synchronizes state (read/unread, folders, flags) between the server and every client that connects, which is why IMAP is the standard choice when a mailbox is accessed from multiple devices.
Cricket analogy: Sending a match report to headquarters is like SMTP relaying a message onward; a lone club scorer who takes the only paper scorebook home and erases the noticeboard copy is like POP3's download-and-delete model, while a shared digital scoreboard synced across every device at the ground is like IMAP.
Example
# Connect to an FTP server and see the separate control/data flow (conceptual)
ftp -inv ftp.example.com <<'EOF'
user anonymous anonymous@example.com
ls
get readme.txt
bye
EOF
# The 'user' and 'ls' commands travel over the control connection (port 21).
# The 'ls' listing and 'get' file transfer each open a separate data connection.Analysis
In the FTP example, notice that logging in and listing a directory are just commands exchanged over the always-open control connection, while actually retrieving readme.txt requires FTP to open a fresh data connection just for that transfer, then close it once the file has arrived. This two-connection design is also why FTP can be tricky through firewalls and NAT — the data connection's port is negotiated dynamically, especially in passive mode. For email, the practical difference between POP3 and IMAP becomes obvious the moment you check the same mailbox from a phone and a laptop: with POP3 the first device to connect could pull all the mail down and delete it from the server, leaving the second device unable to see it; with IMAP both devices see a synchronized view because the messages and their state genuinely live on the server.
Cricket analogy: Just as logging into the dressing room and checking the team sheet uses the always-open captain-coach line, but physically fetching the new practice jerseys from the store requires briefly opening a separate gate (tricky for stadium security to track), FTP's control commands versus its dynamically-negotiated data connection work the same way, and checking team news from both the coach's phone and the manager's laptop shows why a synced IMAP-style system beats one where the first device to check deletes the notice for everyone.
Key Takeaways
- FTP uses a persistent control connection (port 21) for commands and a separate data connection (port 20 in active mode, or negotiated in passive mode) for actual file transfer.
- SMTP (port 25) is used to send email, both client-to-server and server-to-server.
- POP3 (port 110) downloads mail to the client and deletes it from the server by default — a download-and-delete model.
- IMAP (port 143) keeps mail on the server and synchronizes folders/flags across multiple clients.
- Choose IMAP when a mailbox is accessed from several devices; POP3 suits a single-device, offline-storage use case.
Practice what you learned
1. What is the primary purpose of FTP's control connection on port 21?
2. Which email protocol is used to send a message from a client to its outgoing mail server?
3. Which retrieval protocol follows a 'download-and-delete' model by default?
4. Why is IMAP generally preferred over POP3 for checking mail on multiple devices?
5. What is the default port for IMAP?
Was this page helpful?
You May Also Like
Application Layer Protocols Overview
A survey of the protocols that let applications talk to each other over a network, and how they fit above the transport layer.
Ports and Sockets
Understand port number ranges and how a socket, the pairing of an IP address and port, identifies a network endpoint.
TCP vs UDP
Compare TCP and UDP across reliability, ordering, connection state, overhead, and typical use cases.
Network Security Basics
Learn the core principles that keep networks safe: confidentiality, integrity, availability, and the controls that enforce them.
DNS: The Domain Name System
How DNS translates human-friendly domain names into IP addresses through a distributed hierarchy of resolvers and servers.