Skip to main content

CompTIA A+View full course outline

Ports and Protocols(OBJ.2.1)

By Jonathon Eades — Founder & IT InstructorUpdated

8 min read

Short answer

Ports and protocols are the rules and logical endpoints that move data between devices: a protocol is a set of rules for communication, and a port, numbered 0 to 65535, tells the operating system which application receives the data. SSH is 22, HTTPS 443, RDP 3389; Telnet 23, FTP 21 and HTTP 80 are unencrypted.

Ports and protocols are one of the most heavily tested memorization topics on the CompTIA A+ Core 1 exam—you'll be expected to match each protocol to its port number and know which ones are secure. Before diving into specific ports, let's establish what we're actually talking about. A protocol is simply a set of rules that governs how data moves between devices. Think of it as a language—without a common protocol, computers can't understand each other.

A port, on the other hand, is a logical endpoint for communication. Ports are numbered from 0 to 65535, and they allow a single computer to handle multiple network connections simultaneously. When data arrives at your computer, the port number tells the operating system which application should receive it.

Port numbers fall into three categories: well-known ports (0-1023) reserved for common services, registered ports (1024-49151) used by specific applications, and dynamic ports (49152-65535) used temporarily by client applications.

Most protocols run over either TCP (Transmission Control Protocol), which guarantees reliable delivery, or UDP (User Datagram Protocol), which prioritizes speed over reliability.

Diagram: a client browser at 198.51.100.7 sends from dynamic port 51544 to server 203.0.113.80 on port 443, HTTPS. The server's other ports are 22 SSH, 25 SMTP, 53 DNS, 80 HTTP and 3389 RDP. Port ranges: well-known 0-1023 for common services, registered 1024-49151 for specific applications, dynamic 49152-65535 for temporary client ports. A protocol is the set of rules; a port is the doorway on the host; most protocols run over TCP for reliable delivery or UDP for speed.
The destination port number tells the server which application gets the data.

File Transfer and Remote Access

FTP: Ports 20-21

The File Transfer Protocol is a veteran of the networking world, and it's unique because it uses two ports. Port 21 handles the control channel—this is where commands like "list directory" or "download file" are sent. Port 20 handles the actual data transfer in active mode.

Here's the critical thing to remember: FTP sends everything in plain text, including your username and password. Anyone sniffing network traffic can see your credentials. For this reason, secure alternatives like SFTP (which runs over SSH on port 22) are strongly preferred for anything sensitive.

SSH: Port 22

Secure Shell revolutionized remote administration when it arrived. SSH encrypts everything—your commands, the responses, and any files you transfer. It's the gold standard for remote server management.

Beyond simple terminal access, SSH enables secure file transfers through SFTP and SCP, and it can create encrypted tunnels for other protocols. If you need to access a remote Linux server or network device, SSH is almost certainly what you'll use.

Telnet: Port 23

Telnet does essentially the same thing as SSH—it provides remote terminal access. The critical difference? Telnet has zero encryption. Everything travels in plain text, making it trivially easy for attackers to capture credentials.

You should never use Telnet in production. It exists today mainly for testing connectivity to specific ports or configuring ancient equipment that doesn't support SSH. On the exam, remember that Telnet is the insecure predecessor that SSH replaced.

RDP: Port 3389

Remote Desktop Protocol is Microsoft's solution for graphical remote access. Unlike SSH, which gives you a command line, RDP delivers a full desktop experience—you see the remote computer's screen and can interact with it using your mouse and keyboard.

RDP supports features like clipboard sharing, printer redirection, and multi-monitor setups. However, exposing RDP directly to the internet is dangerous. Attackers constantly scan for open RDP ports. Best practice is to access RDP through a VPN and enable Network Level Authentication.

Email Protocols

Email relies on multiple protocols working together—one for sending and others for receiving.

SMTP: Port 25

Simple Mail Transfer Protocol handles outgoing mail. When you hit "send," your email client connects to an SMTP server, which then relays your message toward its destination.

Port 25 is the traditional SMTP port, but many ISPs block it to combat spam. You'll often see port 587 used for authenticated email submission or port 465 for SMTP over SSL. Remember: SMTP only sends mail. It doesn't retrieve it.

POP3: Port 110

Post Office Protocol version 3 retrieves email by downloading messages to your device. Traditionally, POP3 deletes messages from the server after download, though this behavior can be configured.

POP3 works well if you only access email from one device. The downside is that your email exists only on that device—lose the device, lose the email. There's no synchronization across multiple devices.

For encrypted connections, POP3S uses port 995.

IMAP: Port 143

Internet Mail Access Protocol takes a different approach. Instead of downloading and deleting, IMAP keeps your email on the server and synchronizes across all your devices. Read an email on your phone, and it's marked as read on your laptop too.

IMAP is the standard for modern email usage where people access their accounts from phones, tablets, and computers. The trade-off is that it requires more server storage and an internet connection to access your full email history.

IMAPS (encrypted IMAP) uses port 993.

Web Traffic

HTTP: Port 80

Hypertext Transfer Protocol is the foundation of the web. Every time you visit a website, HTTP requests fly back and forth between your browser and the web server.

The problem with HTTP is that it's completely unencrypted. Anyone on the network can see exactly what you're doing—what pages you're visiting, what forms you're submitting, what data you're entering. Modern browsers now flag HTTP sites as "Not Secure" for good reason.

HTTPS: Port 443

HTTPS adds encryption to HTTP using SSL/TLS. That padlock icon in your browser's address bar means HTTPS is protecting your connection. The server's identity is verified through a certificate, and all data is encrypted in transit.

HTTPS has become the default for the web. Search engines prioritize secure sites, browsers warn users about insecure connections, and many sites now redirect HTTP requests to HTTPS automatically.

Network Infrastructure

DNS: Port 53

The Domain Name System translates human-friendly domain names into IP addresses.

This lesson is part of ExamWizardz Pro

Unlock every lesson, unlimited practice tests, and the AI tutor.

See Pro pricing

or start with a free account

Test yourself on this topic: free TCP, UDP, Ports, and Protocols practice questions — no account needed.

Key terms in this lesson