Show understanding of protocols (HTTP, FTP, POP3, IMAP, SMTP, BitTorrent) and their purposes
14.1 Protocols 📡
HTTP – HyperText Transfer Protocol
Think of HTTP as a waiter in a restaurant. You (the client) place an order (a request) and the waiter brings back your food (the response). The waiter follows a strict script: you say what you want, the waiter writes it down, goes to the kitchen, and brings it back.
- Stateless: each request is independent.
- Uses GET to fetch data, POST to send data.
- Runs over TCP port 80 (or 443 for HTTPS).
FTP – File Transfer Protocol
FTP is like moving boxes between two houses. You (client) tell the moving company (server) which boxes to pick up and where to drop them. FTP can be active or passive depending on who opens the door.
- Uses two connections: control (port 21) and data (dynamic port).
- Supports upload (STOR) and download (RETR).
- Can be secured with FTPS or SFTP.
POP3 – Post Office Protocol 3
POP3 is like a mailbox that you empty. When you check your mail, you pick up all letters and they disappear from the post office.
- Downloads messages to the client.
- Messages are usually deleted from the server after download.
- Runs over TCP port 110.
IMAP – Internet Message Access Protocol
IMAP is like a shared folder in the cloud. You can open the folder from any device, and all devices see the same contents.
- Messages stay on the server.
- Supports folders, flags, and search.
- Runs over TCP port 143 (or 993 for IMAPS).
SMTP – Simple Mail Transfer Protocol
SMTP is the postman who delivers your letter to the recipient’s mailbox. It only knows how to send, not how to receive.
- Handles sending email from client to server or between servers.
- Uses TCP port 25 (or 587 for submission).
- Can be secured with STARTTLS.
BitTorrent – Peer‑to‑Peer File Sharing
BitTorrent is like a group of friends sharing a huge pizza. Instead of everyone waiting for the pizza to be delivered, each friend cuts a slice and shares it with others.
- Files are split into pieces; peers download pieces from each other.
- Reduces load on any single server.
- Uses a tracker to coordinate peers.
Protocol Comparison Table
| Protocol | Primary Use | Typical Port | Key Feature |
|---|---|---|---|
| HTTP | Web pages | 80 / 443 | Stateless, request/response |
| FTP | File transfer | 21 / 20 | Control + data channels |
| POP3 | Email retrieval | 110 | Downloads & deletes |
| IMAP | Email retrieval | 143 / 993 | Keeps messages on server |
| SMTP | Email sending | 25 / 587 | Unidirectional send |
| BitTorrent | P2P file sharing | Varies (usually 6881‑6889) | Decentralised distribution |
Revision
Log in to practice.