Common port numbers for CompTIA A+
CompTIA A+ Core 1 (220-1201) lists 14 protocols with their port numbers in objective 2.1, from FTP on 20-21 to RDP on 3389, and expects you to know whether each one runs over TCP or UDP. All 14 are in the first table below with what each one does, followed by ways to remember them and free practice.
Every port in the A+ 220-1201 objectives
| Port | Protocol | TCP/UDP | What it does |
|---|---|---|---|
| 20-21 | FTP | TCP | File Transfer Protocol: moves files between computers. Port 21 carries the commands, port 20 the data. Unencrypted. |
| 22 | SSH | TCP | Secure Shell: encrypted remote command-line access. SFTP file transfers run over it too. |
| 23 | Telnet | TCP | Unencrypted remote command-line access, replaced by SSH. |
| 25 | SMTP | TCP | Simple Mail Transfer Protocol: sends email from a client to a mail server and between mail servers. |
| 53 | DNS | UDP (TCP for zone transfers and large replies) | Domain Name System: turns names like www.example.com into IP addresses. |
| 67/68 | DHCP | UDP | Dynamic Host Configuration Protocol: gives clients an IP address, subnet mask, gateway and DNS server. Servers listen on 67, clients on 68. |
| 80 | HTTP | TCP | Hypertext Transfer Protocol: unencrypted web traffic. |
| 110 | POP3 | TCP | Post Office Protocol 3: downloads email from the server to one device, usually deleting the server copy. |
| 137-139 | NetBIOS/NetBT | UDP 137-138, TCP 139 | NetBIOS over TCP/IP: older Windows name lookup (137), datagrams (138) and file-sharing sessions (139). |
| 143 | IMAP | TCP | Internet Message Access Protocol: reads email that stays on the server, kept in sync across devices. |
| 389 | LDAP | TCP | Lightweight Directory Access Protocol: looks up and updates users, groups and computers in a directory such as Active Directory. |
| 443 | HTTPS | TCP | HTTP Secure: web traffic encrypted with TLS. |
| 445 | SMB/CIFS | TCP | Server Message Block (CIFS is an older dialect of it): Windows file and printer sharing, run directly over TCP. |
| 3389 | RDP | TCP (newer clients also use UDP) | Remote Desktop Protocol: a full graphical Windows desktop over the network. |
TCP vs UDP
Objective 2.1 also tests the two transport protocols themselves. TCP (Transmission Control Protocol) is connection-oriented: it opens a session with a three-way handshake, numbers every segment and resends anything lost, so data arrives complete and in order. UDP (User Datagram Protocol) is connectionless: it sends each datagram with no handshake and no delivery check, which makes it faster and lighter but leaves lost data for the application to deal with.
- TCP: FTP, SSH, Telnet, SMTP, HTTP, POP3, IMAP, LDAP, HTTPS, SMB and RDP. Anything that has to arrive complete, like a file, an email or a web page, uses TCP.
- UDP: DHCP and DNS lookups. DHCP has to use UDP: a computer with no IP address yet can't open a TCP connection, so it broadcasts. A DNS lookup is one short question and answer, so a lost packet is simply asked again.
- Both: DNS switches to TCP for zone transfers between servers and for replies too big for UDP. NetBIOS uses UDP 137 and 138 for names and datagrams and TCP 139 for sessions. Newer Remote Desktop clients add UDP 3389 alongside TCP for smoother video.
On the exam, a protocol that needs a reliable session (logins, files, mail, web pages, directory queries like LDAP) is TCP; DHCP's broadcasts and quick DNS lookups are UDP.
Secure and insecure pairs
Several protocols on the list send everything, passwords included, as plain text. Scenario questions often ask for the secure replacement:
- Telnet (23) to SSH (22). Both give remote command-line access; SSH encrypts the session.
- HTTP (80) to HTTPS (443). HTTPS is HTTP inside TLS encryption.
- FTP (20-21) to SFTP (22). SFTP moves files over an SSH connection, so it uses SSH's port.
- LDAP (389) to LDAPS (636). LDAPS wraps directory lookups in TLS.
- POP3 (110) and IMAP (143) to POP3S (995) and IMAPS (993). The TLS versions of the two mail-reading protocols.
- NetBIOS (137-139) to SMB on 445. Not an encryption swap: modern Windows runs SMB straight over TCP 445 without NetBIOS, so 137-139 mostly serve older systems.
SFTP shares SSH's port 22, which is on the list. LDAPS, POP3S and IMAPS aren't on the 220-1201 port list; their numbers are in the other-ports table below.
Group the ports to remember them
Holding 14 unrelated numbers in your head is hard. Grouped by job, they become six short lists:
- Email: SMTP 25 sends mail. POP3 110 and IMAP 143 receive it: POP3 downloads it to one device, IMAP keeps it on the server and syncs every device.
- Web: HTTP 80, and HTTPS 443 for encrypted pages.
- Remote access: SSH 22 and Telnet 23 sit side by side (the secure one comes first), and RDP 3389 gives you a full Windows desktop.
- File transfer: FTP 20-21. Port 21 carries the commands, port 20 the data.
- Windows file sharing: NetBIOS 137-139 for older systems, SMB 445 for modern ones.
- Network services: DNS 53 turns names into addresses, DHCP 67/68 hands addresses out, and LDAP 389 looks up users and computers in a directory.
Drill them in both directions, number to protocol and protocol to number, because the exam asks both ways.
Other ports you'll see (not on the A+ list)
These ports aren't on the 220-1201 port list, so learn them after the ones above. CompTIA says its objective lists aren't exhaustive, though, and you'll meet these on the job and on many port charts. NTP and Syslog do appear in the objectives as server roles, just without their ports. Port numbers are from IANA's official port registry.
| Port | Protocol | TCP/UDP | What it does |
|---|---|---|---|
| 69 | TFTP | UDP | Trivial File Transfer Protocol: simple file transfer with no login, used for network boot and device configuration files. |
| 123 | NTP | UDP | Network Time Protocol: keeps computer and device clocks in sync. |
| 161/162 | SNMP | UDP | Simple Network Management Protocol: monitors and manages network devices. Alerts (traps) arrive on 162. |
| 514 | Syslog | UDP | Sends log messages from devices and servers to a central log server. |
| 636 | LDAPS | TCP | LDAP over TLS: encrypted directory lookups. |
| 993 | IMAPS | TCP | IMAP over TLS: encrypted email reading. |
| 995 | POP3S | TCP | POP3 over TLS: encrypted email download. |
Practice the ports
- Free port-matching PBQ: Match Ports to Protocols is a free performance-based question from Core 1. Match each protocol to its port; it's graded instantly and needs no account.
- Free practice questions: the TCP, UDP, ports and protocols section of the free Core 1 practice test, each question with a full explanation.
- Flashcards: ports are a textbook case for spaced repetition. The A+ flashcards guide covers what to card and a daily routine that sticks.
- The rest of Core 1: ports are one objective in 2.0 Networking. The Core 1 study guide walks all five domains.
- Everything else to memorize: the A+ cheat sheet puts these ports on one printable page with Wi-Fi standards, cables, RAID, commands and other key lists from both cores.