Objective 2.1: Compare and contrast Transmission Control Protocol (TCP) and User Datagram Protocol (UDP) ports, protocols, and their purposes
Cert: CompTIA A+ Core 1 (220-1201) V15 Domain: 2.0 Networking Weight: ~23% of Core 1 Depth: Compare and contrast. Know the common ports, what protocol uses each, what transport, and what it does.
What this objective tests
You should be able to recognize the common ports and protocols, know whether each uses TCP or UDP, and know the use case for each. This is mostly a memorization-heavy objective. The port-protocol pairings show up across multiple Core 1 and Core 2 objectives.
Key facts
The port list to know (CompTIA's official 220-1201 list):
| Port | Protocol | Transport | Purpose |
|---|---|---|---|
| 20, 21 | FTP | TCP | File transfer (20 data, 21 control) |
| 22 | SSH, SCP, SFTP | TCP | Secure remote shell and file transfer |
| 23 | Telnet | TCP | Unencrypted remote shell (legacy) |
| 25 | SMTP | TCP | Sending email between servers |
| 53 | DNS | TCP and UDP | Domain name resolution |
| 67, 68 | DHCP | UDP | 67 server, 68 client; assigns IP addresses |
| 80 | HTTP | TCP | Unencrypted web traffic |
| 110 | POP3 | TCP | Retrieving email (download to client) |
| 137-139 | NetBIOS / NetBT | TCP and UDP | Legacy Windows file/print sharing |
| 143 | IMAP | TCP | Retrieving email (keep on server) |
| 389 | LDAP | TCP and UDP | Directory services (Active Directory) |
| 443 | HTTPS | TCP | Encrypted web traffic |
| 445 | SMB / CIFS | TCP | Windows file and print sharing |
| 3389 | RDP | TCP and UDP | Remote Desktop |
TCP vs UDP:
- TCP (Transmission Control Protocol). Connection-oriented, reliable. Establishes a session with a three-way handshake (SYN, SYN-ACK, ACK). Acknowledges every packet, retransmits lost ones, delivers in order. Used when data integrity matters (file transfer, web, email).
- UDP (User Datagram Protocol). Connectionless, best-effort. Sends packets and forgets about them. No retransmission, no ordering guarantee. Used when speed beats reliability and the application can tolerate loss (DNS lookups, voice/video real-time, gaming, DHCP).
Quick associations to remember:
- HTTP/HTTPS: 80/443. Always TCP. HTTPS is HTTP over TLS.
- SSH and SFTP: 22. TCP. Modern secure remote management.
- Telnet: 23. TCP. Plaintext, do not use on production networks.
- FTP: 20/21. TCP. Legacy plaintext file transfer.
- DNS: 53. Uses UDP for most queries; TCP for large responses and zone transfers.
- DHCP: 67/68. UDP. Because the client does not have an IP yet during the request.
- SMTP: 25. TCP. Sending email. Modern submission uses 587 (TLS) or 465 (legacy TLS).
- POP3: 110. TCP. Download email; usually removes from server.
- IMAP: 143. TCP. Email stays on server, synced across devices.
- LDAP: 389. Active Directory authentication and directory lookup. 636 is LDAPS (TLS-encrypted).
- NetBIOS / NetBT: 137-139. Legacy Windows networking. Mostly retired but still common in older networks.
- SMB / CIFS: 445. Modern Windows file and printer sharing.
- RDP: 3389. Remote Desktop. Both TCP and UDP for the protocol.
Common gotchas
- DHCP uses UDP. Often confused with TCP. The client does not yet have an IP address when it broadcasts the discover, so a connection-oriented protocol cannot work yet.
- DNS uses UDP normally, TCP for big stuff. Standard A or AAAA lookups happen over UDP because they fit in a single small packet. Zone transfers and DNSSEC larger responses use TCP.
- HTTP vs HTTPS port confusion. 80 vs 443. The TLS layer is what makes HTTPS different, but the underlying transport is still TCP.
- POP3 vs IMAP. POP3 traditionally downloads and removes mail (good for keeping local archives, bad for multi-device sync). IMAP keeps mail on the server (good for multi-device, requires server storage).
- NetBIOS vs SMB confusion. NetBIOS (137-139) is older. SMB/CIFS (445) is the modern Windows file sharing protocol. Firewalls block 445 by default at the edge.
- Telnet is dead. Do not enable it on any modern network. Always use SSH.
- Open FTP at the perimeter. Pure FTP (20/21) sends credentials in plaintext. Use SFTP (port 22) or FTPS instead.
Real-world context
For helpdesk and SMB IT work, the ports you actually look at most:
- 80 and 443. Outbound web. Open by default; firewall blocks targeted to malicious domains.
- 53. DNS. When DNS breaks, everything appears broken even though the underlying network is fine.
- 25, 587, 465. Email server reachability when troubleshooting mail flow.
- 22. SSH for managing Linux servers, network gear, and many cloud resources.
- 3389. RDP for Windows remote management. Usually blocked at the perimeter and accessed via VPN or jump host.
- 445. SMB for file shares. Internal only; never expose to the internet.
- 389 / 636. LDAP for Active Directory work.
For security: legacy plaintext protocols (Telnet 23, FTP 20/21, POP3 110, IMAP 143 without TLS) should be replaced with encrypted equivalents (SSH, SFTP, POP3S 995, IMAPS 993, SMTPS 465 or 587 with STARTTLS). The exam tests the plaintext ports; production should use the secure ones.
Sources
- [CompTIA A+ 220-1201 Exam Objectives Version 4.0, Section 2.1](../../../../../../30-RevyTechJourney/CompTIA%20A%2B%20220-1201%20Exam%20Objectives%20%284.0%29.pdf)
- [IANA: Service Name and Transport Protocol Port Number Registry](https://www.iana.org/assignments/service-names-port-numbers/service-names-port-numbers.xhtml)
- [Wikipedia: List of TCP and UDP port numbers](https://en.wikipedia.org/wiki/List_of_TCP_and_UDP_port_numbers)
- [Wikipedia: Transmission Control Protocol](https://en.wikipedia.org/wiki/Transmission_Control_Protocol)
- [Wikipedia: User Datagram Protocol](https://en.wikipedia.org/wiki/User_Datagram_Protocol)
- [Microsoft Learn: Service overview and network port requirements for Windows](https://learn.microsoft.com/en-us/troubleshoot/windows-server/networking/service-overview-and-network-port-requirements)
