What each port on the CompTIA Network+ exam actually does, how its traffic flows, and whether anyone listening in could read it. Every protocol has a diagram, a real example and an exam tip. When you're ready, test yourself with the ports flashcards.
How browsers and web servers talk. HTTPS adds encryption, plus a certificate that proves the site is genuine.
HTTP
Hypertext Transfer ProtocolNetwork+
Port 80TCPNot encrypted
What it's forThe language browsers and web servers use to request and send pages, images and data. Nothing is encrypted, so anyone on the path can read it or even change it. Today almost every site redirects HTTP to HTTPS.
Real exampleA page loaded over http:// shows "Not secure" in the browser's address bar.
Exam tip: Port 80 means unencrypted web traffic. Any question about securing a website points to HTTPS on 443.
What it's forHTTP wrapped in TLS encryption. Before anything is sent, the browser checks the site's certificate to confirm it's really talking to that site. After that, pages, passwords and cookies are all encrypted.
Real exampleOnline banking loads over https://, so nobody else on the network can read your account details.
Exam tip: Port 443 means HTTPS. TLS does the encrypting; the certificate proves the server's identity.
Sending mail (SMTP and SMTPS) and collecting it (POP3 and IMAP). Every mail protocol has a plain original and a secure version.
SMTP
Simple Mail Transfer ProtocolNetwork+
Port 25TCPEncryption optional
What it's forHow mail servers hand email to each other across the internet. When you send a message, your provider's server looks up the recipient's mail server in DNS and delivers the message to it over SMTP on port 25. Servers often upgrade the connection to an encrypted one with STARTTLS when both sides support it.
Real exampleGmail's mail servers deliver your message to the recipient's mail server over port 25.
Exam tip: SMTP only sends mail. Getting mail into your app is POP3 or IMAP.
What it's forThe port your email app uses to hand a new message to your own mail server. You log in, the connection is encrypted with STARTTLS, and your server then delivers the message onward using SMTP. Network+ calls this SMTPS; port 465 (SMTP over TLS from the first byte) is also used.
Real exampleA mail app such as Thunderbird sends mail through smtp.gmail.com on port 587.
Exam tip: An email app sending mail securely uses 587. Server-to-server delivery uses 25.
What it's forAn older way to collect mail: your app downloads new messages from the server and usually deletes them there, so each message ends up on one device only. Handy when mailboxes were small; confusing when you own a phone and a laptop.
Real exampleAn old email app downloads all new mail to one PC and deletes it from the server.
Exam tip: POP3 means download and delete, one device. IMAP means mail stays on the server, synced everywhere.
What it's forYour mail stays on the server and every device looks at the same mailbox. Read, flagged, deleted and sorted messages stay in sync across your phone, laptop and webmail.
Real exampleReading a message on your phone marks it as read on your laptop too, because both use IMAP.
Exam tip: IMAP keeps mail on the server and in sync. POP3 downloads it to one device.
Sam sends a message from a phone; Alex reads it on theirs. Three protocols, three ports.
POP3 / POP3S
IMAP / IMAPS
Ports
110 / 995
143 / 993
Where mail lives
Downloaded to one device
Stays on the server
Several devices
Out of sync
In sync
Used today
Rarely
Almost always (IMAPS)
File transfer
Moving files between machines, from the ancient but still-around FTP to everyday Windows file sharing.
FTP
File Transfer ProtocolNetwork+
Ports 20/21TCPNot encrypted
What it's forOne of the oldest internet protocols. It uses two separate connections: port 21 for commands such as logging in and listing files, and port 20 for the file data itself (in active mode). Usernames, passwords and files all travel unencrypted.
Real exampleA web designer uploads site files to an old hosting server with FileZilla, connecting on port 21.
Exam tip: FTP uses two connections: 21 for control, 20 for data.
What it's forFile transfer that runs inside an SSH connection, so it uses SSH's port 22 and SSH's encryption. Its official name is the SSH File Transfer Protocol. Despite the name, it isn't FTP with encryption added; it's a separate protocol that does the same job.
Real exampleA developer copies a backup to a Linux server with sftp user@server, which travels inside SSH.
Exam tip: SFTP shares port 22 with SSH. Don't confuse it with FTPS, which is FTP with TLS added.
What it's forA stripped-down file transfer with no login and no folder browsing, running over UDP. Network devices use it to load configurations and firmware, often while booting. Because anyone can use it, it should never be reachable from untrusted networks.
Real exampleA Cisco switch pulls a new firmware image from a TFTP server with copy tftp: flash:.
Exam tip: TFTP is UDP 69 with no authentication. FTP is TCP 20/21 with a login.
What it's forHow Windows computers share files and printers. Mapped network drives and paths like \\server\share use SMB. Modern SMB 3 can encrypt its traffic, and port 445 should never be open to the internet: several major worms spread through it.
Real exampleA Windows PC opens \\fileserver\shared to reach the team's shared network drive.
Exam tip: Windows file sharing means SMB on 445. Older NetBIOS-based sharing used 137 to 139.
Controlling another computer or network device from where you're sitting: a command line (SSH, Telnet) or a full desktop (RDP).
SSH
Secure ShellNetwork+
Port 22TCPEncrypted
What it's forLogging in to a server, router or switch and typing commands on it, as if you were sitting in front of it. Everything is encrypted, including your password, so it's safe to use across any network. SSH also carries SFTP file transfers and can tunnel other traffic.
Real exampleAn admin runs ssh admin@192.168.1.1 to configure a router from the command line.
Exam tip: "Secure remote command-line access" or "secure replacement for Telnet" means SSH on port 22.
What it's forThe original way to get a command line on a remote device. It does the same job as SSH, but sends everything as plain text: your username, your password and every command. You'll still meet it on old equipment and in lab environments.
Real exampleAn old switch is managed with telnet 10.0.0.5, so anyone capturing the traffic can read the password.
Exam tip: If a question asks which remote access protocol is insecure or sends credentials in clear text, the answer is Telnet. The fix is always SSH.
What it's forUsing a Windows computer's full graphical desktop from somewhere else. Your keystrokes and mouse movements travel to the remote machine, and pictures of its screen travel back. The connection is encrypted, but port 3389 left open to the internet is a favourite target for attackers, so it's usually reached through a VPN.
Real exampleA helpdesk tech opens Remote Desktop Connection (mstsc) to work on a Windows server's desktop.
Exam tip: "Remote graphical access to a Windows machine" means RDP on 3389. Command line only? That's SSH.
The behind-the-scenes services every device needs: an IP address (DHCP), names turned into addresses (DNS, NetBIOS) and the right time (NTP).
DNS
Domain Name SystemNetwork+
Port 53TCP and UDPNot encrypted
What it's forThe internet's phone book. Your device asks a DNS server for the IP address behind a name like example.com, then connects to that address. Normal lookups use UDP; zone transfers between DNS servers and very large answers use TCP. Standard DNS isn't encrypted, which DNS over HTTPS and DNS over TLS (port 853) fix.
Real exampleTyping example.com in a browser sends a DNS query that comes back with the site's IP address.
Exam tip: DNS is one of the few protocols on the list that uses both TCP and UDP, both on port 53.
What it's forHands out network settings automatically when a device joins: an IP address, subnet mask, default gateway and DNS servers. The exchange has four steps, remembered as DORA: Discover, Offer, Request, Acknowledge.
Real exampleA laptop joins the office Wi-Fi and automatically receives its IP address, gateway and DNS server.
Exam tip: The DHCP server listens on 67 and the client on 68. Remember DORA.
What it's forKeeps clocks in sync across a network, usually to within a few milliseconds on a local network. Accurate time matters more than it sounds: log timestamps, Kerberos logins and certificate checks all depend on it.
Real exampleEvery router and server syncs its clock to pool.ntp.org, so log timestamps line up across devices.
Exam tip: NTP is UDP 123. Kerberos logins fail if clocks drift more than 5 minutes apart.
What it's forAn older Windows system for naming computers on a local network and talking to them: 137 for names, 138 for datagrams, 139 for sessions. Modern Windows uses DNS and SMB on 445 instead, but NetBIOS still turns up on older networks.
Real exampleAn older Windows PC finds another computer on the LAN by its name, such as OFFICE-PC.
Exam tip: 137 to 139 means NetBIOS. Security scans often flag these ports as unnecessary.
Three protocols from different groups, working in order every time you connect.
DHCP, UDP 67/68. Your laptop joins the Wi-Fi and receives an IP address, gateway and DNS server.
DNS, port 53. You type example.com and DNS turns it into an IP address.
HTTPS, TCP 443. Your browser connects to that address and loads the page, encrypted.
Monitoring and logs
Keeping an eye on the network: reading device health (SNMP) and gathering logs in one place (Syslog).
SNMP
Simple Network Management ProtocolNetwork+
Ports 161/162UDPEncrypted only in v3
What it's forLets a monitoring system read information from network devices, such as traffic counters, CPU load and interface status. The manager polls devices on 161; devices send urgent alerts, called traps, to the manager on 162. Versions 1 and 2c use a plain-text "community string" as a password; SNMPv3 adds real authentication and encryption.
Real exampleA monitoring tool polls a switch on 161 for traffic counts, and the switch sends a trap to 162 when a link goes down.
Exam tip: Polls go to 161 and traps come back on 162. Secure SNMP means SNMPv3.
What it's forThe standard way for devices to send log messages to a central log server, often part of a SIEM. Each message carries a severity from 0 (emergency) to 7 (debug), so the important ones stand out.
Real exampleA firewall sends a message about every blocked connection to a central log server for later review.
Exam tip: Syslog is UDP 514. Remember the scale: 0 is the most severe, 7 is debug.
Checking who you are and what you're allowed to do: directories (LDAP), Windows domain logins (Kerberos) and central AAA servers (RADIUS, TACACS+).
LDAP
Lightweight Directory Access ProtocolNetwork+
Port 389TCP (UDP also possible)Not encrypted
What it's forA standard way to ask a directory questions. A directory is the central database of users, groups and computers, such as Microsoft Active Directory. Apps use LDAP to check logins and to see who belongs to which group. On its own it isn't encrypted; it can be upgraded with StartTLS, or replaced by LDAPS.
Real exampleA web app checks a user's password and group membership against Active Directory before letting them in.
Exam tip: LDAP is 389 and LDAPS is 636. Active Directory speaks LDAP.
What it's forLDAP inside a TLS-encrypted connection, so usernames, passwords and directory data can't be read in transit. The name says SSL for historical reasons; modern servers use TLS.
Real exampleA VPN appliance checks staff logins against Active Directory over an encrypted LDAPS connection.
Exam tip: LDAPS is 636, the secure version of LDAP on 389.
What it's forThe login system behind Windows domains. You prove who you are once to the domain controller and receive a ticket. You then show tickets to reach file servers and other services, so your password never has to travel to them.
Real exampleLogging in to a domain-joined Windows PC gets you a Kerberos ticket from the domain controller.
Exam tip: Kerberos uses tickets on port 88 and needs clocks in sync, which is NTP's job.
Remote Authentication Dial-In User ServiceBeyond Network+
Ports 1812/1813UDPEncrypts passwords only
What it's forCentral authentication, authorization and accounting (AAA) for network access. A Wi-Fi access point or VPN gateway passes your login to the RADIUS server, which says yes or no and keeps a record of the session. Only the password is encrypted.
Real exampleJoining company Wi-Fi with your work username (WPA2-Enterprise) sends your login to a RADIUS server.
Exam tip: RADIUS: UDP, network access, encrypts only the password. TACACS+: TCP, device administration, encrypts the entire payload.
Terminal Access Controller Access-Control System PlusBeyond Network+
Port 49TCPEncrypted
What it's forAAA for administrators logging in to routers, switches and firewalls. It handles authentication and authorization separately, so it can control exactly which commands each admin may run, and it encrypts the entire payload of every packet, not just the password. It was developed by Cisco.
Real exampleAn engineer logs in to a Cisco router, and the router asks a TACACS+ server which commands they're allowed to run.
Exam tip: TACACS+ is TCP 49, used for device administration, and encrypts the entire payload.
Both are central AAA servers, and a favourite exam comparison.
RADIUS
TACACS+
Ports
UDP 1812, 1813
TCP 49
Main use
Network access (Wi-Fi, VPN)
Admin logins to devices
Encryption
Password only
Entire payload
Authentication and authorization
Combined
Separate
Origin
Open standard
Cisco
Voice
Setting up phone and video calls over the network.
SIP
Session Initiation ProtocolNetwork+
Ports 5060/5061TCP and UDPEncrypted on 5061
What it's forSets up, manages and ends voice and video calls; it's the "dialling" part of VoIP. The voice itself travels separately, usually over RTP. SIP uses 5060 without encryption and 5061 with TLS.
Real exampleAn office desk phone registers with the company's VoIP system and uses SIP to set up each call.
Exam tip: SIP signals the call on 5060/5061; RTP carries the audio.
Databases
Database servers that apps connect to. These ports should never face the internet.
SQL Server
Microsoft SQL ServerNetwork+
Port 1433TCPEncryption optional
What it's forMicrosoft's database server. Apps connect on 1433 to read and write data. The database should sit behind a firewall that lets in only the app servers that need it.
Real exampleA company's accounting app reads and writes its data on a Microsoft SQL Server database on 1433.
Exam tip: 1433 is Microsoft SQL Server; 3306 is MySQL.
What it's forA popular open-source database, used by WordPress and countless other web apps. Like any database port, 3306 should only be reachable from the servers that need it.
Real exampleA WordPress site stores its posts and user accounts in a MySQL database on port 3306.
Exam tip: 3306 is MySQL; 1433 is Microsoft SQL Server.
Setting up VPN tunnels between sites or from home (IKE, L2TP), and exchanging routes between the networks that make up the internet (BGP).
IKE
Internet Key ExchangeBeyond Network+
Port 500UDPEncrypted
What it's forThe first step of an IPsec VPN: the two ends prove who they are and agree on encryption keys. After that, the actual data travels through the encrypted IPsec tunnel. If NAT is in the way, IKE switches to UDP 4500.
Real exampleBefore a site-to-site VPN carries any traffic, the two firewalls use IKE to agree on encryption keys.
Exam tip: Setting up IPsec means IKE on UDP 500, or 4500 through NAT.
What it's forBuilds a VPN tunnel but provides no encryption of its own, so it's almost always paired with IPsec, written L2TP/IPsec. IPsec does the encrypting; L2TP does the tunnelling.
Real exampleA Windows laptop connects to the office with the built-in L2TP/IPsec VPN option.
Exam tip: L2TP is UDP 1701 and relies on IPsec for encryption.
What it's forThe routing protocol of the internet. Internet providers, cloud companies and large organisations each run a network called an autonomous system, and use BGP to tell each other which blocks of IP addresses they can reach, so traffic can find its way across the world.
Real exampleAn internet provider uses BGP to tell the rest of the internet which IP address blocks it can reach.
Exam tip: BGP is TCP 179 and routes between organisations: it's the exterior gateway protocol.
Patterns worth remembering
The low 20s hold the classics: 20/21 FTP, 22 SSH, 23 Telnet, 25 SMTP.
Secure mail lives in the 990s: 993 IMAPS and 995 POP3S.
Pairs that come as a set: 20/21 FTP, 67/68 DHCP, 161/162 SNMP, 1812/1813 RADIUS, 5060/5061 SIP.
The UDP crowd: DHCP, TFTP, NTP, SNMP, Syslog, RADIUS, IKE and L2TP use UDP. DNS, Kerberos, SIP and NetBIOS use both.
Secure versions: Telnet to SSH, HTTP to HTTPS, FTP to SFTP, LDAP to LDAPS, POP3 to POP3S, IMAP to IMAPS, SNMP to SNMPv3.