Networking · Topic 2 of 10
Common Ports and Protocols
Memorise the well known TCP and UDP ports for file transfer, remote access, email, names, web, directory and management, with secure and clear text pairs.
- 4 min
- FTP uses 20 and 21; SSH and SFTP use 22; Telnet uses 23.
- SMTP uses 25, with 587 for encrypted submission; POP3 uses 110; IMAP uses 143.
- DNS uses 53; DHCP uses 67 and 68; NTP uses 123.
What it is
Each common network service listens on a standard port number. Knowing the number lets you read firewall rules, open the right ports and tell which service is failing.
The exam asks you to match a port to its protocol, its transport (Transmission Control Protocol, TCP, or User Datagram Protocol, UDP) and its purpose.
How it works
Group the ports by job, then learn the secure and insecure pairs. A pair means the same job done with and without encryption.
Remote access and file transfer
| Port | Protocol | Transport | Purpose |
|---|---|---|---|
| 20 and 21 | File Transfer Protocol (FTP) | TCP | File transfer; 21 for control, 20 for data in active mode |
| 22 | Secure Shell (SSH) | TCP | Encrypted remote login; also used by Secure File Transfer Protocol (SFTP) |
| 23 | Telnet | TCP | Clear text remote login |
| 69 | Trivial File Transfer Protocol (TFTP) | UDP | Simple file transfer with no login |
| 3389 | Remote Desktop Protocol (RDP) | TCP | Graphical remote desktop |
Telnet and FTP send everything, even passwords, in clear text. SSH and SFTP are the secure replacements.
| Port | Protocol | Transport | Purpose |
|---|---|---|---|
| 25 | Simple Mail Transfer Protocol (SMTP) | TCP | Sending mail between servers |
| 587 | SMTP submission with encryption | TCP | Clients sending mail to a server |
| 110 | Post Office Protocol 3 (POP3) | TCP | Download mail |
| 995 | POP3 over Transport Layer Security (TLS) | TCP | Secure download |
| 143 | Internet Message Access Protocol (IMAP) | TCP | Read mail kept on the server |
| 993 | IMAP over TLS | TCP | Secure IMAP |
TLS is the encryption method that protects these secure connections.
Name and address services
| Port | Protocol | Transport | Purpose |
|---|---|---|---|
| 53 | Domain Name System (DNS) | UDP and TCP | Turns names into addresses |
| 67 and 68 | Dynamic Host Configuration Protocol (DHCP) | UDP | Hands out addresses; 67 server, 68 client |
| 123 | Network Time Protocol (NTP) | UDP | Clock synchronisation |
Web and directory
| Port | Protocol | Transport | Purpose |
|---|---|---|---|
| 80 | Hypertext Transfer Protocol (HTTP) | TCP | Web pages in clear text |
| 443 | HTTP Secure (HTTPS) | TCP | Encrypted web traffic |
| 389 | Lightweight Directory Access Protocol (LDAP) | TCP and UDP | Directory lookups and logins |
| 636 | LDAP over TLS | TCP | Secure directory access |
Windows sharing and management
| Port | Protocol | Transport | Purpose |
|---|---|---|---|
| 137 to 139 | Network Basic Input/Output System (NetBIOS) over Transmission Control Protocol and Internet Protocol (NetBT) | UDP and TCP | Older Windows name and file sharing |
| 445 | Server Message Block (SMB) | TCP | Windows file and printer sharing |
| 161 and 162 | Simple Network Management Protocol (SNMP) | UDP | Monitoring devices; 162 for alert messages (traps) |
| 514 | Syslog | UDP | Central log messages |
NetBIOS is an older name service, and the exam usually lists it as ports 137 to 139. SMB on port 445 is the modern way to share files and printers on Windows.
Reading a scenario
If users can browse by secure web but not read mail, look at the mail ports, not the web port. If a remote login works with SSH but not Telnet, the firewall or server may block clear text on purpose.
Learn each port as a pair of facts, the number and the secure or clear text nature. Most questions ask which of two ports is encrypted.
What to remember for the exam
- FTP uses 20 and 21; SSH and SFTP use 22; Telnet uses 23.
- SMTP uses 25, with 587 for encrypted submission; POP3 uses 110; IMAP uses 143.
- DNS uses 53; DHCP uses 67 and 68; NTP uses 123.
- HTTP uses 80 and HTTPS uses 443.
- LDAP uses 389, and its secure form uses 636.
- SMB uses 445; NetBIOS uses 137 to 139; RDP uses 3389.
- SNMP uses 161, with 162 for alerts.
- TFTP uses UDP 69 and has no login.
Common mistakes
Mixing up the secure and clear text pairs. HTTP, Telnet, FTP, POP3 and IMAP at their basic ports send data without encryption.
Swapping DHCP ports. The server listens on 67 and the client uses 68.
Treating Telnet as a safe option. It sends passwords in the clear, so SSH replaces it.
Forgetting that SFTP rides on SSH. It does not need its own port, because it uses port 22.
Confusing SMTP with mail retrieval. SMTP sends mail; POP3 and IMAP retrieve it.
Check yourself
Which port does HTTPS use?
TCP port 443.
Which two ports does DHCP use, and which side uses each?
UDP 67 for the server and UDP 68 for the client.
Which protocol replaces Telnet with encryption?
Secure Shell (SSH) on port 22.
Topic 2 of 10 in Networking
Test yourself on Networking
The full CompTIA A+ 220-1201 question bank has 856 questions, with timed practice exams and an explanation for every answer.
This study guide is independent and is not affiliated with, endorsed by, or sponsored by CompTIA. Vendor names, certification names and exam codes are trademarks of their respective owners and are used for identification only.