2.1 - CompTIA A+ Core 1
Exam Objective 2.1: Compare and contrast Transmission Control Protocol (TCP) and User Datagram Protocol (UDP) ports, protocols, and their purposes.
Ports and protocols
20/21 – File Transfer Protocol (FTP)
Runs on TCP port 20 for data transfers and TCP port 21 for controlling data transfers
Function: Transfers files between systems.
Typically requires a username/password combination to authenticate - some systems allow anonymous logins, however.
Includes file management functionalities, such as listing, adding, deleting, etc.
22 – Secure Shell (SSH)
Runs on TCP port 22
Function: Allows encrypted communications between a client, and the console/CLI for a remote device
Uses a text-based CLI screen; looks exactly the same as Telnet
23 – Telnet
Runs on TCP port 23
Function: Allows non-encrypted communications between a client console/CLI and a remote device
25 – Simple Mail Transfer Protocol (SMTP)
Runs on TCP port 25
Function: Used to send client mail to a mail server (client → server), and server ←→ server mail communications
Typically used on mobile devices and email clients.
53 – Domain Name System (DNS)
Runs on UDP port 53
Function: Resolves (converts) domain names to IP addresses
Highly critical resources; multiple IP addresses (webservers) are used for a website, so memorizing IP addresses (sans DNS), is a highly cumbersome task.
67/68 – Dynamic Host Configuration Protocol (DHCP)
Runs on UDP ports 67/68
Function: Automatically assigns IP addresses to network devices.
Takes IP addresses from a real-time IP pool. Each endpoint receives an IP lease that must be renewed at set intervals (such as devices entering/leaving a network).
IP addresses can also be assigned by MAC addresses - this is managed via the DHCP server
Requires a DHCP server, but this functionality is typically built into routers.
80 – Hypertext Transfer Protocol (HTTP)
Runs on TCP port 80
Used for client-webserver communications
443 – Hypertext Transfer Protocol Secure (HTTPS)
Runs on TCP port 443
Used for encrypted client-webserver communications
110 – Post Office Protocol 3 (POP3)
Runs on TCP port 110
Function: Basic (i.e., single client), server → client mail transfer.
137/139 – Network Basic Input/ Output System (NetBIOS)/ NetBIOS over TCP/IP (NetBT)
Protocol used by SMB to communicate
Runs on UDP port 137 for NetBIOS name services (nbname)
Runs on TCP port 139 for NetBIOS session services (nbsession)
NetBT/NetBIOS-less:
Runs on TCP port 445
Function: Direct SMB communication between devices over TCP without NetBIOS
143 – Internet Mail Access Protocol 4 (IMAP/IMAP4)
Runs on TCP port 143
Function: Multi-client (multi-device) email retrieval; includes an email inbox for better management
161/162 – Simple Network Management Protocol (SNMP)
Function: Allows network admin to query statistics/information from network devices.
Uses UDP port 161 for queries
Uses UDP port 162 for network traps (information sent from network devices)
SNMP versions:
v1: Structured tables, plaintext data
v2: Bulk data transfers, data type enhancements, still plaintext
v3: Message integrity, authentication (i.e., logins), encrypted data
389 – Lightweight Directory Access Protocol (LDAP)
Function: Used to query network directories, and retrieve information from network directories
Uses TCP port 389
Commonly used in Microsoft Active Directory
443 – Hypertext Transfer Protocol Secure (HTTPS)
445 – Server Message Block (SMB)/Common Internet File System (CIFS)
Runs on TCP port 445
Function: Used for file/printer sharing
3389 – Remote Desktop Protocol (RDP)
Function: Standard port used by Windows (on many different versions) for remote computer sharing
Runs on TCP port 3389
Can be used to connect/take over an entire system, or just an application
RDP servers are Windows machines, but RDP clients (machines attempting to connect via RDP) can be non-Windows devices
TCP vs. UDP
Connectionless
DHCP
Trivial File Transfer Protocol (TFTP)
Connection-oriented
HTTPS
SSH