CompTIA A+ ports and protocols
Core 1 wants you to memorize 14 ports: the number, the protocol behind it, whether it runs over TCP or UDP, and what it's used for. They're listed in one table by function, with cleartext ones noted. There's a quiz at the end. Core 2 doesn't have a ports objective, so this list is for 220-1201.
The ports drill is free in the course, along with everything in Domain 1.
Every port on the 220-1201 list
| Port | Protocol | TCP or UDP | What it's for |
|---|---|---|---|
| Web | |||
| 80 | HTTPHypertext Transfer ProtocolCleartext | TCP | Unencrypted web traffic. Anyone on the path can read it, which is why sites redirect to HTTPS. |
| 443 | HTTPSHypertext Transfer Protocol SecureEncrypted | TCP | HTTP encrypted with TLS. The default for web traffic, and the port most firewalls leave open outbound. |
| 25 | SMTPSimple Mail Transfer ProtocolCleartext | TCP | Sends mail from a client to a server and between mail servers. It sends; POP3 and IMAP retrieve. |
| 110 | POP3Post Office Protocol version 3Cleartext | TCP | Downloads mail to one device and usually removes it from the server, so other devices do not see it. |
| 143 | IMAPInternet Message Access ProtocolCleartext | TCP | Leaves mail on the server and keeps folders in sync, which is what a phone plus a laptop needs. |
| File transfer | |||
| 20/21 | FTPFile Transfer ProtocolCleartext | TCP | 21 carries commands and 20 carries data in active mode. Credentials cross in clear text. |
| File and print sharing | |||
| 445 | SMB/CIFSServer Message Block / Common Internet File System | TCP | Windows file and printer sharing and mapped drives. Never expose it to the internet. |
| 137-139 | NetBIOS/NetBTNetwork Basic Input/Output System over TCP/IPCleartext | TCP/UDP | Legacy Windows name service, datagrams and sessions. Older file sharing ran on these before direct SMB on 445. |
| Remote access | |||
| 22 | SSHSecure ShellEncrypted | TCP | Encrypted command-line access to a remote host. Replaces Telnet, and also carries SFTP. |
| 23 | TelnetTelnetCleartext | TCP | Remote command line with everything, passwords included, in clear text. Use SSH instead. |
| 3389 | RDPRemote Desktop ProtocolEncrypted | TCP | The graphical Windows remote desktop. Encrypted, but a common attack target when exposed directly. |
| Name and address services | |||
| 53 | DNSDomain Name System | TCP/UDP | Resolves names to IP addresses. Queries use UDP; zone transfers and large replies use TCP. |
| 67/68 | DHCPDynamic Host Configuration Protocol | UDP | The server listens on 67 and clients on 68. A client with no lease falls back to a 169.254 APIPA address. |
| Directory services | |||
| 389 | LDAPLightweight Directory Access ProtocolCleartext | TCP/UDP | Queries a directory such as Active Directory for users, groups and computers. |
Cleartext protocols and their secure replacements
If a scenario calls for an encrypted connection, look for the secure half of one of these pairs.
| Cleartext | Secure replacement | What changes |
|---|---|---|
| HTTP 80 | HTTPS 443 | Encrypt web traffic with TLS. |
| Telnet 23 | SSH 22 | Replace clear-text remote shells with SSH. |
| FTP 20/21 | SFTP 22 | Move files over SSH instead of clear-text FTP. |
TCP or UDP
TCP sets up a connection first, with a three-way handshake (SYN, SYN-ACK, ACK), then tracks every segment, resends lost ones, and delivers everything in order. UDP skips the handshake and simply sends, with no guarantee that anything arrives. That works for small, quick exchanges like DNS lookups or DHCP requests.
On the A+ list, DHCP is UDP, DNS uses UDP for lookups and TCP for zone transfers and large replies, NetBIOS splits between the two, and LDAP can use either. The rest run over TCP.
Ports that are easy to mix up
- POP3 (110) and IMAP (143) both retrieve mail. POP3 downloads it to one device and usually removes it from the server; IMAP keeps it on the server, in sync across every device. SMTP (25) only sends.
- Telnet (23) and SSH (22) both give you a remote command line. Telnet sends everything in clear text, passwords included; SSH encrypts the whole session.
- RDP (3389) gives you the full Windows desktop of a remote machine, where SSH gives you a command line.
- FTP uses two ports: 21 carries the commands and 20 carries the file data in active mode.
- DHCP's server listens on 67 and the client on 68.
- SMB/CIFS on 445 is how Windows shares files and printers now. NetBIOS on 137 to 139 is the older service that file sharing ran on before SMB moved to 445.
Port number ranges
Well-known ports range from 0 to 1023, and every port on the A+ list except RDP's 3389 falls in that range. Registered ports start at 1024 and go up to 49151, while dynamic or private ports start at 49152 and go up to 65535. When a client makes an outbound connection, it uses a random dynamic port as the source, so firewall rules for a service are set on the destination port.
Quiz yourself on the A+ ports
Ten quick questions on the 14 ports above, or a run through all of them in random order. They ask both ways: the port a protocol uses, and the protocol behind a port.
Questions about the A+ ports
How many ports do I need to know for CompTIA A+?
You need 14, all on Core 1 (220-1201), under objective 2.1: HTTP, HTTPS, SMTP, POP3, IMAP, FTP, SMB/CIFS, NetBIOS/NetBT, SSH, Telnet, RDP, DNS, DHCP and LDAP. Core 2 (220-1202) doesn't have its own ports objective.Is SNMP on the A+ 220-1201 port list?
No. SNMP isn't on the 220-1201 list, so ports 161 and 162 aren't included in the ones Core 1 expects you to know.Which A+ ports use UDP?
DHCP on 67 and 68 uses UDP. DNS on 53 uses UDP for common lookups and switches to TCP for zone transfers and large replies. NetBIOS works on UDP for 137 and 138, and TCP for 139. LDAP on 389 can use either, and everything else on the list runs over TCP.What are the secure versions of the cleartext A+ protocols?
HTTPS on 443 takes over for HTTP on 80, and SSH on 22 replaces Telnet on 23. For moving files, SFTP runs over SSH on port 22 and replaces FTP on 20 and 21.What's the best way to memorize the A+ ports?
Group them by what they do, like email or remote access, to see which numbers go together. Then practice going both ways: the number for a protocol, and the protocol for a number. The quiz here covers both, and APlus Mastery has the same drill free in Core 1.
Learn the rest of Core 1 the same way
Ports are one of the 27 objectives in Core 1, and each has a lesson, a quiz, and practice questions in APlus Mastery. Domain 1 and the ports drill are free.
Keep studying: the free practice exam, PBQ practice, the study plan, and the cheat sheet.