Common Ports and Protocols
Common networking ports, protocols, and services
What you will learn
- Recall the most frequently tested port numbers (HTTP, HTTPS, DNS, SSH, and others).
- Distinguish TCP (reliable) from UDP (fast, no guarantee) and why each service picks one.
- Explain why DNS uses both protocols depending on the situation.
- Match each port to the service it represents without mixing them up.
The port number determines which application on the receiving device should get the data, while the protocol (TCP or UDP) determines how it's delivered. TCP guarantees all data arrives in the correct order (good for web pages and files), while UDP is faster but guarantees nothing (good for live voice/video, where delay is worse than losing some data).
The most frequently tested ports
| 20/21 (FTP) | File transfer — 20 for data, 21 for control. |
|---|---|
| 22 (SSH) | Secure encrypted remote command-line access. |
| 25 (SMTP) | Sending email between servers. |
| 53 (DNS) | Name-to-IP resolution — UDP for normal queries, TCP for large ones. |
| 67/68 (DHCP) | Automatic IP address assignment to devices. |
| 80/443 (HTTP/HTTPS) | Web browsing — 443 encrypted via TLS, 80 unencrypted. |
| 3389 (RDP) | Remote desktop access on Windows. |
TCP vs. UDP
| TCP | UDP | |
|---|---|---|
| Reliability | Guarantees delivery and correct order | No guarantees — "fire and forget" |
| Speed | Slower due to checking and acknowledgment | Faster — no extra verification |
| Ideal use | Web pages, email, file transfer | Voice calls, live video streaming |
The DNS trap
DNS breaks the simple "one protocol per service" rule — it uses UDP for normal queries (faster), but switches to TCP when it needs to transfer more data than a single UDP packet can hold (like a full zone transfer between DNS servers).
Quick check
Answer in your head first, then reveal.
What is the default port for SSH?Reveal the answer
22.
Why is UDP preferred for live voice calls?Reveal the answer
Because speed matters more than guaranteed delivery — delay is worse than losing a small part of the audio.
When does DNS use TCP instead of UDP?Reveal the answer
When transferring data larger than a single UDP packet, like a full zone transfer.
Sign in to track your progress on this topic.
Your next step
Read the lesson, then mark it complete
Sources
Used to verify the facts. The writing is original to Passuit.