Ports and protocols

2.1 Compare and contrast TCP and UDP ports, protocols, and their purposes

📘CompTIA A+ Core 1 (220-1201)


In networking, ports are like numbered doors on a computer or server. Applications use these doors to communicate over the network. Each protocol defines how data is sent through those doors. Some use TCP (Transmission Control Protocol) for reliable, ordered communication, while others use UDP (User Datagram Protocol) for faster, less reliable communication.

Here’s a breakdown of the most common ports and protocols you need to know for the exam:


1. 20-21 – FTP (File Transfer Protocol)

  • Port 20: Data transfer
  • Port 21: Control (commands like login, navigation)
  • Protocol Type: TCP
  • Purpose: FTP is used to transfer files between computers on a network.
  • Use in IT: System admins upload software updates to servers or download logs from remote devices.

2. 22 – SSH (Secure Shell)

  • Port: 22
  • Protocol Type: TCP
  • Purpose: Securely access and manage remote computers.
  • Use in IT: Admins use SSH to log into a Linux server and run commands securely. Unlike Telnet, SSH encrypts the data so it cannot be easily intercepted.

3. 23 – Telnet

  • Port: 23
  • Protocol Type: TCP
  • Purpose: Remote command-line access.
  • Use in IT: Telnet can connect to network devices, like switches or routers, but it’s not secure because data, including passwords, is sent in plain text.

4. 25 – SMTP (Simple Mail Transfer Protocol)

  • Port: 25
  • Protocol Type: TCP
  • Purpose: Sending email between servers.
  • Use in IT: Mail servers use SMTP to route outgoing email from a company to another email server.

5. 53 – DNS (Domain Name System)

  • Port: 53
  • Protocol Type: TCP/UDP (mostly UDP for queries, TCP for zone transfers)
  • Purpose: Converts human-readable domain names (like example.com) into IP addresses.
  • Use in IT: Computers use DNS to find web servers. Without DNS, users would have to type IP addresses instead of URLs.

6. 67/68 – DHCP (Dynamic Host Configuration Protocol)

  • Port 67: Server
  • Port 68: Client
  • Protocol Type: UDP
  • Purpose: Automatically assigns IP addresses to devices on a network.
  • Use in IT: When a laptop joins a network, DHCP provides it with an IP address, subnet mask, gateway, and DNS info.

7. 80 – HTTP (Hypertext Transfer Protocol)

  • Port: 80
  • Protocol Type: TCP
  • Purpose: Transfers web pages (non-secure) over the internet.
  • Use in IT: Web browsers request pages from servers over HTTP. If a website doesn’t use HTTPS, the traffic is not encrypted.

8. 110 – POP3 (Post Office Protocol 3)

  • Port: 110
  • Protocol Type: TCP
  • Purpose: Downloads email from a server to a local device.
  • Use in IT: POP3 stores emails locally on a device and deletes them from the server (unless configured otherwise).

9. 143 – IMAP (Internet Mail Access Protocol)

  • Port: 143
  • Protocol Type: TCP
  • Purpose: Accesses email on a server without downloading it permanently.
  • Use in IT: Users can read email on multiple devices, and the server keeps the messages synced.

10. 137-139 – NetBIOS/NetBT

  • Ports: 137 (Name service), 138 (Datagram service), 139 (Session service)
  • Protocol Type: TCP/UDP
  • Purpose: Older Windows network communication for sharing files, printers, and network browsing.
  • Use in IT: Legacy networks use NetBIOS over TCP/IP to allow Windows devices to find each other and share resources.

11. 389 – LDAP (Lightweight Directory Access Protocol)

  • Port: 389
  • Protocol Type: TCP/UDP
  • Purpose: Access and manage directory services.
  • Use in IT: Admins use LDAP to look up users, groups, or permissions in a company directory, often integrated with Microsoft Active Directory.

12. 443 – HTTPS (Hypertext Transfer Protocol Secure)

  • Port: 443
  • Protocol Type: TCP
  • Purpose: Securely transfers web pages using encryption (TLS/SSL).
  • Use in IT: Websites use HTTPS to protect sensitive data like login credentials and payment information.

13. 445 – SMB/CIFS (Server Message Block / Common Internet File System)

  • Port: 445
  • Protocol Type: TCP
  • Purpose: File and printer sharing between Windows systems.
  • Use in IT: Used in corporate networks for accessing shared folders and printers. Modern Windows networks rely on SMB rather than NetBIOS.

14. 3389 – RDP (Remote Desktop Protocol)

  • Port: 3389
  • Protocol Type: TCP
  • Purpose: Remote control of a computer’s desktop.
  • Use in IT: IT support uses RDP to troubleshoot servers or client machines from another location. RDP sessions are encrypted to protect the connection.

Key Points for the Exam

  1. TCP vs UDP
    • TCP: Reliable, connection-based. Used by FTP, HTTP, SMTP, IMAP, HTTPS, RDP.
    • UDP: Faster, connectionless. Used by DHCP, DNS (mostly), NetBIOS (partial).
  2. Ports are standardized – memorize common ports: 20-21, 22, 23, 25, 53, 67/68, 80, 110, 143, 137-139, 389, 443, 445, 3389.
  3. Purpose matters – know what each protocol does and where it’s used in a network or IT environment.
Buy Me a Coffee