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
In a nutshell
  • 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.

Clientany dynamic portport 443Web serversecure web serviceClientport 22Serversecure remote login

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

PortProtocolTransportPurpose
20 and 21File Transfer Protocol (FTP)TCPFile transfer; 21 for control, 20 for data in active mode
22Secure Shell (SSH)TCPEncrypted remote login; also used by Secure File Transfer Protocol (SFTP)
23TelnetTCPClear text remote login
69Trivial File Transfer Protocol (TFTP)UDPSimple file transfer with no login
3389Remote Desktop Protocol (RDP)TCPGraphical remote desktop

Telnet and FTP send everything, even passwords, in clear text. SSH and SFTP are the secure replacements.

Email

PortProtocolTransportPurpose
25Simple Mail Transfer Protocol (SMTP)TCPSending mail between servers
587SMTP submission with encryptionTCPClients sending mail to a server
110Post Office Protocol 3 (POP3)TCPDownload mail
995POP3 over Transport Layer Security (TLS)TCPSecure download
143Internet Message Access Protocol (IMAP)TCPRead mail kept on the server
993IMAP over TLSTCPSecure IMAP

TLS is the encryption method that protects these secure connections.

Name and address services

PortProtocolTransportPurpose
53Domain Name System (DNS)UDP and TCPTurns names into addresses
67 and 68Dynamic Host Configuration Protocol (DHCP)UDPHands out addresses; 67 server, 68 client
123Network Time Protocol (NTP)UDPClock synchronisation

Web and directory

PortProtocolTransportPurpose
80Hypertext Transfer Protocol (HTTP)TCPWeb pages in clear text
443HTTP Secure (HTTPS)TCPEncrypted web traffic
389Lightweight Directory Access Protocol (LDAP)TCP and UDPDirectory lookups and logins
636LDAP over TLSTCPSecure directory access

Windows sharing and management

PortProtocolTransportPurpose
137 to 139Network Basic Input/Output System (NetBIOS) over Transmission Control Protocol and Internet Protocol (NetBT)UDP and TCPOlder Windows name and file sharing
445Server Message Block (SMB)TCPWindows file and printer sharing
161 and 162Simple Network Management Protocol (SNMP)UDPMonitoring devices; 162 for alert messages (traps)
514SyslogUDPCentral 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

Problemcannot reach web pagecheckPort443 or 80checkFirewallrule for that port

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.

Exam tip

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.