2.1 Common Network Ports - CompTia A+ 220-1101
Network Communication Basics
Connecting to a server requires knowledge of the port number of the service running on that device, commonly referred to as well-known port numbers.
This understanding is crucial for configuring firewall rules, which involve adding an IP address and a corresponding port number to control traffic.
Memorization of port numbers may initially seem like rote memorization, but practical experience improves retention.
Key Protocols and Their Port Numbers
FTP (File Transfer Protocol)
Purpose: Used for transferring files and managing file systems.
Port Numbers:
TCP Port 20: Active mode data transfer.
TCP Port 21: Control connection for FTP commands.
Authentication: Often uses username and password; some servers allow anonymous logins.
Capabilities: List, add, and delete files and folders on the server.
SSH (Secure Shell)
Purpose: Provides secure access to the command line of a remote device.
Port Number: TCP Port 22.
Features: Encrypted communication, making it secure compared to Telnet.
Telnet
Purpose: Provides console or terminal access to devices using a text-based interface.
Port Number: TCP Port 23.
Security Note: Unencrypted communications make it insecure; prefer SSH when possible.
SMTP (Simple Mail Transfer Protocol)
Purpose: Used to send emails between devices.
Port Number: TCP Port 25.
Functionality: Sends mail from client to mail server and between mail servers.
DNS (Domain Name System)
Purpose: Converts fully qualified domain names into IP addresses.
Port Number: UDP Port 53.
DHCP (Dynamic Host Configuration Protocol)
Purpose: Automatically assigns IP addresses and other network configuration settings to devices.
Port Numbers:
UDP Port 67: Server-side.
UDP Port 68: Client-side.
Functionality: Provides real-time IP address assignments with a lease time; supports IP address reservations based on MAC addresses.
HTTP and HTTPS
HTTP (Hypertext Transfer Protocol)
Purpose: Used for web browsing, transmitting data between client and web server.
Port Number: TCP Port 80.
HTTPS (HTTP Secure)
Purpose: Secure version of HTTP with encrypted data transmission.
Port Number: TCP Port 443.
POP3 and IMAP
POP3 (Post Office Protocol version 3)
Purpose: Retrieves emails from a server.
Port Number: TCP Port 110.
Limitation: Lacks synchronization capabilities across multiple devices.
IMAP (Internet Message Access Protocol version 4)
Purpose: Retrieves and synchronizes emails across devices.
Port Number: TCP Port 143.
SMB (Server Message Block)
Purpose: Protocol for file and printer sharing, primarily associated with Windows.
Port Numbers:
TCP Port 445: Direct SMB over IP.
Legacy usage of NetBIOS now rarely implemented (UDP Port 137, TCP Port 139).
SNMP (Simple Network Management Protocol)
Purpose: Monitors and manages network devices.
Port Numbers:
UDP Port 161: Queries for device performance data.
UDP Port 162: SNMP traps for proactive device monitoring.
Versions:
SNMPv1: Basic single queries, no security.
SNMPv2: Bulk data transfer, still unsecured.
SNMPv3: Enhanced security with encryption.
LDAP (Lightweight Directory Access Protocol)
Purpose: Accesses directory services like Microsoft Active Directory.
Port Number: TCP Port 389.
RDP (Remote Desktop Protocol)
Purpose: Provides remote desktop access to Windows machines.
Port Number: TCP Port 3389.
Functionality: Allows full control of the desktop or access to specific applications; supports various operating systems as RDP clients.