Network Protocols – CompTIA Network+ Certification Study Guide
Overview
Network protocols define the rules and standards that enable devices to communicate across networks. This study guide covers the essential protocols tested on the CompTIA Network+ exam, including TCP/IP fundamentals, application layer services, network services, routing protocols, and secure tunneling solutions. Mastery of port numbers, protocol behaviors, and key distinctions between similar protocols is critical for exam success.
---
TCP/IP Fundamentals
Core Transport Protocols
The foundation of modern networking rests on two transport protocols that serve different purposes depending on the application's needs.
TCP (Transmission Control Protocol)
UDP (User Datagram Protocol)
The TCP Three-Way Handshake
```
Client Server
|--- SYN ------->| Step 1: Client initiates connection
|<-- SYN-ACK ----| Step 2: Server acknowledges and responds
|--- ACK ------->| Step 3: Client confirms – connection established
```
> Key Terms:
> - SYN – Synchronize: initiates a connection
> - SYN-ACK – Synchronize-Acknowledge: server confirms receipt
> - ACK – Acknowledge: client confirms the connection is open
ICMP and Diagnostic Protocols
ICMP (Internet Control Message Protocol) is used for network diagnostics and error reporting, not data transfer.
| ICMP Function | Type | Description |
|---|---|---|
| Echo Request | Type 8 | Sent by `ping` |
| Echo Reply | Type 0 | Response to ping |
| Destination Unreachable | Type 3 | Packet could not be delivered |
| Time Exceeded | Type 11 | TTL expired (used by traceroute) |
Ping: Uses ICMP Echo Request (Type 8) and Echo Reply (Type 0)
Traceroute/Tracert:
ARP (Address Resolution Protocol)
Purpose: Resolves a known IP address → MAC address on a local network segment
Process:
1. Host broadcasts "Who has IP 192.168.1.1?"
2. The device with that IP replies with its MAC address
3. The MAC address is cached in the ARP table
> Key Terms:
> - ARP Table/Cache – Local storage of IP-to-MAC mappings
> - Gratuitous ARP – Unsolicited ARP announcement (used in failover/attacks)
> - ARP Poisoning – Security attack that corrupts ARP caches
⚠️ Watch Out For
---
Application Layer Protocols
Essential Port Numbers Reference Table
| Protocol | Port | Transport | Purpose |
|---|---|---|---|
| FTP (Data) | 20 | TCP | Active mode data transfer |
| FTP (Control) | 21 | TCP | Commands and control |
| SSH / SFTP | 22 | TCP | Encrypted remote access / file transfer |
| Telnet | 23 | TCP | Unencrypted remote access |
| SMTP | 25 | TCP | Sending/relaying email |
| DNS | 53 | UDP/TCP | Name resolution |
| HTTP | 80 | TCP | Web traffic (unencrypted) |
| POP3 | 110 | TCP | Downloading email |
| NTP | 123 | UDP | Time synchronization |
| IMAP | 143 | TCP | Synchronized email access |
| HTTPS | 443 | TCP | Encrypted web traffic (TLS) |
| RDP | 3389 | TCP/UDP | Remote desktop (Windows) |
Web Protocols: HTTP vs. HTTPS
- The "S" = Secure
- Uses digital certificates to authenticate servers
File Transfer Protocols
FTP (File Transfer Protocol)
SFTP (SSH File Transfer Protocol)
TFTP (Trivial File Transfer Protocol)
Remote Access Protocols
| Protocol | Port | Encryption | Use Case |
|---|---|---|---|
| SSH | TCP 22 | ✅ Full encryption | Secure CLI remote access |
| Telnet | TCP 23 | ❌ Plaintext | Legacy CLI remote access |
| RDP | TCP/UDP 3389 | ✅ Encrypted | Graphical Windows remote desktop |
> SSH vs. Telnet: SSH encrypts all traffic including credentials. Telnet sends everything, including passwords, in cleartext.
Email Protocols
SMTP – TCP port 25
POP3 (Post Office Protocol v3) – TCP port 110
IMAP (Internet Message Access Protocol) – TCP port 143
DNS (Domain Name System)
- Response exceeds 512 bytes
- Zone transfers (full DNS database replication between servers)
Management & Infrastructure Protocols
SNMP (Simple Network Management Protocol)
- Authentication (MD5 or SHA)
- Encryption (DES or AES)
- Message integrity
NTP (Network Time Protocol)
LDAP / LDAPS
⚠️ Watch Out For
---
Network Services Protocols
DHCP (Dynamic Host Configuration Protocol)
#### The DORA Process
```
Client Server
|-- DISCOVER (broadcast) ----->| "I need an IP address!"
|<-- OFFER (unicast/broadcast) | "How about 192.168.1.50?"
|-- REQUEST (broadcast) ------>| "I'll take 192.168.1.50!"
|<-- ACKNOWLEDGE (broadcast) --| "It's yours! Lease = 8 hours"
```
DHCP Ports:
DHCP Relay Agent:
> Key Terms:
> - DHCP Scope – The range of IP addresses available for lease
> - DHCP Reservation – Assigns a specific IP to a device based on MAC address
> - Lease Time – How long a client may use the assigned IP before renewal
DNS Record Types
| Record Type | Function |
|---|---|
| A | Maps hostname → IPv4 address |
| AAAA (Quad-A) | Maps hostname → IPv6 address |
| MX | Identifies mail servers for a domain (with priority) |
| PTR | Reverse lookup – maps IP address → hostname (stored in `in-addr.arpa`) |
| CNAME | Alias – maps one hostname to another hostname |
| NS | Identifies authoritative name servers for a domain |
| TXT | Stores text (used for SPF, DKIM, domain verification) |
MX Records: Include a priority value – lower number = higher priority
PTR Records: Enable reverse DNS lookup; stored in the in-addr.arpa zone
⚠️ Watch Out For
---
Routing Protocols
Routing Protocol Overview
| Protocol | Type | Metric | Max Hops | Admin Distance |
|---|---|---|---|---|
| RIP | Distance-vector | Hop count | 15 | 120 |
| OSPF | Link-state | Cost (bandwidth) | Unlimited | 110 |
| EIGRP | Hybrid (Cisco) | Bandwidth + Delay | Unlimited | 90 (internal) |
| BGP | Path-vector | AS Path | N/A | 20 (eBGP) |
Administrative Distance (AD)
Administrative Distance determines which routing source is trusted when multiple protocols advertise the same route. Lower AD = more preferred.
```
Connected: 0 (most trusted)
Static: 1
eBGP: 20
EIGRP: 90
OSPF: 110
RIP: 120
```
> OSPF (AD 110) is preferred over RIP (AD 120)
Individual Protocol Details
RIP (Routing Information Protocol)
OSPF (Open Shortest Path First)
EIGRP (Enhanced Interior Gateway Routing Protocol)
BGP (Border Gateway Protocol)
⚠️ Watch Out For
---
Secure & Tunneling Protocols
IPSec (Internet Protocol Security)
IPSec secures IP communications through two core protocols:
| Protocol | Provides | Encryption |
|---|---|---|
| AH (Authentication Header) | Integrity + Authentication | ❌ No |
| ESP (Encapsulating Security Payload) | Encryption + Integrity + Authentication | ✅ Yes |
> ESP is almost always preferred because it provides both encryption AND authentication.
IPSec Modes:
| Mode | Use Case | What's Protected |
|---|---|---|
| Tunnel Mode | VPN between networks (site-to-site) | Entire original packet (new IP header added) |
| Transport Mode | End-to-end host communication | Payload only (original IP header preserved) |
RADIUS (Authentication Protocol)
RADIUS (Remote Authentication Dial-In User Service)
SNMPv3 Security
While covered in Application Layer, SNMPv3 deserves emphasis here:
Protocol Security Comparison
| Insecure Protocol | Secure Replacement | Port Change |
|---|---|---|
| Telnet (23) | SSH (22) | Different port |
| FTP (20/21) | SFTP (22) or FTPS | Different port |
| HTTP (80) | HTTPS (443) | Different port |
| LDAP (389) | LDAPS (636) | Different port |
| SNMPv1/v2 | SNMPv3 | Same ports (161/162) |